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

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


    }

    /** 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);
        }
View Full Code Here

TOP

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

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.