Github user tweise commented on a diff in the pull request:
https://github.com/apache/incubator-apex-core/pull/148#discussion_r47273100
--- Diff:
engine/src/main/java/com/datatorrent/stram/StreamingContainerManager.java ---
@@ -2246,6 +2306,50 @@ public LogicalOperatorInfo
getLogicalOperatorInfo(String operatorName)
return fillLogicalOperatorInfo(operatorMeta);
}
+ public LogicalModuleInfo getLogicalModuleInfo(ModuleMeta module, boolean
flatten)
+ {
+ LogicalModuleInfo lmi = new LogicalModuleInfo();
+ lmi.name = module.getName();
+ lmi.className = module.getModule().getClass().getName();
+ if (flatten) {
+ for (OperatorMeta operatorMeta : module.getDag().getAllOperators()) {
+ if (operatorMeta.getModuleName() == null) {
+ String fullPath = module.getFullName() +
LogicalPlan.MODULE_NAMESPACE_SEPARATOR + operatorMeta.getName();
+
lmi.operators.add(fillLogicalOperatorInfo(getLogicalPlan().getOperatorMeta(fullPath)));
+ }
+ }
+ for (StreamMeta streamMeta : module.getDag().getAllStreams()) {
--- End diff --
You are going over the same data structure twice. When you add the
operator, you already know the streams connected to the output ports.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---