[ https://issues.apache.org/jira/browse/HDFS-10302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15245607#comment-15245607 ]
Kihwal Lee commented on HDFS-10302: ----------------------------------- +1 > BlockPlacementPolicyDefault should use default replication considerload value > ----------------------------------------------------------------------------- > > Key: HDFS-10302 > URL: https://issues.apache.org/jira/browse/HDFS-10302 > Project: Hadoop HDFS > Issue Type: Improvement > Affects Versions: 2.7.1 > Reporter: Lin Yiqun > Assignee: Lin Yiqun > Priority: Trivial > Attachments: HDFS-10302.001.patch > > > 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}}. > {code} > @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); > } > {code} > And now the value {{DFS_NAMENODE_REPLICATION_CONSIDERLOAD_DEFAULT}} is not be > used in any place. -- This message was sent by Atlassian JIRA (v6.3.4#6332)