Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10986

DFSAdmin should log detailed error message if any

    Details

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

      Description

      There are some subcommands in DFSAdmin that swallow IOException and give very limited error message, if any, to the stderr.

      $ hdfs dfsadmin -getBalancerBandwidth 127.0.0.1:9866
      Datanode unreachable.
      $ hdfs dfsadmin -getDatanodeInfo localhost:9866
      Datanode unreachable.
      $ hdfs dfsadmin -evictWriters 127.0.0.1:9866
      $ echo $?
      -1
      

      User is not able to get the exception stack even the LOG level is DEBUG. This is not very user friendly. Fortunately, if the port number is not accessible (say 9999), users can infer the detailed error message by IPC logs:

      $ hdfs dfsadmin -getBalancerBandwidth 127.0.0.1:9999
      2016-10-07 18:01:35,115 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
      2016-10-07 18:01:36,335 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9999. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
      .....
      2016-10-07 18:01:45,361 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9999. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
      2016-10-07 18:01:45,362 WARN ipc.Client: Failed to connect to server: localhost/127.0.0.1:9999: retries get failed due to exceeded maximum allowed retries number: 10
      java.net.ConnectException: Connection refused
      	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
      	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
              ...
      	at org.apache.hadoop.hdfs.tools.DFSAdmin.run(DFSAdmin.java:2073)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
      	at org.apache.hadoop.hdfs.tools.DFSAdmin.main(DFSAdmin.java:2225)
      Datanode unreachable.
      

      We should fix this by providing detailed error message. Actually, the DFSAdmin#run already handles exception carefully, including:

      1. set the exit ret value to -1
      2. print the error message
      3. log the exception stack trace (in DEBUG level)

      All we need to do is to not swallow exceptions without good reason.

      1. HDFS-10986.000.patch
        2 kB
        Mingliang Liu
      2. HDFS-10986.001.patch
        8 kB
        Mingliang Liu
      3. HDFS-10986.002.patch
        8 kB
        Mingliang Liu
      4. HDFS-10986.003.patch
        8 kB
        Mingliang Liu
      5. HDFS-10986.004.patch
        7 kB
        Brahma Reddy Battula
      6. HDFS-10986-branch-2.8.002.patch
        8 kB
        Mingliang Liu
      7. HDFS-10986-branch-2.8.003.patch
        8 kB
        Mingliang Liu
      8. HDFS-10986-branch-2.8.004.patch
        7 kB
        Brahma Reddy Battula

        Issue Links

          Activity

          Hide
          liuml07 Mingliang Liu added a comment -

          Kihwal Lee and Brahma Reddy Battula does this make sense to you? Thanks!

          Show
          liuml07 Mingliang Liu added a comment - Kihwal Lee and Brahma Reddy Battula does this make sense to you? Thanks!
          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 doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
          +1 mvninstall 7m 2s trunk passed
          +1 compile 0m 45s trunk passed
          +1 checkstyle 0m 27s trunk passed
          +1 mvnsite 0m 54s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 44s trunk passed
          +1 javadoc 0m 39s trunk passed
          +1 mvninstall 0m 45s the patch passed
          +1 compile 0m 44s the patch passed
          +1 javac 0m 44s the patch passed
          -0 checkstyle 0m 26s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 200 unchanged - 0 fixed = 201 total (was 200)
          +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 50s the patch passed
          +1 javadoc 0m 36s the patch passed
          -1 unit 57m 18s hadoop-hdfs in the patch failed.
          -1 asflicense 0m 20s The patch generated 1 ASF License warnings.
          76m 6s



          Reason Tests
          Timed out junit tests org.apache.hadoop.hdfs.server.namenode.ha.TestHASafeMode



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Issue HDFS-10986
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832234/HDFS-10986.000.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux c344f3c92da9 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
          checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/17065/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/17065/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17065/testReport/
          asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/17065/artifact/patchprocess/patch-asflicense-problems.txt
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17065/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 doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 7m 2s trunk passed +1 compile 0m 45s trunk passed +1 checkstyle 0m 27s trunk passed +1 mvnsite 0m 54s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 44s trunk passed +1 javadoc 0m 39s trunk passed +1 mvninstall 0m 45s the patch passed +1 compile 0m 44s the patch passed +1 javac 0m 44s the patch passed -0 checkstyle 0m 26s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 200 unchanged - 0 fixed = 201 total (was 200) +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 50s the patch passed +1 javadoc 0m 36s the patch passed -1 unit 57m 18s hadoop-hdfs in the patch failed. -1 asflicense 0m 20s The patch generated 1 ASF License warnings. 76m 6s Reason Tests Timed out junit tests org.apache.hadoop.hdfs.server.namenode.ha.TestHASafeMode Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10986 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832234/HDFS-10986.000.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux c344f3c92da9 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 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/17065/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/17065/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17065/testReport/ asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/17065/artifact/patchprocess/patch-asflicense-problems.txt modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17065/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Mingliang Liu thanks for pinging me.. +1 for doing this..

          Minor nits:
          1) Following import might not require...?
          import java.net.ConnectException;
          2) it will be nice,if we've testcase for this..Mainly when port is reachable..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Mingliang Liu thanks for pinging me.. +1 for doing this.. Minor nits: 1) Following import might not require...? import java.net.ConnectException; 2) it will be nice,if we've testcase for this..Mainly when port is reachable..
          Hide
          liuml07 Mingliang Liu added a comment -

          Thanks for your review, Brahma Reddy Battula. The v1 patch is to address both of your comments (which are very valid).

          Xiaobing Zhou In HDFS-10972 you created a new MiniDFSCluster in the test using the default cluster directory, which conflicts with the pre-setup class variable cluster (e.g. not able to find the edits dir etc). The reason is that the MiniDFSCluster will format every time we build a new one. Your test can pass regardless of this. This v1 patch, while adding more failing cases, also addressed that problem. Please confirm and review the test here. Thanks.

          Show
          liuml07 Mingliang Liu added a comment - Thanks for your review, Brahma Reddy Battula . The v1 patch is to address both of your comments (which are very valid). Xiaobing Zhou In HDFS-10972 you created a new MiniDFSCluster in the test using the default cluster directory, which conflicts with the pre-setup class variable cluster (e.g. not able to find the edits dir etc). The reason is that the MiniDFSCluster will format every time we build a new one. Your test can pass regardless of this. This v1 patch, while adding more failing cases, also addressed that problem. Please confirm and review the test here. Thanks.
          Hide
          hadoopqa Hadoop QA added a comment -
          +1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 12s 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 7m 28s trunk passed
          +1 compile 0m 42s trunk passed
          +1 checkstyle 0m 27s trunk passed
          +1 mvnsite 0m 50s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 38s trunk passed
          +1 javadoc 0m 40s trunk passed
          +1 mvninstall 0m 44s the patch passed
          +1 compile 0m 42s the patch passed
          +1 javac 0m 42s the patch passed
          +1 checkstyle 0m 24s the patch passed
          +1 mvnsite 0m 48s 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 59m 20s hadoop-hdfs in the patch passed.
          +1 asflicense 0m 19s The patch does not generate ASF License warnings.
          78m 11s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Issue HDFS-10986
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832579/HDFS-10986.001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux ba22a0b56351 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 / 96b1266
          Default Java 1.8.0_101
          findbugs v3.0.0
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17093/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17093/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 12s 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 7m 28s trunk passed +1 compile 0m 42s trunk passed +1 checkstyle 0m 27s trunk passed +1 mvnsite 0m 50s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 38s trunk passed +1 javadoc 0m 40s trunk passed +1 mvninstall 0m 44s the patch passed +1 compile 0m 42s the patch passed +1 javac 0m 42s the patch passed +1 checkstyle 0m 24s the patch passed +1 mvnsite 0m 48s 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 59m 20s hadoop-hdfs in the patch passed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 78m 11s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10986 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832579/HDFS-10986.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux ba22a0b56351 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 / 96b1266 Default Java 1.8.0_101 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17093/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17093/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 22s 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 48s trunk passed
          +1 compile 0m 43s trunk passed
          +1 checkstyle 0m 28s trunk passed
          +1 mvnsite 0m 51s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 40s trunk passed
          +1 javadoc 0m 40s trunk passed
          +1 mvninstall 0m 44s the patch passed
          +1 compile 0m 41s the patch passed
          +1 javac 0m 41s the patch passed
          +1 checkstyle 0m 25s the patch passed
          +1 mvnsite 0m 48s the patch passed
          +1 mvneclipse 0m 10s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 46s the patch passed
          +1 javadoc 0m 37s the patch passed
          -1 unit 78m 19s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 23s The patch does not generate ASF License warnings.
          96m 46s



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



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Issue HDFS-10986
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832584/HDFS-10986.002.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 7c60a3d22a5e 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 / 96b1266
          Default Java 1.8.0_101
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/17094/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17094/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17094/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 22s 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 48s trunk passed +1 compile 0m 43s trunk passed +1 checkstyle 0m 28s trunk passed +1 mvnsite 0m 51s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 40s trunk passed +1 javadoc 0m 40s trunk passed +1 mvninstall 0m 44s the patch passed +1 compile 0m 41s the patch passed +1 javac 0m 41s the patch passed +1 checkstyle 0m 25s the patch passed +1 mvnsite 0m 48s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 46s the patch passed +1 javadoc 0m 37s the patch passed -1 unit 78m 19s hadoop-hdfs in the patch failed. +1 asflicense 0m 23s The patch does not generate ASF License warnings. 96m 46s Reason Tests Failed junit tests hadoop.hdfs.server.namenode.ha.TestDFSUpgradeWithHA Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10986 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832584/HDFS-10986.002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 7c60a3d22a5e 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 / 96b1266 Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/17094/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17094/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17094/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 -

          Mingliang Liu thanks for the patch, LGTM. Minor comments:
          1. You might want to log it as warning or error msgs.

          234	      LOG.info("stderr: " + err);
          

          2. You may also want to have a sanity check in local build. I received err like

          java.lang.Exception: test timed out after 60000 milliseconds
          	at sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
          	at sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:198)
          	at sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:117)
          	at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
          	at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
          	at org.apache.hadoop.net.SocketIOWithTimeout$SelectorPool.select(SocketIOWithTimeout.java:335)
          	at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:203)
          	at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531)
          	at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:495)
          	at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:681)
          	at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:777)
          	at org.apache.hadoop.ipc.Client$Connection.access$3500(Client.java:408)
          	at org.apache.hadoop.ipc.Client.getConnection(Client.java:1542)
          	at org.apache.hadoop.ipc.Client.call(Client.java:1373)
          	at org.apache.hadoop.ipc.Client.call(Client.java:1337)
          	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:228)
          	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:116)
          	at com.sun.proxy.$Proxy26.getDatanodeInfo(Unknown Source)
          	at org.apache.hadoop.hdfs.protocolPB.ClientDatanodeProtocolTranslatorPB.getDatanodeInfo(ClientDatanodeProtocolTranslatorPB.java:270)
          	at org.apache.hadoop.hdfs.tools.DFSAdmin.getDatanodeInfo(DFSAdmin.java:2217)
          	at org.apache.hadoop.hdfs.tools.DFSAdmin.run(DFSAdmin.java:2079)
          	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
          	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
          	at org.apache.hadoop.hdfs.tools.TestDFSAdmin.testDFSAdminUnreachableDatanode(TestDFSAdmin.java:214)
          
          Show
          xiaobingo Xiaobing Zhou added a comment - Mingliang Liu thanks for the patch, LGTM. Minor comments: 1. You might want to log it as warning or error msgs. 234 LOG.info( "stderr: " + err); 2. You may also want to have a sanity check in local build. I received err like java.lang.Exception: test timed out after 60000 milliseconds at sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method) at sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:198) at sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:117) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) at org.apache.hadoop.net.SocketIOWithTimeout$SelectorPool.select(SocketIOWithTimeout.java:335) at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:203) at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531) at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:495) at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:681) at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:777) at org.apache.hadoop.ipc.Client$Connection.access$3500(Client.java:408) at org.apache.hadoop.ipc.Client.getConnection(Client.java:1542) at org.apache.hadoop.ipc.Client.call(Client.java:1373) at org.apache.hadoop.ipc.Client.call(Client.java:1337) at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:228) at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:116) at com.sun.proxy.$Proxy26.getDatanodeInfo(Unknown Source) at org.apache.hadoop.hdfs.protocolPB.ClientDatanodeProtocolTranslatorPB.getDatanodeInfo(ClientDatanodeProtocolTranslatorPB.java:270) at org.apache.hadoop.hdfs.tools.DFSAdmin.getDatanodeInfo(DFSAdmin.java:2217) at org.apache.hadoop.hdfs.tools.DFSAdmin.run(DFSAdmin.java:2079) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90) at org.apache.hadoop.hdfs.tools.TestDFSAdmin.testDFSAdminUnreachableDatanode(TestDFSAdmin.java:214)
          Hide
          liuml07 Mingliang Liu added a comment -

          Thanks for the review, Xiaobing Zhou.

          You might want to log it as warning or error msgs.

          234	      LOG.info("stderr: " + err);

          This is for test assistance readability. The stderr is expected instead of a real test error. In v3 patch, I merged the stdout/stderr with the assertion message; if the test fails, the failing message will have the detailed stderr/stdout message:

                assertTrue("Unexpected " + command + " stdout: " + out, outs.isEmpty());
                assertTrue("Unexpected " + command + " stderr: " + err,
                    err.toString().contains("Exception"));
          

          java.lang.Exception: test timed out after 60000 milliseconds

          The reason was that the previous test in HDFS-10972 is using 128.0.0.1 which is an external IP address. We can not depend on such resource and assume the 1234 port there is not responding. In v3 patch, I keep the connection failure case where we use the Xfer port instead of IPC port on localhost. The DFSAdmin will get "Datanode unreachable. java.io.EOFException" immediately and the test can pass locally.

          Show
          liuml07 Mingliang Liu added a comment - Thanks for the review, Xiaobing Zhou . You might want to log it as warning or error msgs. 234 LOG.info( "stderr: " + err); This is for test assistance readability. The stderr is expected instead of a real test error. In v3 patch, I merged the stdout/stderr with the assertion message; if the test fails, the failing message will have the detailed stderr/stdout message: assertTrue( "Unexpected " + command + " stdout: " + out, outs.isEmpty()); assertTrue( "Unexpected " + command + " stderr: " + err, err.toString().contains( "Exception" )); java.lang.Exception: test timed out after 60000 milliseconds The reason was that the previous test in HDFS-10972 is using 128.0.0.1 which is an external IP address. We can not depend on such resource and assume the 1234 port there is not responding. In v3 patch, I keep the connection failure case where we use the Xfer port instead of IPC port on localhost. The DFSAdmin will get "Datanode unreachable. java.io.EOFException" immediately and the test can pass locally.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 17s 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 10s trunk passed
          +1 compile 0m 51s trunk passed
          +1 checkstyle 0m 32s trunk passed
          +1 mvnsite 0m 54s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 48s trunk passed
          +1 javadoc 0m 40s trunk passed
          +1 mvninstall 0m 46s the patch passed
          +1 compile 0m 42s the patch passed
          +1 javac 0m 42s the patch passed
          +1 checkstyle 0m 26s the patch passed
          +1 mvnsite 0m 48s the patch passed
          +1 mvneclipse 0m 10s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 50s the patch passed
          +1 javadoc 0m 37s the patch passed
          -1 unit 62m 12s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 19s The patch does not generate ASF License warnings.
          82m 28s



          Reason Tests
          Failed junit tests hadoop.hdfs.server.blockmanagement.TestPendingInvalidateBlock



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Issue HDFS-10986
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832768/HDFS-10986.003.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 4df049cb694a 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 /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 8a09bf7
          Default Java 1.8.0_101
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/17110/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17110/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17110/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 17s 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 10s trunk passed +1 compile 0m 51s trunk passed +1 checkstyle 0m 32s trunk passed +1 mvnsite 0m 54s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 48s trunk passed +1 javadoc 0m 40s trunk passed +1 mvninstall 0m 46s the patch passed +1 compile 0m 42s the patch passed +1 javac 0m 42s the patch passed +1 checkstyle 0m 26s the patch passed +1 mvnsite 0m 48s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 50s the patch passed +1 javadoc 0m 37s the patch passed -1 unit 62m 12s hadoop-hdfs in the patch failed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 82m 28s Reason Tests Failed junit tests hadoop.hdfs.server.blockmanagement.TestPendingInvalidateBlock Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10986 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832768/HDFS-10986.003.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 4df049cb694a 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 /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 8a09bf7 Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/17110/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17110/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17110/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 -

          Brahma Reddy Battula Can you review the v3 patch? Thanks.

          Show
          liuml07 Mingliang Liu added a comment - Brahma Reddy Battula Can you review the v3 patch? Thanks.
          Hide
          xiaobingo Xiaobing Zhou added a comment -

          Good catch for the hard coded ip and port, thanks for the patch. LGTM +1.

          Show
          xiaobingo Xiaobing Zhou added a comment - Good catch for the hard coded ip and port, thanks for the patch. LGTM +1.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Looks Good to me.. will commit tomorrow if there are no objections.

          Show
          brahmareddy Brahma Reddy Battula added a comment - Looks Good to me.. will commit tomorrow if there are no objections.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Uploading the branch-2.8 patch for two reasons.
          a) jenkins didn't run on branch-2.8 patch.
          b) After HDFS-10965 following import is required.
          import org.apache.hadoop.hdfs.HdfsConfiguration;

          Committed to trunk and branch-2 and (b) is taken care while committing. will attach the committed patch once branch-2.8 jenkins report available(Seems jenkins will trigger only on one patch).

          Show
          brahmareddy Brahma Reddy Battula added a comment - Uploading the branch-2.8 patch for two reasons. a) jenkins didn't run on branch-2.8 patch. b) After HDFS-10965 following import is required. import org.apache.hadoop.hdfs.HdfsConfiguration; Committed to trunk and branch-2 and (b) is taken care while committing. will attach the committed patch once branch-2.8 jenkins report available(Seems jenkins will trigger only on one patch).
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10602 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10602/)
          HDFS-10986. DFSAdmin should log detailed error message if any. (brahma: rev 129125404244f35ee63b8f0491a095371685e9ba)

          • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
          • (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 #10602 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10602/ ) HDFS-10986 . DFSAdmin should log detailed error message if any. (brahma: rev 129125404244f35ee63b8f0491a095371685e9ba) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java
          Hide
          hadoopqa Hadoop QA added a comment -
          +1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 18s 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 9m 27s branch-2.8 passed
          +1 compile 0m 45s branch-2.8 passed with JDK v1.8.0_101
          +1 compile 0m 45s branch-2.8 passed with JDK v1.7.0_111
          +1 checkstyle 0m 24s branch-2.8 passed
          +1 mvnsite 0m 56s branch-2.8 passed
          +1 mvneclipse 0m 16s branch-2.8 passed
          +1 findbugs 1m 59s branch-2.8 passed
          +1 javadoc 0m 56s 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 44s 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 41s the patch passed with JDK v1.7.0_111
          +1 javac 0m 41s the patch passed
          -0 checkstyle 0m 21s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 204 unchanged - 1 fixed = 205 total (was 205)
          +1 mvnsite 0m 50s the patch passed
          +1 mvneclipse 0m 13s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 2m 7s the patch passed
          +1 javadoc 0m 55s the patch passed with JDK v1.8.0_101
          +1 javadoc 1m 33s the patch passed with JDK v1.7.0_111
          +1 unit 47m 24s hadoop-hdfs in the patch passed with JDK v1.7.0_111.
          +1 asflicense 0m 23s The patch does not generate ASF License warnings.
          125m 37s



          Reason Tests
          JDK v1.8.0_101 Failed junit tests hadoop.hdfs.server.namenode.ha.TestFailureToReadEdits



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:5af2af1
          JIRA Issue HDFS-10986
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12833155/HDFS-10986-branch-2.8.004.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux e90df1793285 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 /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision branch-2.8 / 78777d4
          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
          checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/17137/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
          JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17137/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17137/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 18s 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 9m 27s branch-2.8 passed +1 compile 0m 45s branch-2.8 passed with JDK v1.8.0_101 +1 compile 0m 45s branch-2.8 passed with JDK v1.7.0_111 +1 checkstyle 0m 24s branch-2.8 passed +1 mvnsite 0m 56s branch-2.8 passed +1 mvneclipse 0m 16s branch-2.8 passed +1 findbugs 1m 59s branch-2.8 passed +1 javadoc 0m 56s 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 44s 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 41s the patch passed with JDK v1.7.0_111 +1 javac 0m 41s the patch passed -0 checkstyle 0m 21s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 204 unchanged - 1 fixed = 205 total (was 205) +1 mvnsite 0m 50s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 2m 7s the patch passed +1 javadoc 0m 55s the patch passed with JDK v1.8.0_101 +1 javadoc 1m 33s the patch passed with JDK v1.7.0_111 +1 unit 47m 24s hadoop-hdfs in the patch passed with JDK v1.7.0_111. +1 asflicense 0m 23s The patch does not generate ASF License warnings. 125m 37s Reason Tests JDK v1.8.0_101 Failed junit tests hadoop.hdfs.server.namenode.ha.TestFailureToReadEdits Subsystem Report/Notes Docker Image:yetus/hadoop:5af2af1 JIRA Issue HDFS-10986 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12833155/HDFS-10986-branch-2.8.004.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux e90df1793285 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 /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision branch-2.8 / 78777d4 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 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/17137/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17137/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17137/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 -

          Thank you for taking care of this, Brahma Reddy Battula!

          Show
          liuml07 Mingliang Liu added a comment - Thank you for taking care of this, Brahma Reddy Battula !
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Pushed to branch-2.8 also..Thanks Mingliang Liu for your contribution and thanks to Xiaobing Zhou for review.

          Show
          brahmareddy Brahma Reddy Battula added a comment - Pushed to branch-2.8 also..Thanks Mingliang Liu for your contribution and thanks to Xiaobing Zhou for review.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Attaching the committed patch to trunk and branch-2 which is just include import org.apache.hadoop.hdfs.HdfsConfiguration;.

          Show
          brahmareddy Brahma Reddy Battula added a comment - Attaching the committed patch to trunk and branch-2 which is just include import org.apache.hadoop.hdfs.HdfsConfiguration; .

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development