TEZ-3980: ShuffleRunner: the wake loop needs to check for shutdown (Gopal V, reviewed...
authorGopal V <gopalv@apache.org>
Tue, 28 Aug 2018 03:37:27 +0000 (20:37 -0700)
committerGopal V <gopalv@apache.org>
Tue, 28 Aug 2018 03:37:27 +0000 (20:37 -0700)
tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/impl/ShuffleManager.java

index 0a0286e..5f3693f 100644 (file)
@@ -325,6 +325,9 @@ public class ShuffleManager implements FetcherCallback {
               && numCompletedInputs.get() < numInputs) {
             inputContext.notifyProgress();
             boolean ret = wakeLoop.await(1000, TimeUnit.MILLISECONDS);
+            if (isShutdown.get()) {
+              break;
+            }
           }
         } finally {
           lock.unlock();