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

Log message when DN is not selected for block replication

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha2
    • Fix Version/s: 2.9.0, 3.0.0-alpha4
    • Component/s: None
    • Labels:
      None

      Description

      In HDFS-8946, a important message was removed.

      if (requiredSize > remaining - scheduledSize) {
            logNodeIsNotChosen(storage, "the node does not have enough "
                + storage.getStorageType() + " space"
                + " (required=" + requiredSize
                + ", scheduled=" + scheduledSize
                + ", remaining=" + remaining + ")");
            return false;
          }
      

      This log is important since it can tell us why DN is not selected for block replication. And it will be good for us to debug issues.

      1. HDFS-11494.001.patch
        0.9 kB
        Yiqun Lin
      2. HDFS-11494.002.patch
        0.9 kB
        Yiqun Lin

        Issue Links

          Activity

          Hide
          linyiqun Yiqun Lin added a comment -

          Committed to branch-2 as I see the commit for branch-2 was missing. Thanks Mingliang Liu!

          Show
          linyiqun Yiqun Lin added a comment - Committed to branch-2 as I see the commit for branch-2 was missing. Thanks Mingliang Liu !
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11347 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11347/)
          HDFS-11494. Log message when DN is not selected for block replication. (liuml07: rev 0f336bab9c070e0cdc935df4305084a036e2def7)

          • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11347 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11347/ ) HDFS-11494 . Log message when DN is not selected for block replication. (liuml07: rev 0f336bab9c070e0cdc935df4305084a036e2def7) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java
          Hide
          liuml07 Mingliang Liu added a comment - - edited

          +1
          Failing tests are not related.
          Committed to trunk and branch-2 branches. Thanks for your contribution Yiqun Lin.

          Show
          liuml07 Mingliang Liu added a comment - - edited +1 Failing tests are not related. Committed to trunk and branch-2 branches. Thanks for your contribution Yiqun Lin .
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 14s 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 12m 48s trunk passed
          +1 compile 0m 47s trunk passed
          +1 checkstyle 0m 36s trunk passed
          +1 mvnsite 0m 52s trunk passed
          +1 mvneclipse 0m 13s trunk passed
          +1 findbugs 1m 44s trunk passed
          +1 javadoc 0m 42s trunk passed
          +1 mvninstall 0m 51s the patch passed
          +1 compile 0m 47s the patch passed
          +1 javac 0m 47s the patch passed
          +1 checkstyle 0m 34s the patch passed
          +1 mvnsite 0m 54s the patch passed
          +1 mvneclipse 0m 11s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 56s the patch passed
          +1 javadoc 0m 38s the patch passed
          -1 unit 71m 26s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 21s The patch does not generate ASF License warnings.
          96m 50s



          Reason Tests
          Failed junit tests hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure
            hadoop.hdfs.web.TestWebHdfsTimeouts
            hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:a9ad5d6
          JIRA Issue HDFS-11494
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12856018/HDFS-11494.002.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 70a092ede4e8 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 279d187
          Default Java 1.8.0_121
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/18553/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/18553/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/18553/console
          Powered by Apache Yetus 0.5.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 14s 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 12m 48s trunk passed +1 compile 0m 47s trunk passed +1 checkstyle 0m 36s trunk passed +1 mvnsite 0m 52s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 44s trunk passed +1 javadoc 0m 42s trunk passed +1 mvninstall 0m 51s the patch passed +1 compile 0m 47s the patch passed +1 javac 0m 47s the patch passed +1 checkstyle 0m 34s the patch passed +1 mvnsite 0m 54s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 56s the patch passed +1 javadoc 0m 38s the patch passed -1 unit 71m 26s hadoop-hdfs in the patch failed. +1 asflicense 0m 21s The patch does not generate ASF License warnings. 96m 50s Reason Tests Failed junit tests hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure   hadoop.hdfs.web.TestWebHdfsTimeouts   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HDFS-11494 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12856018/HDFS-11494.002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 70a092ede4e8 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 279d187 Default Java 1.8.0_121 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/18553/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/18553/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/18553/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          linyiqun Yiqun Lin added a comment -

          By the way, the sample log message is still the same?

          Yes, I have verified the log, it is same.

          Show
          linyiqun Yiqun Lin added a comment - By the way, the sample log message is still the same? Yes, I have verified the log, it is same.
          Hide
          liuml07 Mingliang Liu added a comment -

          Thanks, looks good to me. By the way, the sample log message is still the same?

          Show
          liuml07 Mingliang Liu added a comment - Thanks, looks good to me. By the way, the sample log message is still the same?
          Hide
          linyiqun Yiqun Lin added a comment -

          Good catch, Mingliang Liu!
          Actually there is a chance the storage is null. Here should be use t to replace that. t is required storage type and should never be null (see this comment: https://issues.apache.org/jira/browse/HDFS-8946?focusedCommentId=14713409&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14713409).
          Attach a new patch. Please have a review.

          Show
          linyiqun Yiqun Lin added a comment - Good catch, Mingliang Liu ! Actually there is a chance the storage is null. Here should be use t to replace that. t is required storage type and should never be null (see this comment: https://issues.apache.org/jira/browse/HDFS-8946?focusedCommentId=14713409&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14713409 ). Attach a new patch. Please have a review.
          Hide
          liuml07 Mingliang Liu added a comment -

          When logging, storage can be null?

          Show
          liuml07 Mingliang Liu added a comment - When logging, storage can be null?
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 21s 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 13m 1s trunk passed
          +1 compile 0m 48s trunk passed
          +1 checkstyle 0m 35s trunk passed
          +1 mvnsite 0m 57s trunk passed
          +1 mvneclipse 0m 15s trunk passed
          +1 findbugs 2m 3s trunk passed
          +1 javadoc 0m 48s trunk passed
          +1 mvninstall 1m 2s the patch passed
          +1 compile 0m 56s the patch passed
          +1 javac 0m 56s the patch passed
          +1 checkstyle 0m 37s the patch passed
          +1 mvnsite 1m 3s the patch passed
          +1 mvneclipse 0m 13s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 2m 10s the patch passed
          +1 javadoc 0m 43s the patch passed
          -1 unit 72m 25s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 20s The patch does not generate ASF License warnings.
          99m 46s



          Reason Tests
          Failed junit tests hadoop.hdfs.server.datanode.TestReadOnlySharedStorage
            hadoop.hdfs.server.namenode.TestQuotaByStorageType
            hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean
            hadoop.hdfs.server.namenode.TestDiskspaceQuotaUpdate
            hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting
            hadoop.hdfs.server.datanode.TestDataNodeLifeline



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:a9ad5d6
          JIRA Issue HDFS-11494
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12855853/HDFS-11494.001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 2c758bbaed52 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / eb5a179
          Default Java 1.8.0_121
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/18538/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/18538/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/18538/console
          Powered by Apache Yetus 0.5.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 21s 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 13m 1s trunk passed +1 compile 0m 48s trunk passed +1 checkstyle 0m 35s trunk passed +1 mvnsite 0m 57s trunk passed +1 mvneclipse 0m 15s trunk passed +1 findbugs 2m 3s trunk passed +1 javadoc 0m 48s trunk passed +1 mvninstall 1m 2s the patch passed +1 compile 0m 56s the patch passed +1 javac 0m 56s the patch passed +1 checkstyle 0m 37s the patch passed +1 mvnsite 1m 3s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 2m 10s the patch passed +1 javadoc 0m 43s the patch passed -1 unit 72m 25s hadoop-hdfs in the patch failed. +1 asflicense 0m 20s The patch does not generate ASF License warnings. 99m 46s Reason Tests Failed junit tests hadoop.hdfs.server.datanode.TestReadOnlySharedStorage   hadoop.hdfs.server.namenode.TestQuotaByStorageType   hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean   hadoop.hdfs.server.namenode.TestDiskspaceQuotaUpdate   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailureReporting   hadoop.hdfs.server.datanode.TestDataNodeLifeline Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HDFS-11494 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12855853/HDFS-11494.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 2c758bbaed52 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / eb5a179 Default Java 1.8.0_121 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/18538/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/18538/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/18538/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          linyiqun Yiqun Lin added a comment - - edited

          Patch attached. The sample output log:

          2017-03-03 21:06:01,026 [main] DEBUG  blockmanagement.DatanodeDescriptor (DatanodeDescriptor.java:chooseStorage4Block(681)) - The node 127.0.0.1:9866 does not have enough DISK space (required=10, scheduled=0, remaining=0).
          

          Kindly review. Thanks.

          Show
          linyiqun Yiqun Lin added a comment - - edited Patch attached. The sample output log: 2017-03-03 21:06:01,026 [main] DEBUG blockmanagement.DatanodeDescriptor (DatanodeDescriptor.java:chooseStorage4Block(681)) - The node 127.0.0.1:9866 does not have enough DISK space (required=10, scheduled=0, remaining=0). Kindly review. Thanks.

            People

            • Assignee:
              linyiqun Yiqun Lin
              Reporter:
              linyiqun Yiqun Lin
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development