Github user tweise commented on a diff in the pull request:
https://github.com/apache/incubator-apex-core/pull/191#discussion_r48589935
--- Diff:
engine/src/main/java/com/datatorrent/stram/plan/logical/LogicalPlan.java ---
@@ -1359,7 +1409,8 @@ private void addDAGToCurrentDAG(ModuleMeta moduleMeta)
String name;
for (OperatorMeta operatorMeta : subDag.getAllOperators()) {
name = subDAGName + MODULE_NAMESPACE_SEPARATOR +
operatorMeta.getName();
- this.addOperator(name, operatorMeta.getOperator());
+ Operator op = this.addOperator(name, operatorMeta.getOperator());
--- End diff --
We are adding an operator with a different name to a different DAG and as
result the new meta object is created. Naturally that's a new object vs.
sharing the meta object between DAGs... The meta object is result of the add
operation and the name field should remain final. I don't see the need to add a
copy constructor, setting attributes is public API.
---
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.
---