Package org.apache.hadoop.hdfs.server.balancer.Balancer

Examples of org.apache.hadoop.hdfs.server.balancer.Balancer.Target


          overLoadedBytes += (long) ((lowerRemainingThreshold - datanodeS.getCurrentRemaining())
              * datanodeS.getDatanode().getCapacity() / PERCENTAGE_BASE);
        }
      } else {
        // Below average utilized
        datanodeS = new Target(datanode, avgRemaining);
        bucket.addTarget((Target) datanodeS);
        clusterBucket.addTarget((Target) datanodeS);
        if (isUnderUtilized(datanodeS)) {
          underLoadedBytes += (long) ((datanodeS.getCurrentRemaining() - upperRemainingThreshold)
              * datanodeS.getDatanode().getCapacity() / PERCENTAGE_BASE);
View Full Code Here


    /** Updates the plan with all pairs of nodes from this bucket which need to be connected */
    public void updatePlan() {
      while (!this.sources.isEmpty() && !this.targets.isEmpty()) {
        Source source = this.sources.poll();
        Target target = this.targets.poll();
        if (!wasUrgent(source) && !wasUrgent(target)) {
          // Due to ordering of DataNodes we can skip the rest
          break;
        }
        long size = moveSize(source, target);
        if (size > 0) {
          scheduleTask(source, size, target);
        }
        if (source.getAvailableMoveSize() > 0) {
          this.sources.add(source);
        }
        if (target.getAvailableMoveSize() > 0) {
          this.targets.add(target);
        }
        // Loop termination:
        // In each step we either scheduleTask, therefore decreasing sum (over
        // all nodes) of availableMoveSize, or decrease number of nodes in
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.server.balancer.Balancer.Target

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.