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

BlockPlacementPolicyDefault should use default replication considerload value

    Details

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

      Description

      Now in method BlockPlacementPolicyDefault#initialize, it just uses value true as the replication considerload default value rather than using the existed string constant value DFS_NAMENODE_REPLICATION_CONSIDERLOAD_DEFAULT.

        @Override
        public void initialize(Configuration conf,  FSClusterStats stats,
                               NetworkTopology clusterMap, 
                               Host2NodesMap host2datanodeMap) {
          this.considerLoad = conf.getBoolean(
          DFSConfigKeys.DFS_NAMENODE_REPLICATION_CONSIDERLOAD_KEY, true);
          this.considerLoadFactor = conf.getDouble(
              DFSConfigKeys.DFS_NAMENODE_REPLICATION_CONSIDERLOAD_FACTOR,
              DFSConfigKeys.DFS_NAMENODE_REPLICATION_CONSIDERLOAD_FACTOR_DEFAULT);
          this.stats = stats;
          this.clusterMap = clusterMap;
          this.host2datanodeMap = host2datanodeMap;
          this.heartbeatInterval = conf.getLong(
              DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY,
              DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_DEFAULT) * 1000;
          this.tolerateHeartbeatMultiplier = conf.getInt(
              DFSConfigKeys.DFS_NAMENODE_TOLERATE_HEARTBEAT_MULTIPLIER_KEY,
              DFSConfigKeys.DFS_NAMENODE_TOLERATE_HEARTBEAT_MULTIPLIER_DEFAULT);
          this.staleInterval = conf.getLong(
              DFSConfigKeys.DFS_NAMENODE_STALE_DATANODE_INTERVAL_KEY, 
              DFSConfigKeys.DFS_NAMENODE_STALE_DATANODE_INTERVAL_DEFAULT);
          this.preferLocalNode = conf.getBoolean(
              DFSConfigKeys.
                  DFS_NAMENODE_BLOCKPLACEMENTPOLICY_DEFAULT_PREFER_LOCAL_NODE_KEY,
              DFSConfigKeys.
                  DFS_NAMENODE_BLOCKPLACEMENTPOLICY_DEFAULT_PREFER_LOCAL_NODE_DEFAULT);
        }
      

      And now the value DFS_NAMENODE_REPLICATION_CONSIDERLOAD_DEFAULT is not be used in any place.

        Activity

        Hide
        linyiqun Yiqun Lin added a comment -

        Attach a simple patch for this.

        Show
        linyiqun Yiqun Lin added a comment - Attach a simple patch for this.
        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 7m 6s trunk passed
        +1 compile 0m 53s trunk passed with JDK v1.8.0_77
        +1 compile 0m 43s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 21s trunk passed
        +1 mvnsite 0m 53s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 57s trunk passed
        +1 javadoc 1m 17s trunk passed with JDK v1.8.0_77
        +1 javadoc 1m 55s trunk passed with JDK v1.7.0_95
        +1 mvninstall 0m 49s the patch passed
        +1 compile 0m 51s the patch passed with JDK v1.8.0_77
        +1 javac 0m 51s the patch passed
        +1 compile 0m 41s the patch passed with JDK v1.7.0_95
        +1 javac 0m 41s the patch passed
        +1 checkstyle 0m 19s the patch passed
        +1 mvnsite 0m 52s the patch passed
        +1 mvneclipse 0m 11s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 2m 10s the patch passed
        +1 javadoc 1m 15s the patch passed with JDK v1.8.0_77
        +1 javadoc 1m 53s the patch passed with JDK v1.7.0_95
        -1 unit 100m 50s hadoop-hdfs in the patch failed with JDK v1.8.0_77.
        -1 unit 94m 31s hadoop-hdfs in the patch failed with JDK v1.7.0_95.
        +1 asflicense 0m 24s Patch does not generate ASF License warnings.
        222m 53s



        Reason Tests
        JDK v1.8.0_77 Failed junit tests hadoop.hdfs.server.datanode.TestDataNodeUUID
          hadoop.hdfs.TestDFSUpgradeFromImage
          hadoop.hdfs.server.blockmanagement.TestBlockManager
          hadoop.hdfs.shortcircuit.TestShortCircuitLocalRead
          hadoop.hdfs.server.datanode.TestDataNodeLifeline
          hadoop.hdfs.TestFileAppend
          hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure
          hadoop.fs.TestSymlinkHdfsFileContext
          hadoop.hdfs.server.datanode.TestDirectoryScanner
        JDK v1.7.0_95 Failed junit tests hadoop.hdfs.server.namenode.ha.TestEditLogTailer
          hadoop.hdfs.shortcircuit.TestShortCircuitCache
          hadoop.hdfs.shortcircuit.TestShortCircuitLocalRead
          hadoop.hdfs.TestDataTransferKeepalive
          hadoop.hdfs.security.TestDelegationTokenForProxyUser
          hadoop.metrics2.sink.TestRollingFileSystemSinkWithSecureHdfs
          hadoop.hdfs.server.namenode.TestNamenodeCapacityReport



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:fbe3e86
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12799170/HDFS-10302.001.patch
        JIRA Issue HDFS-10302
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux f2b1ce1a849b 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 / 67523ff
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_77 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/15182/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_77.txt
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/15182/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/15182/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_77.txt https://builds.apache.org/job/PreCommit-HDFS-Build/15182/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/15182/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/15182/console
        Powered by Apache Yetus 0.2.0 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 7m 6s trunk passed +1 compile 0m 53s trunk passed with JDK v1.8.0_77 +1 compile 0m 43s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 21s trunk passed +1 mvnsite 0m 53s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 57s trunk passed +1 javadoc 1m 17s trunk passed with JDK v1.8.0_77 +1 javadoc 1m 55s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 49s the patch passed +1 compile 0m 51s the patch passed with JDK v1.8.0_77 +1 javac 0m 51s the patch passed +1 compile 0m 41s the patch passed with JDK v1.7.0_95 +1 javac 0m 41s the patch passed +1 checkstyle 0m 19s the patch passed +1 mvnsite 0m 52s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 10s the patch passed +1 javadoc 1m 15s the patch passed with JDK v1.8.0_77 +1 javadoc 1m 53s the patch passed with JDK v1.7.0_95 -1 unit 100m 50s hadoop-hdfs in the patch failed with JDK v1.8.0_77. -1 unit 94m 31s hadoop-hdfs in the patch failed with JDK v1.7.0_95. +1 asflicense 0m 24s Patch does not generate ASF License warnings. 222m 53s Reason Tests JDK v1.8.0_77 Failed junit tests hadoop.hdfs.server.datanode.TestDataNodeUUID   hadoop.hdfs.TestDFSUpgradeFromImage   hadoop.hdfs.server.blockmanagement.TestBlockManager   hadoop.hdfs.shortcircuit.TestShortCircuitLocalRead   hadoop.hdfs.server.datanode.TestDataNodeLifeline   hadoop.hdfs.TestFileAppend   hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure   hadoop.fs.TestSymlinkHdfsFileContext   hadoop.hdfs.server.datanode.TestDirectoryScanner JDK v1.7.0_95 Failed junit tests hadoop.hdfs.server.namenode.ha.TestEditLogTailer   hadoop.hdfs.shortcircuit.TestShortCircuitCache   hadoop.hdfs.shortcircuit.TestShortCircuitLocalRead   hadoop.hdfs.TestDataTransferKeepalive   hadoop.hdfs.security.TestDelegationTokenForProxyUser   hadoop.metrics2.sink.TestRollingFileSystemSinkWithSecureHdfs   hadoop.hdfs.server.namenode.TestNamenodeCapacityReport Subsystem Report/Notes Docker Image:yetus/hadoop:fbe3e86 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12799170/HDFS-10302.001.patch JIRA Issue HDFS-10302 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux f2b1ce1a849b 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 / 67523ff Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_77 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/15182/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_77.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/15182/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/15182/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_77.txt https://builds.apache.org/job/PreCommit-HDFS-Build/15182/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/15182/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/15182/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
        Hide
        kihwal Kihwal Lee added a comment -

        +1

        Show
        kihwal Kihwal Lee added a comment - +1
        Hide
        kihwal Kihwal Lee added a comment -

        Committed this to trunk, branch-2 and branch-2.8. Thanks for fixing this, Yiqun Lin.

        Show
        kihwal Kihwal Lee added a comment - Committed this to trunk, branch-2 and branch-2.8. Thanks for fixing this, Yiqun Lin .
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #9626 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9626/)
        HDFS-10302. BlockPlacementPolicyDefault should use default replication (kihwal: rev d8b729e16fb253e6c84f414d419b5663d9219a43)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9626 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9626/ ) HDFS-10302 . BlockPlacementPolicyDefault should use default replication (kihwal: rev d8b729e16fb253e6c84f414d419b5663d9219a43) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
        Hide
        linyiqun Yiqun Lin added a comment -

        Thanks Kihwal Lee for quick review and commit!

        Show
        linyiqun Yiqun Lin added a comment - Thanks Kihwal Lee for quick review and commit!

          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