Details

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

      Description

      Hit the following NPE when reviewing fix for HDFS-9387 with manual tests as NNThroughputBenchmark currently does not have JUnit tests.

      HW11217:centos6.4 xyao$ hadoop org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark -op replication -namenode hdfs://HW11217.local:9000
      15/11/12 14:52:03 INFO namenode.NNThroughputBenchmark: Starting benchmark: replication
      15/11/12 14:52:03 ERROR namenode.NNThroughputBenchmark: java.lang.NullPointerException
      	at org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark$ReplicationStats.generateInputs(NNThroughputBenchmark.java:1312)
      	at org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark$OperationStatsBase.benchmark(NNThroughputBenchmark.java:280)
      	at org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark.run(NNThroughputBenchmark.java:1509)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
      	at org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark.main(NNThroughputBenchmark.java:1534)
      ...
      

      However, the root cause is different from HDFS-9387.
      From ReplicationStats#generateInputs, nameNode is uninitialized before use, which causes the NPE.

            final FSNamesystem namesystem = nameNode.getNamesystem();
      

      From NNThroughputBenchmark#run, nameNode is only initialized when -namenode option is not specified. The fix is to initialize it properly in the else block when -namenode option is specified OR we should block this if it is not supported.

       if (namenodeUri == null) {
              nameNode = NameNode.createNameNode(argv, config);
              NamenodeProtocols nnProtos = nameNode.getRpcServer();
              nameNodeProto = nnProtos;
              clientProto = nnProtos;
              dataNodeProto = nnProtos;
              refreshUserMappingsProto = nnProtos;
              bpid = nameNode.getNamesystem().getBlockPoolId();
            } else {
              FileSystem.setDefaultUri(getConf(), namenodeUri);
              DistributedFileSystem dfs = (DistributedFileSystem)
                  FileSystem.get(getConf());
              final URI nnUri = new URI(namenodeUri);
              nameNodeProto = DFSTestUtil.getNamenodeProtocolProxy(config, nnUri,
                  UserGroupInformation.getCurrentUser());
       
      

        Issue Links

          Activity

          Hide
          liuml07 Mingliang Liu added a comment -

          Per discussion in HDFS-9387, the replication test is not supporting namenode in another process or on another host.

          In the v0 patch:

          • If arguments include -op replication -namenode URI, the test will be ignored, along with a warning message for ignoring the replication test.
          • If arguments include -op all -namenode URI, all tests other than replication will run against the standalone name node URI, along with a warning message.
          Show
          liuml07 Mingliang Liu added a comment - Per discussion in HDFS-9387 , the replication test is not supporting namenode in another process or on another host. In the v0 patch: If arguments include -op replication -namenode URI , the test will be ignored, along with a warning message for ignoring the replication test. If arguments include -op all -namenode URI , all tests other than replication will run against the standalone name node URI, along with a warning message.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 8s docker + precommit patch detected.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 3m 19s trunk passed
          +1 compile 0m 39s trunk passed with JDK v1.8.0_66
          +1 compile 0m 38s trunk passed with JDK v1.7.0_79
          +1 checkstyle 0m 18s trunk passed
          +1 mvnsite 0m 49s trunk passed
          +1 mvneclipse 0m 16s trunk passed
          +1 findbugs 2m 11s trunk passed
          +1 javadoc 1m 24s trunk passed with JDK v1.8.0_66
          +1 javadoc 2m 16s trunk passed with JDK v1.7.0_79
          +1 mvninstall 0m 49s the patch passed
          +1 compile 0m 45s the patch passed with JDK v1.8.0_66
          +1 javac 0m 45s the patch passed
          +1 compile 0m 42s the patch passed with JDK v1.7.0_79
          +1 javac 0m 42s the patch passed
          +1 checkstyle 0m 21s the patch passed
          +1 mvnsite 0m 52s the patch passed
          +1 mvneclipse 0m 17s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 2m 37s the patch passed
          +1 javadoc 1m 33s the patch passed with JDK v1.8.0_66
          +1 javadoc 2m 15s the patch passed with JDK v1.7.0_79
          -1 unit 90m 11s hadoop-hdfs in the patch failed with JDK v1.8.0_66.
          -1 unit 87m 16s hadoop-hdfs in the patch failed with JDK v1.7.0_79.
          -1 asflicense 0m 28s Patch generated 56 ASF License warnings.
          203m 28s



          Reason Tests
          JDK v1.8.0_66 Failed junit tests hadoop.hdfs.TestDFSStripedOutputStreamWithFailure
            hadoop.hdfs.server.namenode.ha.TestDNFencing
            hadoop.hdfs.server.namenode.ha.TestEditLogTailer
            hadoop.hdfs.TestPersistBlocks
            hadoop.hdfs.security.TestDelegationTokenForProxyUser
            hadoop.hdfs.server.namenode.TestNameNodeMXBean
            hadoop.hdfs.server.datanode.TestDataNodeHotSwapVolumes
            hadoop.hdfs.server.datanode.TestBlockReplacement
            hadoop.hdfs.server.namenode.ha.TestSeveralNameNodes
            hadoop.hdfs.server.namenode.ha.TestHAAppend
            hadoop.hdfs.server.blockmanagement.TestReplicationPolicy
            hadoop.hdfs.server.datanode.TestDirectoryScanner
          JDK v1.7.0_79 Failed junit tests hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency
            hadoop.hdfs.server.namenode.ha.TestDNFencing
            hadoop.hdfs.server.namenode.ha.TestEditLogTailer
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure100
            hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure080
            hadoop.hdfs.TestEncryptionZones
            hadoop.hdfs.server.datanode.TestDirectoryScanner



          Subsystem Report/Notes
          Docker Client=1.7.0 Server=1.7.0 Image:test-patch-base-hadoop-date2015-11-14
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12772335/HDFS-9241.000.patch
          JIRA Issue HDFS-9421
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 7daf2f0ecd70 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
          Build tool maven
          Personality /home/jenkins/jenkins-slave/workspace/PreCommit-HDFS-Build/patchprocess/apache-yetus-fa12328/precommit/personality/hadoop.sh
          git revision trunk / c753617
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13510/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13510/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt
          unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13510/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13510/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt
          JDK v1.7.0_79 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13510/testReport/
          asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13510/artifact/patchprocess/patch-asflicense-problems.txt
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Max memory used 226MB
          Powered by Apache Yetus http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13510/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 8s docker + precommit patch detected. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 3m 19s trunk passed +1 compile 0m 39s trunk passed with JDK v1.8.0_66 +1 compile 0m 38s trunk passed with JDK v1.7.0_79 +1 checkstyle 0m 18s trunk passed +1 mvnsite 0m 49s trunk passed +1 mvneclipse 0m 16s trunk passed +1 findbugs 2m 11s trunk passed +1 javadoc 1m 24s trunk passed with JDK v1.8.0_66 +1 javadoc 2m 16s trunk passed with JDK v1.7.0_79 +1 mvninstall 0m 49s the patch passed +1 compile 0m 45s the patch passed with JDK v1.8.0_66 +1 javac 0m 45s the patch passed +1 compile 0m 42s the patch passed with JDK v1.7.0_79 +1 javac 0m 42s the patch passed +1 checkstyle 0m 21s the patch passed +1 mvnsite 0m 52s the patch passed +1 mvneclipse 0m 17s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 37s the patch passed +1 javadoc 1m 33s the patch passed with JDK v1.8.0_66 +1 javadoc 2m 15s the patch passed with JDK v1.7.0_79 -1 unit 90m 11s hadoop-hdfs in the patch failed with JDK v1.8.0_66. -1 unit 87m 16s hadoop-hdfs in the patch failed with JDK v1.7.0_79. -1 asflicense 0m 28s Patch generated 56 ASF License warnings. 203m 28s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.hdfs.TestDFSStripedOutputStreamWithFailure   hadoop.hdfs.server.namenode.ha.TestDNFencing   hadoop.hdfs.server.namenode.ha.TestEditLogTailer   hadoop.hdfs.TestPersistBlocks   hadoop.hdfs.security.TestDelegationTokenForProxyUser   hadoop.hdfs.server.namenode.TestNameNodeMXBean   hadoop.hdfs.server.datanode.TestDataNodeHotSwapVolumes   hadoop.hdfs.server.datanode.TestBlockReplacement   hadoop.hdfs.server.namenode.ha.TestSeveralNameNodes   hadoop.hdfs.server.namenode.ha.TestHAAppend   hadoop.hdfs.server.blockmanagement.TestReplicationPolicy   hadoop.hdfs.server.datanode.TestDirectoryScanner JDK v1.7.0_79 Failed junit tests hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency   hadoop.hdfs.server.namenode.ha.TestDNFencing   hadoop.hdfs.server.namenode.ha.TestEditLogTailer   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure100   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure080   hadoop.hdfs.TestEncryptionZones   hadoop.hdfs.server.datanode.TestDirectoryScanner Subsystem Report/Notes Docker Client=1.7.0 Server=1.7.0 Image:test-patch-base-hadoop-date2015-11-14 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12772335/HDFS-9241.000.patch JIRA Issue HDFS-9421 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 7daf2f0ecd70 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 Build tool maven Personality /home/jenkins/jenkins-slave/workspace/PreCommit-HDFS-Build/patchprocess/apache-yetus-fa12328/precommit/personality/hadoop.sh git revision trunk / c753617 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/13510/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/13510/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13510/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13510/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt JDK v1.7.0_79 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13510/testReport/ asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13510/artifact/patchprocess/patch-asflicense-problems.txt modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Max memory used 226MB Powered by Apache Yetus http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13510/console This message was automatically generated.
          Hide
          xyao Xiaoyu Yao added a comment -

          +1 for the fix. The test failures are not related. I will commit it shortly.

          Show
          xyao Xiaoyu Yao added a comment - +1 for the fix. The test failures are not related. I will commit it shortly.
          Hide
          liuml07 Mingliang Liu added a comment -

          Thanks for your reporting this issue, reviewing and committing the patch, Xiaoyu Yao!

          Show
          liuml07 Mingliang Liu added a comment - Thanks for your reporting this issue, reviewing and committing the patch, Xiaoyu Yao !
          Hide
          xyao Xiaoyu Yao added a comment -

          Thanks Mingliang Liu for the contribution. I've committed the patch to trunk and branch-2.

          Show
          xyao Xiaoyu Yao added a comment - Thanks Mingliang Liu for the contribution. I've committed the patch to trunk and branch-2.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #8808 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8808/)
          HDFS-9421. NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #8808 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8808/ ) HDFS-9421 . NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #670 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/670/)
          HDFS-9421. NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #670 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/670/ ) HDFS-9421 . NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2612 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2612/)
          HDFS-9421. NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2612 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2612/ ) HDFS-9421 . NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2546 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2546/)
          HDFS-9421. NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2546 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2546/ ) HDFS-9421 . NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Yarn-trunk #1406 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1406/)
          HDFS-9421. NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #1406 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1406/ ) HDFS-9421 . NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #683 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/683/)
          HDFS-9421. NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #683 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/683/ ) HDFS-9421 . NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #609 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/609/)
          HDFS-9421. NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #609 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/609/ ) HDFS-9421 . NNThroughputBenchmark replication test NPE with -namenode (xyao: rev a4f62a2d58d4e00cda3632411c6abda6eaa12a0e) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

            People

            • Assignee:
              liuml07 Mingliang Liu
              Reporter:
              xyao Xiaoyu Yao
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development