Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      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)
      

      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.

            writer.printf(APPLICATION_ATTEMPTS_PATTERN, appAttemptReport
                .getApplicationAttemptId(), appAttemptReport
                .getYarnApplicationAttemptState(), appAttemptReport
                .getAMContainerId().toString(), appAttemptReport.getTrackingUrl());
      

        Attachments

        1. YARN-4246_1.patch
          3 kB
          nijel
        2. YARN-4246_2.patch
          3 kB
          nijel

          Activity

            People

            • Assignee:
              nijel nijel
              Reporter:
              varun_saxena Varun Saxena
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: