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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: