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());
      
      1. YARN-4246_1.patch
        3 kB
        nijel
      2. YARN-4246_2.patch
        3 kB
        nijel

        Activity

        Hide
        nijel nijel added a comment -

        thanks Varun Saxena for reporting
        the same issue is there in applicationattempt status also

         ./yarn applicationattempt -status appattempt_1444389134985_0001_000001
        15/10/09 16:53:19 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
        15/10/09 16:53:20 INFO impl.TimelineClientImpl: Timeline service address: http://10.18.130.110:55033/ws/v1/timeline/
        15/10/09 16:53:20 INFO client.RMProxy: Connecting to ResourceManager at host-10-18-130-110/10.18.130.110:8032
        15/10/09 16:53:21 INFO client.AHSProxy: Connecting to Application History server at /10.18.130.110:55034
        Exception in thread "main" java.lang.NullPointerException
        at org.apache.hadoop.yarn.client.cli.ApplicationCLI.printApplicationAttemptReport(ApplicationCLI.java:352)
        at org.apache.hadoop.yarn.client.cli.ApplicationCLI.run(ApplicationCLI.java:182)
        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)
        
        Show
        nijel nijel added a comment - thanks Varun Saxena for reporting the same issue is there in applicationattempt status also ./yarn applicationattempt -status appattempt_1444389134985_0001_000001 15/10/09 16:53:19 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 15/10/09 16:53:20 INFO impl.TimelineClientImpl: Timeline service address: http://10.18.130.110:55033/ws/v1/timeline/ 15/10/09 16:53:20 INFO client.RMProxy: Connecting to ResourceManager at host-10-18-130-110/10.18.130.110:8032 15/10/09 16:53:21 INFO client.AHSProxy: Connecting to Application History server at /10.18.130.110:55034 Exception in thread "main" java.lang.NullPointerException at org.apache.hadoop.yarn.client.cli.ApplicationCLI.printApplicationAttemptReport(ApplicationCLI.java:352) at org.apache.hadoop.yarn.client.cli.ApplicationCLI.run(ApplicationCLI.java:182) 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)
        Hide
        nijel nijel added a comment -

        patch.

        Please review

        Show
        nijel nijel added a comment - patch. Please review
        Hide
        stevel@apache.org Steve Loughran added a comment -

        -1. ignoring what jenkins says, testAppAttepmptReportWhileContainerIsNotAssigned is misspelled

        Show
        stevel@apache.org Steve Loughran added a comment - -1. ignoring what jenkins says, testAppAttepmptReportWhileContainerIsNotAssigned is misspelled
        Hide
        nijel nijel added a comment -

        Thanks Steve Loughran for pointing out the mistake.
        Updated the patch with the comment fix.

        thanks

        Show
        nijel nijel added a comment - Thanks Steve Loughran for pointing out the mistake. Updated the patch with the comment fix. thanks
        Hide
        hadoopqa Hadoop QA added a comment -



        -1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 22m 27s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
        +1 javac 10m 17s There were no new javac warning messages.
        +1 javadoc 12m 58s There were no new javadoc warning messages.
        +1 release audit 0m 25s The applied patch does not increase the total number of release audit warnings.
        +1 checkstyle 0m 36s There were no new checkstyle issues.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 40s mvn install still works.
        +1 eclipse:eclipse 0m 38s The patch built with eclipse:eclipse.
        +1 findbugs 0m 58s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        -1 yarn tests 7m 10s Tests failed in hadoop-yarn-client.
            57m 13s  



        Reason Tests
        Failed unit tests hadoop.yarn.client.api.impl.TestAMRMClientOnRMRestart
          hadoop.yarn.client.api.impl.TestYarnClient



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12766275/YARN-4246_2.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / 69b025d
        hadoop-yarn-client test log https://builds.apache.org/job/PreCommit-YARN-Build/9422/artifact/patchprocess/testrun_hadoop-yarn-client.txt
        Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9422/testReport/
        Java 1.7.0_55
        uname Linux asf901.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Console output https://builds.apache.org/job/PreCommit-YARN-Build/9422/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 22m 27s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 10m 17s There were no new javac warning messages. +1 javadoc 12m 58s There were no new javadoc warning messages. +1 release audit 0m 25s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 0m 36s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 40s mvn install still works. +1 eclipse:eclipse 0m 38s The patch built with eclipse:eclipse. +1 findbugs 0m 58s The patch does not introduce any new Findbugs (version 3.0.0) warnings. -1 yarn tests 7m 10s Tests failed in hadoop-yarn-client.     57m 13s   Reason Tests Failed unit tests hadoop.yarn.client.api.impl.TestAMRMClientOnRMRestart   hadoop.yarn.client.api.impl.TestYarnClient Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12766275/YARN-4246_2.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 69b025d hadoop-yarn-client test log https://builds.apache.org/job/PreCommit-YARN-Build/9422/artifact/patchprocess/testrun_hadoop-yarn-client.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9422/testReport/ Java 1.7.0_55 uname Linux asf901.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-YARN-Build/9422/console This message was automatically generated.
        Hide
        nijel nijel added a comment -

        -1 yarn tests

        as per my analysis test fails are not related to this patch.
        Please review

        Show
        nijel nijel added a comment - -1 yarn tests as per my analysis test fails are not related to this patch. Please review
        Hide
        rohithsharma Rohith Sharma K S added a comment -

        +lgtm.. Kicking off jenkin to see QA result again..

        Show
        rohithsharma Rohith Sharma K S added a comment - +lgtm.. Kicking off jenkin to see QA result again..
        Hide
        hadoopqa Hadoop QA added a comment -



        +1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 17m 17s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
        +1 javac 8m 0s There were no new javac warning messages.
        +1 javadoc 10m 22s There were no new javadoc warning messages.
        +1 release audit 0m 25s The applied patch does not increase the total number of release audit warnings.
        +1 checkstyle 0m 28s There were no new checkstyle issues.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 37s mvn install still works.
        +1 eclipse:eclipse 0m 36s The patch built with eclipse:eclipse.
        +1 findbugs 0m 52s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
        +1 yarn tests 7m 3s Tests passed in hadoop-yarn-client.
            46m 43s  



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12766275/YARN-4246_2.patch
        Optional Tests javadoc javac unit findbugs checkstyle
        git revision trunk / 1aa735c
        hadoop-yarn-client test log https://builds.apache.org/job/PreCommit-YARN-Build/9573/artifact/patchprocess/testrun_hadoop-yarn-client.txt
        Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9573/testReport/
        Java 1.7.0_55
        uname Linux asf902.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Console output https://builds.apache.org/job/PreCommit-YARN-Build/9573/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 pre-patch 17m 17s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 8m 0s There were no new javac warning messages. +1 javadoc 10m 22s There were no new javadoc warning messages. +1 release audit 0m 25s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 0m 28s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 37s mvn install still works. +1 eclipse:eclipse 0m 36s The patch built with eclipse:eclipse. +1 findbugs 0m 52s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 yarn tests 7m 3s Tests passed in hadoop-yarn-client.     46m 43s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12766275/YARN-4246_2.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 1aa735c hadoop-yarn-client test log https://builds.apache.org/job/PreCommit-YARN-Build/9573/artifact/patchprocess/testrun_hadoop-yarn-client.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9573/testReport/ Java 1.7.0_55 uname Linux asf902.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-YARN-Build/9573/console This message was automatically generated.
        Hide
        varun_saxena Varun Saxena added a comment -

        +1, LGTM

        Show
        varun_saxena Varun Saxena added a comment - +1, LGTM
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #8705 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8705/)
        YARN-4246. NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b)

        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java
        • hadoop-yarn-project/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8705 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8705/ ) YARN-4246 . NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java hadoop-yarn-project/CHANGES.txt
        Hide
        rohithsharma Rohith Sharma K S added a comment -

        committed to branch-2/trunk.. thanks nijel!!

        Show
        rohithsharma Rohith Sharma K S added a comment - committed to branch-2/trunk.. thanks nijel !!
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #595 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/595/)
        YARN-4246. NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b)

        • hadoop-yarn-project/CHANGES.txt
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #595 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/595/ ) YARN-4246 . NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b) hadoop-yarn-project/CHANGES.txt hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk #1318 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1318/)
        YARN-4246. NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b)

        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java
        • hadoop-yarn-project/CHANGES.txt
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #1318 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1318/ ) YARN-4246 . NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java hadoop-yarn-project/CHANGES.txt hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #583 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/583/)
        YARN-4246. NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b)

        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java
        • hadoop-yarn-project/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #583 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/583/ ) YARN-4246 . NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java hadoop-yarn-project/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2527 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2527/)
        YARN-4246. NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b)

        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java
        • hadoop-yarn-project/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2527 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2527/ ) YARN-4246 . NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java hadoop-yarn-project/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2474 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2474/)
        YARN-4246. NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b)

        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java
        • hadoop-yarn-project/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2474 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2474/ ) YARN-4246 . NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java hadoop-yarn-project/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #537 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/537/)
        YARN-4246. NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b)

        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java
        • hadoop-yarn-project/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #537 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/537/ ) YARN-4246 . NPE while listing app attempt. (Nijel S F via rohithsharmaks) (rohithsharmaks: rev b57f08c0d2dae57b545a3baa213e18464060ae3b) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/ApplicationCLI.java hadoop-yarn-project/CHANGES.txt
        Hide
        nijel nijel added a comment -

        thanks Varun Saxena and Rohith Sharma K S for the review and commit.

        Show
        nijel nijel added a comment - thanks Varun Saxena and Rohith Sharma K S for the review and commit.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development