[ 
https://issues.apache.org/jira/browse/YARN-7786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16334370#comment-16334370
 ] 

lujie commented on YARN-7786:
-----------------------------

There maybe two reasons for Nullpointer:
 # datarace: setAMContainerSpec and getAMContainerSpec can be called by 
different thread(one is AMLauncher.launch that get amContainer, one is 
RMAppImpl.FinalTransition that assign amContainer null).
 # proto does not have AmContainerSpec (when time this situation happens?)

No matter which reason lead to null pointer, I think it is better to check the 
null and give the exact reasons.

> NullPointerException while launching ApplicationMaster
> ------------------------------------------------------
>
>                 Key: YARN-7786
>                 URL: https://issues.apache.org/jira/browse/YARN-7786
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 3.0.0-beta1
>            Reporter: lujie
>            Assignee: lujie
>            Priority: Major
>
> Before launching the ApplicationMaster, send kill command to the job, then 
> some Null pointer appears:
> {code}
> 2017-11-25 21:27:25,333 INFO 
> org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher: Error 
> launching appattempt_1511616410268_0001_000001. Got exception: 
> java.lang.NullPointerException
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.setupTokens(AMLauncher.java:205)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.createAMContainerLaunchContext(AMLauncher.java:193)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.launch(AMLauncher.java:112)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.run(AMLauncher.java:304)
>  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)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to