-
Shutdown command comes while YarnChild is initializing
-
line#1 is crash point, so we inject shutdown after it.
YarnChild.taskid = task.getTaskID(); try{ logSyncer = TaskLog.createLogSyncer();//line 168 .... taskFinal.run(job, umbilical); //line 178 }catch (Exception exception) {//line 187 LOG.warn("Exception running child : " + StringUtils.stringifyException(exception)); ................. task.taskCleanup(umbilical);// line 200 }
-
But line168 throw exception:"Shutdown in progress, cannot add a shutdownHook".
-
Line 187 will catch this exception and do clean up(line 200), code line 200 will use task.committer without null check, hence NPE happens
-
YarnChild.taskid is the meta-info
-
And it is written, we should crash the YarnChild node, but due to YarnChild.taskid is already on YarnChild node, so crash should change to shutdown.