hadoop balancer 二

1.每次迭代一个datanode会移动不超过如下两者中较小的一个的数据量

   1)10G

   2)能力阈值 dfs.datanode.balance.bandwidthPerSec

  每次迭代时间不会超过20分钟

<p>The tool moves blocks from highly utilized datanodes to poorly
 * utilized datanodes iteratively. In each iteration a datanode moves or
 * receives no more than the lesser of 10G bytes or the threshold fraction
 * of its capacity. Each iteration runs no more than 20 minutes.
 * At the end of each iteration, the balancer obtains updated datanodes
 * information from the namenode.

2.balancer自动停止的情景

 * <p>The balancer automatically exits when any of the following five
 * conditions is satisfied:
 * <ol>
 * <li>The cluster is balanced;
 * <li>No block can be moved;
 * <li>No block has been moved for five consecutive iterations;
 * <li>An IOException occurs while communicating with the namenode;
 * <li>Another balancer is running.
 * </ol>

 <p>Upon exit, a balancer returns an exit code and prints one of the
 * following messages to the output file in corresponding to the above exit
 * reasons:
 * <ol>
 * <li>The cluster is balanced. Exiting
 * <li>No block can be moved. Exiting...
 * <li>No block has been moved for 5 iterations. Exiting...
 * <li>Received an IO exception: failure reason. Exiting...
 * <li>Another balancer is running. Exiting...
 * </ol>

 

3.一个datanode同时可用于balance的移动最大数

 /** The maximum number of concurrent blocks moves for
   * balancing purpose at a datanode
   */
  public static final int MAX_NUM_CONCURRENT_MOVES = 5;
  private static final int MAX_NO_PENDING_BLOCK_ITERATIONS = 5;
 

4.

 

posted on 2017-04-13 14:25  roger888  阅读(327)  评论(0编辑  收藏  举报

导航