diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java b/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java index bfd51d410745..f49425833848 100644 --- a/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java +++ b/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java @@ -318,7 +318,10 @@ public LlapTaskUmbilicalProtocol run() throws Exception { private void setMDCFromNDC() { final Stack clonedNDC = NDC.cloneStack(); - LOG.debug("Get the class name " + clonedNDC.peek().getClass()); + if(!clonedNDC.empty()) + + LOG.debug("Get the class name " + clonedNDC.peek().getClass()); + final String fragId = clonedNDC.empty() ? "":clonedNDC.pop().toString(); LOG.debug("FragId " + fragId); final String queryId = clonedNDC.empty() ? "":clonedNDC.pop().toString();