use of com.datatorrent.stram.webapp.OperatorAggregationInfo in project apex-core by apache.
the class StreamingContainerManager method fillOperatorAggregationInfo.
private OperatorAggregationInfo fillOperatorAggregationInfo(OperatorMeta operator) {
OperatorAggregationInfo oai = new OperatorAggregationInfo();
Collection<PTOperator> physicalOperators = getPhysicalPlan().getAllOperators(operator);
if (physicalOperators.isEmpty()) {
return null;
}
oai.name = operator.getName();
for (PTOperator physicalOperator : physicalOperators) {
if (!physicalOperator.isUnifier()) {
OperatorStatus os = physicalOperator.stats;
oai.latencyMA.addNumber(os.latencyMA.getAvg());
oai.cpuPercentageMA.addNumber(os.cpuNanosPMSMA.getAvg() / 10000);
oai.tuplesEmittedPSMA.addNumber(os.tuplesEmittedPSMA.get());
oai.tuplesProcessedPSMA.addNumber(os.tuplesProcessedPSMA.get());
oai.currentWindowId.addNumber(os.currentWindowId.get());
oai.recoveryWindowId.addNumber(toWsWindowId(physicalOperator.getRecoveryCheckpoint().windowId));
if (os.lastHeartbeat != null) {
oai.lastHeartbeat.addNumber(os.lastHeartbeat.getGeneratedTms());
}
oai.checkpointTime.addNumber(os.checkpointTimeMA.getAvg());
}
}
return oai;
}
Aggregations