Example usage for org.apache.hadoop.mapreduce ClusterMetrics ClusterMetrics

List of usage examples for org.apache.hadoop.mapreduce ClusterMetrics ClusterMetrics

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce ClusterMetrics ClusterMetrics.

Prototype

public ClusterMetrics(int runningMaps, int runningReduces, int occupiedMapSlots, int occupiedReduceSlots,
            int reservedMapSlots, int reservedReduceSlots, int mapSlots, int reduceSlots, int totalJobSubmissions,
            int numTrackers, int numBlacklistedTrackers, int numDecommissionedNodes) 

Source Link

Usage

From source file:org.apache.ignite.client.hadoop.GridHadoopClientProtocol.java

License:Apache License

/** {@inheritDoc} */
@Override//ww w . ja  v a  2s  .  co  m
public ClusterMetrics getClusterMetrics() throws IOException, InterruptedException {
    return new ClusterMetrics(0, 0, 0, 0, 0, 0, 1000, 1000, 1, 100, 0, 0);
}

From source file:org.apache.tez.mapreduce.client.ResourceMgrDelegate.java

License:Apache License

public ClusterMetrics getClusterMetrics() throws IOException, InterruptedException {
    YarnClusterMetrics metrics;//from  w  w  w.j ava  2 s. c  o  m
    try {
        metrics = client.getYarnClusterMetrics();
    } catch (YarnException e) {
        throw new IOException(e);
    }
    ClusterMetrics oldMetrics = new ClusterMetrics(1, 1, 1, 1, 1, 1, metrics.getNumNodeManagers() * 10,
            metrics.getNumNodeManagers() * 2, 1, metrics.getNumNodeManagers(), 0, 0);
    return oldMetrics;
}