Java 类org.apache.hadoop.hdfs.server.balancer.Balancer 实例源码

项目:hadoop-EAR    文件:DataXceiverServer.java   
DataXceiverServer(ServerSocket ss, Configuration conf, 
    DataNode datanode) {

  this.ss = ss;
  this.datanode = datanode;

  this.maxXceiverCount = conf.getInt("dfs.datanode.max.xcievers",
      MAX_XCEIVER_COUNT);

  this.estimateBlockSize = conf.getLong("dfs.block.size", DEFAULT_BLOCK_SIZE);

  //set up parameter for cluster balancing
  this.balanceThrottler = new BlockBalanceThrottler(
    conf.getLong("dfs.balance.bandwidthPerSec", 1024L*1024),
       Math.max(Balancer.MAX_NUM_CONCURRENT_MOVES, 
         conf.getInt("dfs.balance.maxNumThreads",
                     Balancer.MAX_NUM_CONCURRENT_MOVES)));
}
项目:hadoop-plus    文件:DataXceiverServer.java   
/** Check if the block move can start. 
 * 
 * Return true if the thread quota is not exceeded and 
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}
项目:hops    文件:DataXceiverServer.java   
/**
 * Check if the block move can start.
 * <p/>
 * Return true if the thread quota is not exceeded and
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}
项目:hadoop-TCP    文件:DataXceiverServer.java   
/** Check if the block move can start. 
 * 
 * Return true if the thread quota is not exceeded and 
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}
项目:hadoop-on-lustre    文件:DataXceiverServer.java   
/** Check if the block move can start. 
 * 
 * Return true if the thread quota is not exceeded and 
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}
项目:hardfs    文件:DataXceiverServer.java   
/** Check if the block move can start. 
 * 
 * Return true if the thread quota is not exceeded and 
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}
项目:hadoop-on-lustre2    文件:DataXceiverServer.java   
/** Check if the block move can start. 
 * 
 * Return true if the thread quota is not exceeded and 
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}
项目:cumulus    文件:DataXceiverServer.java   
/** Check if the block move can start. 
 * 
 * Return true if the thread quota is not exceeded and 
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}
项目:RDFS    文件:DataXceiverServer.java   
/** Check if the block move can start. 
 * 
 * Return true if the thread quota is not exceeded and 
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}
项目:hadoop-0.20    文件:DataXceiverServer.java   
/** Check if the block move can start. 
 * 
 * Return true if the thread quota is not exceeded and 
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}
项目:hortonworks-extension    文件:DataXceiverServer.java   
/** Check if the block move can start. 
 * 
 * Return true if the thread quota is not exceeded and 
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}
项目:hortonworks-extension    文件:DataXceiverServer.java   
/** Check if the block move can start. 
 * 
 * Return true if the thread quota is not exceeded and 
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}
项目:hadoop-gpu    文件:DataXceiverServer.java   
/** Check if the block move can start. 
 * 
 * Return true if the thread quota is not exceeded and 
 * the counter is incremented; False otherwise.
 */
synchronized boolean acquire() {
  if (numThreads >= Balancer.MAX_NUM_CONCURRENT_MOVES) {
    return false;
  }
  numThreads++;
  return true;
}