Search in sources :

Example 1 with ClusterInfo

use of org.apache.storm.metric.api.IClusterMetricsConsumer.ClusterInfo in project storm by apache.

the class Nimbus method sendClusterMetricsToExecutors.

private void sendClusterMetricsToExecutors() throws Exception {
    ClusterInfo clusterInfo = mkClusterInfo();
    ClusterSummary clusterSummary = getClusterInfoImpl();
    List<DataPoint> clusterMetrics = extractClusterMetrics(clusterSummary);
    Map<IClusterMetricsConsumer.SupervisorInfo, List<DataPoint>> supervisorMetrics = extractSupervisorMetrics(clusterSummary);
    for (ClusterMetricsConsumerExecutor consumerExecutor : clusterConsumerExceutors) {
        consumerExecutor.handleDataPoints(clusterInfo, clusterMetrics);
        for (Entry<IClusterMetricsConsumer.SupervisorInfo, List<DataPoint>> entry : supervisorMetrics.entrySet()) {
            consumerExecutor.handleDataPoints(entry.getKey(), entry.getValue());
        }
    }
}
Also used : ClusterInfo(org.apache.storm.metric.api.IClusterMetricsConsumer.ClusterInfo) DataPoint(org.apache.storm.metric.api.DataPoint) ClusterSummary(org.apache.storm.generated.ClusterSummary) ArrayList(java.util.ArrayList) List(java.util.List) ClusterMetricsConsumerExecutor(org.apache.storm.metric.ClusterMetricsConsumerExecutor) SupervisorInfo(org.apache.storm.generated.SupervisorInfo)

Aggregations

ArrayList (java.util.ArrayList)1 List (java.util.List)1 ClusterSummary (org.apache.storm.generated.ClusterSummary)1 SupervisorInfo (org.apache.storm.generated.SupervisorInfo)1 ClusterMetricsConsumerExecutor (org.apache.storm.metric.ClusterMetricsConsumerExecutor)1 DataPoint (org.apache.storm.metric.api.DataPoint)1 ClusterInfo (org.apache.storm.metric.api.IClusterMetricsConsumer.ClusterInfo)1