use of org.apache.storm.cluster.ExecutorBeat in project storm by apache.
the class StatsUtil method convertExecutorBeats.
// =====================================================================================
// convert thrift stats to java maps
// =====================================================================================
/**
* convert thrift executor heartbeats into a java HashMap
*/
public static Map<List<Integer>, Map<String, Object>> convertExecutorBeats(Map<ExecutorInfo, ExecutorBeat> beats) {
Map<List<Integer>, Map<String, Object>> ret = new HashMap<>();
for (Map.Entry<ExecutorInfo, ExecutorBeat> beat : beats.entrySet()) {
ExecutorInfo executorInfo = beat.getKey();
ExecutorBeat executorBeat = beat.getValue();
ret.put(Lists.newArrayList(executorInfo.get_task_start(), executorInfo.get_task_end()), convertZkExecutorHb(executorBeat));
}
return ret;
}
Aggregations