Search in sources :

Example 1 with ExecutorSummary

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;
}
Also used : TopologyInfo(backtype.storm.generated.TopologyInfo) ExecutorSummary(backtype.storm.generated.ExecutorSummary)

Aggregations

ExecutorSummary (backtype.storm.generated.ExecutorSummary)1 TopologyInfo (backtype.storm.generated.TopologyInfo)1