Search in sources :

Example 1 with ClusterMetrics

use of org.apache.hadoop.mapreduce.ClusterMetrics in project hadoop by apache.

the class ResourceMgrDelegate method getClusterMetrics.

public ClusterMetrics getClusterMetrics() throws IOException, InterruptedException {
    try {
        YarnClusterMetrics metrics = client.getYarnClusterMetrics();
        ClusterMetrics oldMetrics = new ClusterMetrics(1, 1, 1, 1, 1, 1, metrics.getNumNodeManagers() * 10, metrics.getNumNodeManagers() * 2, 1, metrics.getNumNodeManagers(), 0, 0);
        return oldMetrics;
    } catch (YarnException e) {
        throw new IOException(e);
    }
}
Also used : YarnClusterMetrics(org.apache.hadoop.yarn.api.records.YarnClusterMetrics) YarnClusterMetrics(org.apache.hadoop.yarn.api.records.YarnClusterMetrics) ClusterMetrics(org.apache.hadoop.mapreduce.ClusterMetrics) IOException(java.io.IOException) YarnException(org.apache.hadoop.yarn.exceptions.YarnException)

Aggregations

IOException (java.io.IOException)1 ClusterMetrics (org.apache.hadoop.mapreduce.ClusterMetrics)1 YarnClusterMetrics (org.apache.hadoop.yarn.api.records.YarnClusterMetrics)1 YarnException (org.apache.hadoop.yarn.exceptions.YarnException)1