apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (APEXCORE-272) Attributes added to operator inside Module is not preserved.
Date Wed, 30 Dec 2015 07:26:49 GMT

    [ https://issues.apache.org/jira/browse/APEXCORE-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15074721#comment-15074721
] 

ASF GitHub Bot commented on APEXCORE-272:
-----------------------------------------

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.  


> Attributes added to operator inside Module is not preserved.
> ------------------------------------------------------------
>
>                 Key: APEXCORE-272
>                 URL: https://issues.apache.org/jira/browse/APEXCORE-272
>             Project: Apache Apex Core
>          Issue Type: Bug
>            Reporter: Tushar Gosavi
>            Assignee: Tushar Gosavi
>
> Attributes added to operator within a Module is not preserved.
> for example
> {code}
> class M implements Module {
>   public void populateDAG(DAG dag, Configuration conf) {
>      DummyOperator o1 = dag.addOperator("O1", new DummyOperator());
>      o1.setOperatorProp(level1ModuleProp);
>      dag.getMeta(o1).getAttributes().put(Context.OperatorContext.MEMORY_MB, 512);
>   }
> {code}
> The above code when module is expanded attribute set on operator o1 is lost.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message