[
https://issues.apache.org/jira/browse/YARN-4246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Advertising
nijel updated YARN-4246:
------------------------
Attachment: YARN-4246_1.patch
patch.
Please review
> NPE while listing app attempt
> -----------------------------
>
> Key: YARN-4246
> URL: https://issues.apache.org/jira/browse/YARN-4246
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: Varun Saxena
> Assignee: nijel
> Attachments: YARN-4246_1.patch
>
>
> {noformat}
> Exception in thread "main" java.lang.NullPointerException
> at
> org.apache.hadoop.yarn.client.cli.ApplicationCLI.listApplicationAttempts(ApplicationCLI.java:669)
> at
> org.apache.hadoop.yarn.client.cli.ApplicationCLI.run(ApplicationCLI.java:233)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> at
> org.apache.hadoop.yarn.client.cli.ApplicationCLI.main(ApplicationCLI.java:89)
> {noformat}
> This is because AM container id can be null if AM container hasnt been
> allocated. In ApplicationCLI#listApplicationAttempts we should check whether
> AM container ID is null instead of directly calling toString.
> {code}
> writer.printf(APPLICATION_ATTEMPTS_PATTERN, appAttemptReport
> .getApplicationAttemptId(), appAttemptReport
> .getYarnApplicationAttemptState(), appAttemptReport
> .getAMContainerId().toString(), appAttemptReport.getTrackingUrl());
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)