[ https://issues.apache.org/jira/browse/YARN-1986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990826#comment-13990826 ]
Tsuyoshi OZAWA commented on YARN-1986: -------------------------------------- Fixing itself LGTM. Minor points: {code} + if (application == null) { + continue; + } {code} {code} + if (attempt == null) { + continue; + } {code} How about adding comments to describe why we can skip the entry like this? {code} // attempt can be null because assignContainer doesn't have any locks. // In this case, we can just skip the entry. {code} > After upgrade from 2.2.0 to 2.4.0, NPE on first job start. > ---------------------------------------------------------- > > Key: YARN-1986 > URL: https://issues.apache.org/jira/browse/YARN-1986 > Project: Hadoop YARN > Issue Type: Bug > Affects Versions: 2.4.0 > Reporter: Jon Bringhurst > Assignee: Hong Zhiguo > Attachments: YARN-1986-testcase.patch, YARN-1986.patch > > > After upgrade from 2.2.0 to 2.4.0, NPE on first job start. > After RM was restarted, the job runs without a problem. > {noformat} > 19:11:13,441 FATAL ResourceManager:600 - Error in handling event type > NODE_UPDATE to the scheduler > java.lang.NullPointerException > at > org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler.assignContainers(FifoScheduler.java:462) > at > org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler.nodeUpdate(FifoScheduler.java:714) > at > org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler.handle(FifoScheduler.java:743) > at > org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler.handle(FifoScheduler.java:104) > at > org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$SchedulerEventDispatcher$EventProcessor.run(ResourceManager.java:591) > at java.lang.Thread.run(Thread.java:744) > 19:11:13,443 INFO ResourceManager:604 - Exiting, bbye.. > {noformat} -- This message was sent by Atlassian JIRA (v6.2#6252)