From e99e2fa7950ea4c4fb815f9160350152d8489e3b Mon Sep 17 00:00:00 2001 From: Manish Singh Mowall Date: Thu, 23 May 2024 10:45:30 +0530 Subject: [PATCH] ODP-1451: If condition addition in clonedNDC check --- .../hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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();