Example usage for org.apache.hadoop.hdfs DFSConfigKeys DFS_BALANCER_MOVERTHREADS_KEY

List of usage examples for org.apache.hadoop.hdfs DFSConfigKeys DFS_BALANCER_MOVERTHREADS_KEY

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs DFSConfigKeys DFS_BALANCER_MOVERTHREADS_KEY.

Prototype

String DFS_BALANCER_MOVERTHREADS_KEY

To view the source code for org.apache.hadoop.hdfs DFSConfigKeys DFS_BALANCER_MOVERTHREADS_KEY.

Click Source Link

Usage

From source file:mzb.Balancer.java

License:Apache License

/**
 * Construct a balancer./*from w ww  .j  ava  2 s  . c  o  m*/
 * Initialize balancer. It sets the value of the threshold, and 
 * builds the communication proxies to
 * namenode as a client and a secondary namenode and retry proxies
 * when connection fails.
 */
Balancer(NameNodeConnector theblockpool, Configuration conf) {
    //this.threshold = p.threshold;
    //this.policy = p.policy;
    this.nnc = theblockpool;
    cluster = NetworkTopology.getInstance(conf);

    this.moverExecutor = Executors.newFixedThreadPool(conf.getInt(DFSConfigKeys.DFS_BALANCER_MOVERTHREADS_KEY,
            DFSConfigKeys.DFS_BALANCER_MOVERTHREADS_DEFAULT));
    this.dispatcherExecutor = Executors
            .newFixedThreadPool(conf.getInt(DFSConfigKeys.DFS_BALANCER_DISPATCHERTHREADS_KEY,
                    DFSConfigKeys.DFS_BALANCER_DISPATCHERTHREADS_DEFAULT));
}