sb.append("\n\n").append("Raw data:\n");
while(execIter.hasNext()){
ExecutorSummary execSummary = execIter.next();
String componentId = execSummary.get_component_id();
ExecutorSpecificStats stats = execSummary.get_stats().get_specific();
if(stats.is_set_spout()){
//ACKED_TUPLES
//Map<TimeWindow, <Stream, NumTuplesAcked>>,
// TimeWindow takes one of the following: ":all-time", "600" (10mins), "10800" (3h), "86400" (1d)
Map<String, Map<String, Long>> ackedMap = getNumTuplesSpout(execSummary, withAckers);
sb.append("An executor of spout ").append(componentId).append(" has tuples acked \n").append(ackedMap).append("\n");
//TODO: For now, for both throughput and latency, we count only on "default" stream.
long executorAckedTuples = 0L;
Long executorAckedTuplesObj = ackedMap.get(":all-time").get("default");
if(executorAckedTuplesObj!=null){
executorAckedTuples = executorAckedTuplesObj;
}
//LATENCIES
double executorLatency = 0;
if(withAckers){
//Map<TimeWindow, <Stream, Latency>>,
// TimeWindow takes one of the following: ":all-time", "600" (10mins), "10800" (3h), "86400" (1d)
Map<String, Map<String, Double>> completeMsAvg = getLatency(execSummary, withAckers);
sb.append(" and latency \n").append(completeMsAvg).append("\n");
executorLatency = completeMsAvg.get(":all-time").get("default");
}
sb.append("\n");
//KEEPING BOTH
TuplesInfo ti = new TuplesInfo(executorAckedTuples, executorLatency);
appendLatency(spoutsInfo, componentId, ti);
}else if(stats.is_set_bolt()){
//ACKED_TUPLES
//Map<TimeWindow, <Stream, NumTuplesAcked>>,
// TimeWindow takes one of the following: ":all-time", "600" (10mins), "10800" (3h), "86400" (1d)
Map<String, Map<String, Long>> ackedMap = getNumTuplesBoltEmitted(execSummary, withAckers);
sb.append("An executor of bolt ").append(componentId).append(" has emitted tuples \n").append(ackedMap).append("\n");