Repository: hive Updated Branches: refs/heads/llap 469f604dd -> 2fbe0fae2
HIVE-10560. Check if the dirWatcher is setup when trying to unregister a DAG. (Siddharth Seth) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/2fbe0fae Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/2fbe0fae Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/2fbe0fae Branch: refs/heads/llap Commit: 2fbe0fae2f7893d72b0e71a9af2ffeea72894a92 Parents: 469f604 Author: Siddharth Seth <ss...@apache.org> Authored: Thu Apr 30 16:27:26 2015 -0700 Committer: Siddharth Seth <ss...@apache.org> Committed: Thu Apr 30 16:27:26 2015 -0700 ---------------------------------------------------------------------- .../hadoop/hive/llap/shufflehandler/ShuffleHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/2fbe0fae/llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java ---------------------------------------------------------------------- diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java b/llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java index 2572c75..741c7f2 100644 --- a/llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java +++ b/llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java @@ -350,7 +350,8 @@ public class ShuffleHandler implements AttemptRegistrationListener { } public static ShuffleHandler get() { - Preconditions.checkState(started.get(), "ShuffleHandler must be started before invoking started"); + Preconditions.checkState(started.get(), + "ShuffleHandler must be started before invoking get"); return INSTANCE; } @@ -434,7 +435,9 @@ public class ShuffleHandler implements AttemptRegistrationListener { } public void unregisterDag(String dir, String applicationIdString, int dagIdentifier) { - dirWatcher.unregisterDagDir(dir, applicationIdString, dagIdentifier); + if (dirWatcher != null) { + dirWatcher.unregisterDagDir(dir, applicationIdString, dagIdentifier); + } // TODO Cleanup registered tokens and dag info }