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

"Bytes Being Moved" -ve(-1 B) when cluster was already balanced.

    Details

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

      Description

      Run balancer when there is no over and under utlized nodes.

      16/02/29 02:39:40 INFO net.NetworkTopology: Adding a new node: /default-rack/**.120:50076
      16/02/29 02:39:40 INFO net.NetworkTopology: Adding a new node: /default-rack/**.121:50076
      16/02/29 02:39:40 INFO net.NetworkTopology: Adding a new node: /default-rack/**.122:50076
      16/02/29 02:39:41 INFO balancer.Balancer: 0 over-utilized: []
      16/02/29 02:39:41 INFO balancer.Balancer: 0 underutilized: []
      The cluster is balanced. Exiting...
      Feb 29, 2016 2:40:57 AM           0                  0 B                 0 B               -1 B
      
      1. HDFS-9871.patch
        1 kB
        Brahma Reddy Battula
      2. HDFS-9871-002.patch
        1 kB
        Brahma Reddy Battula

        Activity

        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 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 8m 59s trunk passed
        +1 compile 1m 24s trunk passed with JDK v1.8.0_72
        +1 compile 0m 59s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 30s trunk passed
        +1 mvnsite 1m 17s trunk passed
        +1 mvneclipse 0m 17s trunk passed
        +1 findbugs 2m 36s trunk passed
        +1 javadoc 1m 43s trunk passed with JDK v1.8.0_72
        +1 javadoc 2m 29s trunk passed with JDK v1.7.0_95
        +1 mvninstall 1m 5s the patch passed
        +1 compile 1m 14s the patch passed with JDK v1.8.0_72
        +1 javac 1m 14s the patch passed
        +1 compile 0m 58s the patch passed with JDK v1.7.0_95
        +1 javac 0m 58s the patch passed
        +1 checkstyle 0m 24s the patch passed
        +1 mvnsite 1m 11s the patch passed
        +1 mvneclipse 0m 14s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 2m 43s the patch passed
        +1 javadoc 1m 45s the patch passed with JDK v1.8.0_72
        +1 javadoc 1m 58s the patch passed with JDK v1.7.0_95
        -1 unit 109m 34s hadoop-hdfs in the patch failed with JDK v1.8.0_72.
        -1 unit 99m 19s hadoop-hdfs in the patch failed with JDK v1.7.0_95.
        +1 asflicense 0m 35s Patch does not generate ASF License warnings.
        244m 24s



        Reason Tests
        JDK v1.8.0_72 Failed junit tests hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped
          hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure
          hadoop.hdfs.server.datanode.TestBlockReplacement
          hadoop.hdfs.server.datanode.TestDirectoryScanner
        JDK v1.8.0_72 Timed out junit tests org.apache.hadoop.hdfs.TestLeaseRecovery2
        JDK v1.7.0_95 Failed junit tests hadoop.hdfs.server.namenode.ha.TestBootstrapStandby
          hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency
          hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl
          hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure
          hadoop.hdfs.server.datanode.TestBlockReplacement
          hadoop.hdfs.server.datanode.TestDirectoryScanner



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12790434/HDFS-9871.patch
        JIRA Issue HDFS-9871
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 1f9b545a51fa 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 / e3ac231
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_72 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14652/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_72.txt
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14652/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt
        unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14652/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_72.txt https://builds.apache.org/job/PreCommit-HDFS-Build/14652/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14652/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14652/console
        Powered by Apache Yetus 0.2.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 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 8m 59s trunk passed +1 compile 1m 24s trunk passed with JDK v1.8.0_72 +1 compile 0m 59s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 30s trunk passed +1 mvnsite 1m 17s trunk passed +1 mvneclipse 0m 17s trunk passed +1 findbugs 2m 36s trunk passed +1 javadoc 1m 43s trunk passed with JDK v1.8.0_72 +1 javadoc 2m 29s trunk passed with JDK v1.7.0_95 +1 mvninstall 1m 5s the patch passed +1 compile 1m 14s the patch passed with JDK v1.8.0_72 +1 javac 1m 14s the patch passed +1 compile 0m 58s the patch passed with JDK v1.7.0_95 +1 javac 0m 58s the patch passed +1 checkstyle 0m 24s the patch passed +1 mvnsite 1m 11s the patch passed +1 mvneclipse 0m 14s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 43s the patch passed +1 javadoc 1m 45s the patch passed with JDK v1.8.0_72 +1 javadoc 1m 58s the patch passed with JDK v1.7.0_95 -1 unit 109m 34s hadoop-hdfs in the patch failed with JDK v1.8.0_72. -1 unit 99m 19s hadoop-hdfs in the patch failed with JDK v1.7.0_95. +1 asflicense 0m 35s Patch does not generate ASF License warnings. 244m 24s Reason Tests JDK v1.8.0_72 Failed junit tests hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure   hadoop.hdfs.server.datanode.TestBlockReplacement   hadoop.hdfs.server.datanode.TestDirectoryScanner JDK v1.8.0_72 Timed out junit tests org.apache.hadoop.hdfs.TestLeaseRecovery2 JDK v1.7.0_95 Failed junit tests hadoop.hdfs.server.namenode.ha.TestBootstrapStandby   hadoop.hdfs.server.namenode.TestNameNodeMetadataConsistency   hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure   hadoop.hdfs.server.datanode.TestBlockReplacement   hadoop.hdfs.server.datanode.TestDirectoryScanner Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12790434/HDFS-9871.patch JIRA Issue HDFS-9871 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 1f9b545a51fa 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 / e3ac231 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_72 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/14652/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_72.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/14652/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14652/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_72.txt https://builds.apache.org/job/PreCommit-HDFS-Build/14652/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14652/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14652/console Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        Testcase failures are unrelated..

        Show
        brahmareddy Brahma Reddy Battula added a comment - Testcase failures are unrelated..
        Hide
        shahrs87 Rushabh S Shah added a comment -

        It seems like -1 is used as a default value.

        Balancer.java
        Result newResult(ExitStatus exitStatus) {
            return new Result(exitStatus, -1, -1, dispatcher.getBytesMoved());
          }
        

        Do we also need to change the above method to initialize the Result with bytesLeftToMove and bytesBeingMoved to 0 just to be consistent.

        Show
        shahrs87 Rushabh S Shah added a comment - It seems like -1 is used as a default value. Balancer.java Result newResult(ExitStatus exitStatus) { return new Result(exitStatus, -1, -1, dispatcher.getBytesMoved()); } Do we also need to change the above method to initialize the Result with bytesLeftToMove and bytesBeingMoved to 0 just to be consistent.
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        Rushabh S Shah thanks for taking a look..Yes, we can change..updated the patch based on your comment..

        Show
        brahmareddy Brahma Reddy Battula added a comment - Rushabh S Shah thanks for taking a look..Yes, we can change..updated the patch based on your comment..
        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 6m 33s trunk passed
        +1 compile 0m 40s trunk passed with JDK v1.8.0_74
        +1 compile 0m 40s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 20s trunk passed
        +1 mvnsite 0m 52s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 58s trunk passed
        +1 javadoc 1m 3s trunk passed with JDK v1.8.0_74
        +1 javadoc 1m 44s trunk passed with JDK v1.7.0_95
        +1 mvninstall 0m 47s the patch passed
        +1 compile 0m 38s the patch passed with JDK v1.8.0_74
        +1 javac 0m 38s the patch passed
        +1 compile 0m 39s the patch passed with JDK v1.7.0_95
        +1 javac 0m 39s the patch passed
        +1 checkstyle 0m 18s the patch passed
        +1 mvnsite 0m 49s the patch passed
        +1 mvneclipse 0m 11s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 2m 7s the patch passed
        +1 javadoc 1m 2s the patch passed with JDK v1.8.0_74
        +1 javadoc 1m 44s the patch passed with JDK v1.7.0_95
        +1 unit 54m 12s hadoop-hdfs in the patch passed with JDK v1.8.0_74.
        -1 unit 55m 23s hadoop-hdfs in the patch failed with JDK v1.7.0_95.
        +1 asflicense 0m 22s Patch does not generate ASF License warnings.
        134m 26s



        Reason Tests
        JDK v1.7.0_95 Failed junit tests hadoop.hdfs.server.balancer.TestBalancer



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12791387/HDFS-9871-002.patch
        JIRA Issue HDFS-9871
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux b32ce9f13e3e 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 / ff0ee84
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14715/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt
        unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14715/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14715/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14715/console
        Powered by Apache Yetus 0.3.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 6m 33s trunk passed +1 compile 0m 40s trunk passed with JDK v1.8.0_74 +1 compile 0m 40s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 20s trunk passed +1 mvnsite 0m 52s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 58s trunk passed +1 javadoc 1m 3s trunk passed with JDK v1.8.0_74 +1 javadoc 1m 44s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 47s the patch passed +1 compile 0m 38s the patch passed with JDK v1.8.0_74 +1 javac 0m 38s the patch passed +1 compile 0m 39s the patch passed with JDK v1.7.0_95 +1 javac 0m 39s the patch passed +1 checkstyle 0m 18s the patch passed +1 mvnsite 0m 49s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 7s the patch passed +1 javadoc 1m 2s the patch passed with JDK v1.8.0_74 +1 javadoc 1m 44s the patch passed with JDK v1.7.0_95 +1 unit 54m 12s hadoop-hdfs in the patch passed with JDK v1.8.0_74. -1 unit 55m 23s hadoop-hdfs in the patch failed with JDK v1.7.0_95. +1 asflicense 0m 22s Patch does not generate ASF License warnings. 134m 26s Reason Tests JDK v1.7.0_95 Failed junit tests hadoop.hdfs.server.balancer.TestBalancer Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12791387/HDFS-9871-002.patch JIRA Issue HDFS-9871 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux b32ce9f13e3e 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 / ff0ee84 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/14715/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14715/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_95.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14715/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14715/console Powered by Apache Yetus 0.3.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        shahrs87 Rushabh S Shah added a comment -

        ltgm. +1 (non-binding)

        Show
        shahrs87 Rushabh S Shah added a comment - ltgm. +1 (non-binding)
        Hide
        ajisakaa Akira Ajisaka added a comment -

        I suspect that there are some reason to use -1 as default value. Hi Tsz Wo Nicholas Sze, do you have any comment for this issue? Looks like this issue occurs after HDFS-7364.

        Show
        ajisakaa Akira Ajisaka added a comment - I suspect that there are some reason to use -1 as default value. Hi Tsz Wo Nicholas Sze , do you have any comment for this issue? Looks like this issue occurs after HDFS-7364 .
        Hide
        szetszwo Tsz Wo Nicholas Sze added a comment -

        The value -1 means that it is not applicable (or not calculated). For SUCCESS, it is fine to put 0 to bytesBeingMoved. However, for the exception cases, we should put -1 for both bytesLeftToMove and bytesBeingMoved. I.e. the first patch is better than the second patch. Thanks.

        Show
        szetszwo Tsz Wo Nicholas Sze added a comment - The value -1 means that it is not applicable (or not calculated). For SUCCESS, it is fine to put 0 to bytesBeingMoved. However, for the exception cases, we should put -1 for both bytesLeftToMove and bytesBeingMoved. I.e. the first patch is better than the second patch. Thanks.
        Hide
        vinayrpet Vinayakumar B added a comment -

        Thanks for the confirmation Tsz Wo Nicholas Sze.
        Will commit HDFS-9871.patch later tonight.

        Show
        vinayrpet Vinayakumar B added a comment - Thanks for the confirmation Tsz Wo Nicholas Sze . Will commit HDFS-9871 .patch later tonight.
        Hide
        vinayrpet Vinayakumar B added a comment -

        Committed to branch-2.8 and above.
        Thanks Brahma Reddy Battula for the contribution.
        Thanks Tsz Wo Nicholas Sze,Akira Ajisaka and Rushabh S Shah

        Show
        vinayrpet Vinayakumar B added a comment - Committed to branch-2.8 and above. Thanks Brahma Reddy Battula for the contribution. Thanks Tsz Wo Nicholas Sze , Akira Ajisaka and Rushabh S Shah
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        Thanks Vinayakumar B for review and commit and thanks to others for reviewing.

        Show
        brahmareddy Brahma Reddy Battula added a comment - Thanks Vinayakumar B for review and commit and thanks to others for reviewing.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #9517 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9517/)
        HDFS-9871. "Bytes Being Moved" -ve(-1 B) when cluster was already (vinayakumarb: rev 1f004b3367c57de9e8a67040a57efc31c9ba8ee2)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9517 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9517/ ) HDFS-9871 . "Bytes Being Moved" -ve(-1 B) when cluster was already (vinayakumarb: rev 1f004b3367c57de9e8a67040a57efc31c9ba8ee2) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java

          People

          • Assignee:
            brahmareddy Brahma Reddy Battula
            Reporter:
            brahmareddy Brahma Reddy Battula
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development