[ https://issues.apache.org/jira/browse/HIVE-15162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15649000#comment-15649000 ]
Jason Dere edited comment on HIVE-15162 at 11/8/16 10:35 PM: ------------------------------------------------------------- {code} String logID = conf.getLogIdVar(SessionState.get().getSessionId()); {code} Since the ATSHook is running in a different thread than the thread running the query, I suspect the thread's SessionID is null. This Session-specific information might need to be gathered at the time the HookContext is generated was (Author: jdere): {code} String logID = conf.getLogIdVar(SessionState.get().getSessionId()); {code} Since the ATSHook is running in a different thread than the thread running the query, I suspect the thread's SessionID is null. > NPE in ATSHook > -------------- > > Key: HIVE-15162 > URL: https://issues.apache.org/jira/browse/HIVE-15162 > Project: Hive > Issue Type: Bug > Components: Hooks > Reporter: Jason Dere > Assignee: Jason Dere > > {noformat} > 2016-11-08T14:21:15,025 INFO [ATS Logger 0]: hooks.ATSHook > (ATSHook.java:run(156)) - Failed to submit plan to ATS: > java.lang.NullPointerException > at org.apache.hadoop.hive.ql.hooks.ATSHook$2.run(ATSHook.java:141) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)