Example usage for org.apache.hadoop.mapred JobClient getClusterStatus

List of usage examples for org.apache.hadoop.mapred JobClient getClusterStatus

Introduction

In this page you can find the example usage for org.apache.hadoop.mapred JobClient getClusterStatus.

Prototype

public ClusterStatus getClusterStatus(boolean detailed) throws IOException 

Source Link

Document

Get status information about the Map-Reduce cluster.

Usage

From source file:org.apache.accumulo.server.test.continuous.ContinuousStatsCollector.java

License:Apache License

private static String getMRStats() throws Exception {
    Configuration conf = CachedConfiguration.getInstance();
    @SuppressWarnings("deprecation")
    JobClient jc = new JobClient(new org.apache.hadoop.mapred.JobConf(conf));

    ClusterStatus cs = jc.getClusterStatus(false);

    return "" + cs.getMapTasks() + " " + cs.getMaxMapTasks() + " " + cs.getReduceTasks() + " "
            + cs.getMaxReduceTasks() + " " + cs.getTaskTrackers() + " " + cs.getBlacklistedTrackers();

}

From source file:org.apache.accumulo.test.continuous.ContinuousStatsCollector.java

License:Apache License

private static String getMRStats() throws Exception {
    Configuration conf = CachedConfiguration.getInstance();
    // No alternatives for hadoop 20
    JobClient jc = new JobClient(new org.apache.hadoop.mapred.JobConf(conf));

    ClusterStatus cs = jc.getClusterStatus(false);

    return "" + cs.getMapTasks() + " " + cs.getMaxMapTasks() + " " + cs.getReduceTasks() + " "
            + cs.getMaxReduceTasks() + " " + cs.getTaskTrackers() + " " + cs.getBlacklistedTrackers();

}