use of com.datatorrent.stram.webapp.StreamInfo in project apex-core by apache.
the class StreamingContainerManager method getStreamInfoList.
public List<StreamInfo> getStreamInfoList() {
List<StreamInfo> infoList = new ArrayList<>();
for (PTContainer container : this.plan.getContainers()) {
for (PTOperator operator : container.getOperators()) {
List<PTOutput> outputs = operator.getOutputs();
for (PTOutput output : outputs) {
StreamInfo si = new StreamInfo();
si.logicalName = output.logicalStream.getName();
si.source.operatorId = String.valueOf(operator.getId());
si.source.portName = output.portName;
si.locality = output.logicalStream.getLocality();
for (PTInput input : output.sinks) {
StreamInfo.Port p = new StreamInfo.Port();
p.operatorId = String.valueOf(input.target.getId());
if (input.target.isUnifier()) {
p.portName = StreamingContainer.getUnifierInputPortName(input.portName, operator.getId(), output.portName);
} else {
p.portName = input.portName;
}
si.sinks.add(p);
}
infoList.add(si);
}
}
}
return infoList;
}
Aggregations