use of backtype.storm.generated.ExecutorSummary in project jstorm by alibaba.
the class ClusterInfoBolt method getTopologyTPS.
protected long getTopologyTPS(TopologySummary topology, Client client) throws NotAliveException, TException {
long topologyTps = 0l;
String topologyId = topology.get_id();
if (topologyId.startsWith("ClusterMonitor")) {
return topologyTps;
}
TopologyInfo topologyInfo = client.getTopologyInfo(topologyId);
if (topologyInfo == null) {
return topologyTps;
}
List<ExecutorSummary> executorSummaryList = topologyInfo.get_executors();
for (ExecutorSummary executor : executorSummaryList) {
topologyTps += getComponentTPS(executor);
}
LOGGER.info("topology = " + topology.get_name() + ", tps = " + topologyTps);
return topologyTps;
}
Aggregations