Github user tushargosavi commented on a diff in the pull request:
https://github.com/apache/incubator-apex-core/pull/148#discussion_r47358637
--- 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 --
Each OperatorMeta keep port to StreamMeta mapping for input and output
ports. While
traversing each operator we have to go over these two Maps to get stream
connected to the operator. Also we will have to maintain a set to ignore
previously processed StreamMeta, as single StreamMeta is present first at
outputPort side map and one or more times at inputPort side map. Also we
want to
include only the streams populated by this module. We already have this
information in
stream list in module dag. Hence going over this list to keep the logic
simple.
---
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.
---