Details

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

      Description

      getDatanodeInfo should be tested in admin CLI.

      1. HDFS-10972-branch-2.8.003.patch
        6 kB
        Xiaobing Zhou
      2. HDFS-10972.003.patch
        6 kB
        Xiaobing Zhou
      3. HDFS-10972.002.patch
        7 kB
        Xiaobing Zhou
      4. HDFS-10972.001.patch
        5 kB
        Xiaobing Zhou
      5. HDFS-10972.000.patch
        6 kB
        Xiaobing Zhou

        Issue Links

          Activity

          Hide
          liuml07 Mingliang Liu added a comment -

          Committed to branch-2.8. Thanks for your contribution, Xiaobing Zhou.

          Show
          liuml07 Mingliang Liu added a comment - Committed to branch-2.8 . Thanks for your contribution, Xiaobing Zhou .
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 17m 50s Docker mode activated.
          +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 8m 45s branch-2.8 passed
          +1 compile 0m 38s branch-2.8 passed with JDK v1.8.0_101
          +1 compile 0m 43s branch-2.8 passed with JDK v1.7.0_111
          +1 checkstyle 0m 21s branch-2.8 passed
          +1 mvnsite 0m 54s branch-2.8 passed
          +1 mvneclipse 0m 16s branch-2.8 passed
          +1 findbugs 1m 56s branch-2.8 passed
          +1 javadoc 0m 55s branch-2.8 passed with JDK v1.8.0_101
          +1 javadoc 1m 34s branch-2.8 passed with JDK v1.7.0_111
          +1 mvninstall 0m 43s the patch passed
          +1 compile 0m 36s the patch passed with JDK v1.8.0_101
          +1 javac 0m 36s the patch passed
          +1 compile 0m 40s the patch passed with JDK v1.7.0_111
          +1 javac 0m 40s the patch passed
          +1 checkstyle 0m 17s the patch passed
          +1 mvnsite 0m 49s the patch passed
          +1 mvneclipse 0m 12s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 2m 6s the patch passed
          +1 javadoc 0m 53s the patch passed with JDK v1.8.0_101
          +1 javadoc 1m 33s the patch passed with JDK v1.7.0_111
          -1 unit 64m 44s hadoop-hdfs in the patch failed with JDK v1.7.0_111.
          +1 asflicense 0m 32s The patch does not generate ASF License warnings.
          172m 30s



          Reason Tests
          JDK v1.8.0_101 Failed junit tests hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency
            hadoop.hdfs.server.namenode.snapshot.TestSnapshotFileLength
            hadoop.hdfs.server.datanode.fsdataset.impl.TestLazyPersistReplicaRecovery
          JDK v1.7.0_111 Failed junit tests hadoop.hdfs.server.datanode.TestDataNodeHotSwapVolumes



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:5af2af1
          JIRA Issue HDFS-10972
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832539/HDFS-10972-branch-2.8.003.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux bca529a9fc97 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision branch-2.8 / 67d8301
          Default Java 1.7.0_111
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_111
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/17087/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_111.txt
          JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17087/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17087/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 17m 50s Docker mode activated. +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 8m 45s branch-2.8 passed +1 compile 0m 38s branch-2.8 passed with JDK v1.8.0_101 +1 compile 0m 43s branch-2.8 passed with JDK v1.7.0_111 +1 checkstyle 0m 21s branch-2.8 passed +1 mvnsite 0m 54s branch-2.8 passed +1 mvneclipse 0m 16s branch-2.8 passed +1 findbugs 1m 56s branch-2.8 passed +1 javadoc 0m 55s branch-2.8 passed with JDK v1.8.0_101 +1 javadoc 1m 34s branch-2.8 passed with JDK v1.7.0_111 +1 mvninstall 0m 43s the patch passed +1 compile 0m 36s the patch passed with JDK v1.8.0_101 +1 javac 0m 36s the patch passed +1 compile 0m 40s the patch passed with JDK v1.7.0_111 +1 javac 0m 40s the patch passed +1 checkstyle 0m 17s the patch passed +1 mvnsite 0m 49s the patch passed +1 mvneclipse 0m 12s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 2m 6s the patch passed +1 javadoc 0m 53s the patch passed with JDK v1.8.0_101 +1 javadoc 1m 33s the patch passed with JDK v1.7.0_111 -1 unit 64m 44s hadoop-hdfs in the patch failed with JDK v1.7.0_111. +1 asflicense 0m 32s The patch does not generate ASF License warnings. 172m 30s Reason Tests JDK v1.8.0_101 Failed junit tests hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency   hadoop.hdfs.server.namenode.snapshot.TestSnapshotFileLength   hadoop.hdfs.server.datanode.fsdataset.impl.TestLazyPersistReplicaRecovery JDK v1.7.0_111 Failed junit tests hadoop.hdfs.server.datanode.TestDataNodeHotSwapVolumes Subsystem Report/Notes Docker Image:yetus/hadoop:5af2af1 JIRA Issue HDFS-10972 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832539/HDFS-10972-branch-2.8.003.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux bca529a9fc97 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision branch-2.8 / 67d8301 Default Java 1.7.0_111 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_111 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/17087/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_111.txt JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17087/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17087/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          liuml07 Mingliang Liu added a comment -

          +1 pending on Jenkins.

          Show
          liuml07 Mingliang Liu added a comment - +1 pending on Jenkins.
          Hide
          xiaobingo Xiaobing Zhou added a comment -

          branch-2.8 patch is posted Mingliang Liu thanks.

          Show
          xiaobingo Xiaobing Zhou added a comment - branch-2.8 patch is posted Mingliang Liu thanks.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10578 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10578/)
          HDFS-10972. Add unit test for HDFS command 'dfsadmin -getDatanodeInfo'. (liuml07: rev 3441c746b5f35c46fca5a0f252c86c8357fe932e)

          • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10578 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10578/ ) HDFS-10972 . Add unit test for HDFS command 'dfsadmin -getDatanodeInfo'. (liuml07: rev 3441c746b5f35c46fca5a0f252c86c8357fe932e) (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java
          Hide
          liuml07 Mingliang Liu added a comment -

          Committed to trunk and branch-2. Can you provide a patch for branch-2.8, if it applies? Thanks.

          Show
          liuml07 Mingliang Liu added a comment - Committed to trunk and branch-2 . Can you provide a patch for branch-2.8 , if it applies? Thanks.
          Hide
          liuml07 Mingliang Liu added a comment -

          Test failures are not related.

          Show
          liuml07 Mingliang Liu added a comment - Test failures are not related.
          Hide
          liuml07 Mingliang Liu added a comment -

          +1 Will commit shortly.

          Show
          liuml07 Mingliang Liu added a comment - +1 Will commit shortly.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 20s Docker mode activated.
          +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 6m 35s trunk passed
          +1 compile 0m 44s trunk passed
          +1 checkstyle 0m 25s trunk passed
          +1 mvnsite 0m 50s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 41s trunk passed
          +1 javadoc 0m 37s trunk passed
          +1 mvninstall 0m 45s the patch passed
          +1 compile 0m 43s the patch passed
          +1 javac 0m 43s the patch passed
          +1 checkstyle 0m 23s the patch passed
          +1 mvnsite 0m 50s the patch passed
          +1 mvneclipse 0m 10s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 44s the patch passed
          +1 javadoc 0m 37s the patch passed
          -1 unit 73m 53s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 19s The patch does not generate ASF License warnings.
          91m 57s



          Reason Tests
          Failed junit tests hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency
            hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Issue HDFS-10972
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832404/HDFS-10972.003.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 69e9f2eff4d5 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / bea004e
          Default Java 1.8.0_101
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/17078/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17078/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17078/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 20s Docker mode activated. +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 6m 35s trunk passed +1 compile 0m 44s trunk passed +1 checkstyle 0m 25s trunk passed +1 mvnsite 0m 50s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 41s trunk passed +1 javadoc 0m 37s trunk passed +1 mvninstall 0m 45s the patch passed +1 compile 0m 43s the patch passed +1 javac 0m 43s the patch passed +1 checkstyle 0m 23s the patch passed +1 mvnsite 0m 50s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 44s the patch passed +1 javadoc 0m 37s the patch passed -1 unit 73m 53s hadoop-hdfs in the patch failed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 91m 57s Reason Tests Failed junit tests hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency   hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10972 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832404/HDFS-10972.003.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 69e9f2eff4d5 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / bea004e Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/17078/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17078/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17078/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          xiaobingo Xiaobing Zhou added a comment -

          v003 addressed your most recent comments, thanks Mingliang Liu

          Show
          xiaobingo Xiaobing Zhou added a comment - v003 addressed your most recent comments, thanks Mingliang Liu
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 19s Docker mode activated.
          +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 8m 0s trunk passed
          +1 compile 0m 51s trunk passed
          +1 checkstyle 0m 27s trunk passed
          +1 mvnsite 0m 58s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 50s trunk passed
          +1 javadoc 0m 42s trunk passed
          +1 mvninstall 0m 52s the patch passed
          +1 compile 0m 45s the patch passed
          +1 javac 0m 45s the patch passed
          +1 checkstyle 0m 23s the patch passed
          +1 mvnsite 0m 48s the patch passed
          +1 mvneclipse 0m 9s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 47s the patch passed
          +1 javadoc 0m 36s the patch passed
          -1 unit 61m 11s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 23s The patch does not generate ASF License warnings.
          81m 26s



          Reason Tests
          Failed junit tests hadoop.hdfs.server.namenode.ha.TestEditLogTailer



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Issue HDFS-10972
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832219/HDFS-10972.002.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux a62ff306733f 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 6a38d11
          Default Java 1.8.0_101
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/17064/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17064/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17064/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 19s Docker mode activated. +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 8m 0s trunk passed +1 compile 0m 51s trunk passed +1 checkstyle 0m 27s trunk passed +1 mvnsite 0m 58s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 50s trunk passed +1 javadoc 0m 42s trunk passed +1 mvninstall 0m 52s the patch passed +1 compile 0m 45s the patch passed +1 javac 0m 45s the patch passed +1 checkstyle 0m 23s the patch passed +1 mvnsite 0m 48s the patch passed +1 mvneclipse 0m 9s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 47s the patch passed +1 javadoc 0m 36s the patch passed -1 unit 61m 11s hadoop-hdfs in the patch failed. +1 asflicense 0m 23s The patch does not generate ASF License warnings. 81m 26s Reason Tests Failed junit tests hadoop.hdfs.server.namenode.ha.TestEditLogTailer Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10972 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832219/HDFS-10972.002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux a62ff306733f 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 6a38d11 Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/17064/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17064/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17064/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          liuml07 Mingliang Liu added a comment -
          1. We don't have to call restoreStream() in testGetDatanodeInfo if it's already called in tearDown. Actually we can remove this method and inline its code in tearDown.
          2. I think we can still collect the out instead of err, and assert that the outs is empty. We don't have to assert on specific error message as it is free to change in the future. Asserting the ret value being -1 is enough.
            203	      /* collect outputs */
            204	      scanIntoList(err, outs);
            205	
            206	      /* verify results */
            207	      assertEquals(-1, ret);
            208	      assertEquals(
            209	          "expect to see 'Datanode unreachable.'",
            210	          1, outs.size());
            211	      assertThat(outs.get(0), containsString("Datanode unreachable"));
            

            Something like following:

            203	      /* collect outputs */
            204	      scanIntoList(out, outs);
            205	
            206	      /* verify results */
            207	      assertEquals(-1, ret);
            208	      assertTrue("Unexpected getDatanodeInfo stdout", outs.isEmpty());
            
          Show
          liuml07 Mingliang Liu added a comment - We don't have to call restoreStream() in testGetDatanodeInfo if it's already called in tearDown . Actually we can remove this method and inline its code in tearDown . I think we can still collect the out instead of err, and assert that the outs is empty. We don't have to assert on specific error message as it is free to change in the future. Asserting the ret value being -1 is enough. 203 /* collect outputs */ 204 scanIntoList(err, outs); 205 206 /* verify results */ 207 assertEquals(-1, ret); 208 assertEquals( 209 "expect to see 'Datanode unreachable.'" , 210 1, outs.size()); 211 assertThat(outs.get(0), containsString( "Datanode unreachable" )); Something like following: 203 /* collect outputs */ 204 scanIntoList(out, outs); 205 206 /* verify results */ 207 assertEquals(-1, ret); 208 assertTrue( "Unexpected getDatanodeInfo stdout" , outs.isEmpty());
          Hide
          xiaobingo Xiaobing Zhou added a comment -

          v002 added test for run on exception.

          Show
          xiaobingo Xiaobing Zhou added a comment - v002 added test for run on exception.
          Hide
          liuml07 Mingliang Liu added a comment -

          Can you add a failing case (e.g. no arguments provided) for this command? Otherwise +1.

          Show
          liuml07 Mingliang Liu added a comment - Can you add a failing case (e.g. no arguments provided) for this command? Otherwise +1.
          Hide
          hadoopqa Hadoop QA added a comment -
          +1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 16s Docker mode activated.
          +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 8m 36s trunk passed
          +1 compile 0m 46s trunk passed
          +1 checkstyle 0m 25s trunk passed
          +1 mvnsite 0m 53s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 45s trunk passed
          +1 javadoc 0m 43s trunk passed
          +1 mvninstall 0m 46s the patch passed
          +1 compile 0m 45s the patch passed
          +1 javac 0m 45s the patch passed
          -0 checkstyle 0m 23s hadoop-hdfs-project/hadoop-hdfs: The patch generated 5 new + 1 unchanged - 0 fixed = 6 total (was 1)
          +1 mvnsite 0m 49s the patch passed
          +1 mvneclipse 0m 9s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 47s the patch passed
          +1 javadoc 0m 37s the patch passed
          +1 unit 62m 39s hadoop-hdfs in the patch passed.
          +1 asflicense 0m 18s The patch does not generate ASF License warnings.
          83m 1s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Issue HDFS-10972
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832148/HDFS-10972.001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux d969b39058e9 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / c183b9d
          Default Java 1.8.0_101
          findbugs v3.0.0
          checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/17059/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17059/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17059/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 16s Docker mode activated. +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 8m 36s trunk passed +1 compile 0m 46s trunk passed +1 checkstyle 0m 25s trunk passed +1 mvnsite 0m 53s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 45s trunk passed +1 javadoc 0m 43s trunk passed +1 mvninstall 0m 46s the patch passed +1 compile 0m 45s the patch passed +1 javac 0m 45s the patch passed -0 checkstyle 0m 23s hadoop-hdfs-project/hadoop-hdfs: The patch generated 5 new + 1 unchanged - 0 fixed = 6 total (was 1) +1 mvnsite 0m 49s the patch passed +1 mvneclipse 0m 9s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 47s the patch passed +1 javadoc 0m 37s the patch passed +1 unit 62m 39s hadoop-hdfs in the patch passed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 83m 1s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10972 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832148/HDFS-10972.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux d969b39058e9 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / c183b9d Default Java 1.8.0_101 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/17059/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17059/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17059/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          xiaobingo Xiaobing Zhou added a comment -

          HDFS-10981 is filed to refactor DFSAdmin by removing print streams maintained within it.

          Show
          xiaobingo Xiaobing Zhou added a comment - HDFS-10981 is filed to refactor DFSAdmin by removing print streams maintained within it.
          Hide
          xiaobingo Xiaobing Zhou added a comment -

          Thank you Mingliang Liu for reviews. patch v001 fixed them.

          Show
          xiaobingo Xiaobing Zhou added a comment - Thank you Mingliang Liu for reviews. patch v001 fixed them.
          Hide
          hadoopqa Hadoop QA added a comment -
          +1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 11s Docker mode activated.
          +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 6m 33s trunk passed
          +1 compile 0m 43s trunk passed
          +1 checkstyle 0m 27s trunk passed
          +1 mvnsite 0m 51s trunk passed
          +1 mvneclipse 0m 11s trunk passed
          +1 findbugs 1m 41s trunk passed
          +1 javadoc 0m 37s trunk passed
          +1 mvninstall 0m 46s the patch passed
          +1 compile 0m 41s the patch passed
          +1 javac 0m 41s the patch passed
          -0 checkstyle 0m 26s hadoop-hdfs-project/hadoop-hdfs: The patch generated 12 new + 201 unchanged - 0 fixed = 213 total (was 201)
          +1 mvnsite 0m 47s the patch passed
          +1 mvneclipse 0m 10s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 44s the patch passed
          +1 javadoc 0m 36s the patch passed
          +1 unit 60m 1s hadoop-hdfs in the patch passed.
          +1 asflicense 0m 17s The patch does not generate ASF License warnings.
          77m 52s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Issue HDFS-10972
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832039/HDFS-10972.000.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux aab8ec5cfd9d 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 48b9d5f
          Default Java 1.8.0_101
          findbugs v3.0.0
          checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/17051/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17051/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17051/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 11s Docker mode activated. +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 6m 33s trunk passed +1 compile 0m 43s trunk passed +1 checkstyle 0m 27s trunk passed +1 mvnsite 0m 51s trunk passed +1 mvneclipse 0m 11s trunk passed +1 findbugs 1m 41s trunk passed +1 javadoc 0m 37s trunk passed +1 mvninstall 0m 46s the patch passed +1 compile 0m 41s the patch passed +1 javac 0m 41s the patch passed -0 checkstyle 0m 26s hadoop-hdfs-project/hadoop-hdfs: The patch generated 12 new + 201 unchanged - 0 fixed = 213 total (was 201) +1 mvnsite 0m 47s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 44s the patch passed +1 javadoc 0m 36s the patch passed +1 unit 60m 1s hadoop-hdfs in the patch passed. +1 asflicense 0m 17s The patch does not generate ASF License warnings. 77m 52s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10972 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832039/HDFS-10972.000.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux aab8ec5cfd9d 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 48b9d5f Default Java 1.8.0_101 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/17051/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17051/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17051/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          liuml07 Mingliang Liu added a comment -

          I found most of my comments can be addressed if you refer the tests in TestDFSAdminWithHA.java. Thanks.

          Show
          liuml07 Mingliang Liu added a comment - I found most of my comments can be addressed if you refer the tests in TestDFSAdminWithHA.java . Thanks.
          Hide
          liuml07 Mingliang Liu added a comment -

          Thanks for the patch. I think this UT is useful. I'll confirm that the command is not covered yet by the current tests.

          1. Adding support to redirect System.out in DFSAdmin per se is not preferred.
            final DFSAdmin dfsAdmin = new DFSAdmin(dfsConf, out, err);
            

            If your goal is to test the System.out output message, you can use System.setOut(). Code snippet like:

            final PrintStream stdout = System.out;
            try {
              final PrintStream out = new PrintStream();
              System.setOut(out);
              // ...
            } finally {
              System.setOut(stdout);
            }
            
          2. timeout is good for unit tests.
            142	  //@Test(timeout = 30000)
            143	  @Test
            
          3. scanIntoList() considered static?
          4. miniCluster can be used in try-with-resource style. Code snippet as:
            try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(dfsConf).numDataNodes(numDn).build()) {
              cluster.waitForActive();
              // ...
            }
            
          5. I don't like the coding style (IMHO, shorter is better, if not losing readability). Can you confirm that it adheres to the Hadoop coding guide?
            170	        /* invoke getDatanodeInfo */
            171	        final int ret = ToolRunner.run(
            172	            dfsAdmin,
            173	            new String[] {
            174	                "-getDatanodeInfo",
            175	                String.format(
            176	                    "%s:%d",
            177	                    dn.getXferAddress().getHostString(),
            178	                    dn.getIpcPort()) });
            179	
            
          6. Can you add failing message to the assertion assertEquals(1, outs.size()); as it's not straightforward why the size is 1 (one line per DN I guess?)
          Show
          liuml07 Mingliang Liu added a comment - Thanks for the patch. I think this UT is useful. I'll confirm that the command is not covered yet by the current tests. Adding support to redirect System.out in DFSAdmin per se is not preferred. final DFSAdmin dfsAdmin = new DFSAdmin(dfsConf, out, err); If your goal is to test the System.out output message, you can use System.setOut() . Code snippet like: final PrintStream stdout = System .out; try { final PrintStream out = new PrintStream(); System .setOut(out); // ... } finally { System .setOut(stdout); } timeout is good for unit tests. 142 //@Test(timeout = 30000) 143 @Test scanIntoList() considered static? miniCluster can be used in try-with-resource style. Code snippet as: try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(dfsConf).numDataNodes(numDn).build()) { cluster.waitForActive(); // ... } I don't like the coding style (IMHO, shorter is better, if not losing readability). Can you confirm that it adheres to the Hadoop coding guide? 170 /* invoke getDatanodeInfo */ 171 final int ret = ToolRunner.run( 172 dfsAdmin, 173 new String [] { 174 "-getDatanodeInfo" , 175 String .format( 176 "%s:%d" , 177 dn.getXferAddress().getHostString(), 178 dn.getIpcPort()) }); 179 Can you add failing message to the assertion assertEquals(1, outs.size()); as it's not straightforward why the size is 1 (one line per DN I guess?)
          Hide
          xiaobingo Xiaobing Zhou added a comment -

          v000 is posted for reviews, thanks.

          Show
          xiaobingo Xiaobing Zhou added a comment - v000 is posted for reviews, thanks.

            People

            • Assignee:
              xiaobingo Xiaobing Zhou
              Reporter:
              xiaobingo Xiaobing Zhou
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development