浏览代码

HDFS-10297. Increase default balance bandwidth and concurrent moves. Contributed by John Zhuge.

Andrew Wang 9 年之前
父节点
当前提交
6be22ddbf1

+ 6 - 3
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java

@@ -87,9 +87,12 @@ public class DFSConfigKeys extends CommonConfigurationKeys {
   public static final String  DFS_NAMENODE_BACKUP_SERVICE_RPC_ADDRESS_KEY = "dfs.namenode.backup.dnrpc-address";
   public static final String  DFS_NAMENODE_BACKUP_SERVICE_RPC_ADDRESS_KEY = "dfs.namenode.backup.dnrpc-address";
   public static final String  DFS_DATANODE_BALANCE_BANDWIDTHPERSEC_KEY =
   public static final String  DFS_DATANODE_BALANCE_BANDWIDTHPERSEC_KEY =
       HdfsClientConfigKeys.DeprecatedKeys.DFS_DATANODE_BALANCE_BANDWIDTHPERSEC_KEY;
       HdfsClientConfigKeys.DeprecatedKeys.DFS_DATANODE_BALANCE_BANDWIDTHPERSEC_KEY;
-  public static final long    DFS_DATANODE_BALANCE_BANDWIDTHPERSEC_DEFAULT = 1024*1024;
-  public static final String  DFS_DATANODE_BALANCE_MAX_NUM_CONCURRENT_MOVES_KEY = "dfs.datanode.balance.max.concurrent.moves";
-  public static final int     DFS_DATANODE_BALANCE_MAX_NUM_CONCURRENT_MOVES_DEFAULT = 5;
+  public static final long    DFS_DATANODE_BALANCE_BANDWIDTHPERSEC_DEFAULT =
+      10 * 1024*1024;
+  public static final String  DFS_DATANODE_BALANCE_MAX_NUM_CONCURRENT_MOVES_KEY
+      = "dfs.datanode.balance.max.concurrent.moves";
+  public static final int
+      DFS_DATANODE_BALANCE_MAX_NUM_CONCURRENT_MOVES_DEFAULT = 50;
   @Deprecated
   @Deprecated
   public static final String  DFS_DATANODE_READAHEAD_BYTES_KEY =
   public static final String  DFS_DATANODE_READAHEAD_BYTES_KEY =
       HdfsClientConfigKeys.DFS_DATANODE_READAHEAD_BYTES_KEY;
       HdfsClientConfigKeys.DFS_DATANODE_READAHEAD_BYTES_KEY;

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml

@@ -856,7 +856,7 @@
 
 
 <property>
 <property>
   <name>dfs.datanode.balance.bandwidthPerSec</name>
   <name>dfs.datanode.balance.bandwidthPerSec</name>
-  <value>1048576</value>
+  <value>10m</value>
   <description>
   <description>
         Specifies the maximum amount of bandwidth that each datanode
         Specifies the maximum amount of bandwidth that each datanode
         can utilize for the balancing purpose in term of
         can utilize for the balancing purpose in term of
@@ -3409,7 +3409,7 @@
 
 
 <property>
 <property>
   <name>dfs.datanode.balance.max.concurrent.moves</name>
   <name>dfs.datanode.balance.max.concurrent.moves</name>
-  <value>5</value>
+  <value>50</value>
   <description>
   <description>
     Maximum number of threads for Datanode balancer pending moves.  This
     Maximum number of threads for Datanode balancer pending moves.  This
     value is reconfigurable via the "dfsadmin -reconfig" command.
     value is reconfigurable via the "dfsadmin -reconfig" command.