apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tushargosavi <...@git.apache.org>
Subject [GitHub] incubator-apex-core pull request: APEX-103: Add module and dag int...
Date Fri, 04 Dec 2015 08:27:15 GMT
Github user tushargosavi commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/148#discussion_r46658699
  
    --- Diff: engine/src/main/java/com/datatorrent/stram/plan/logical/LogicalPlan.java ---
    @@ -1079,16 +1109,179 @@ public int hashCode()
         return operator;
       }
     
    -  @Override
    -  public <T extends Module> T addModule(String name, Class<T> moduleClass)
    +  public final class ModuleMeta implements DAG.ModuleMeta, Serializable
       {
    -    throw new UnsupportedOperationException("Modules are not supported");
    +    private final LinkedHashMap<InputPortMeta, StreamMeta> inputStreams = new LinkedHashMap<InputPortMeta,
StreamMeta>();
    +    private final LinkedHashMap<OutputPortMeta, StreamMeta> outputStreams = new
LinkedHashMap<OutputPortMeta, StreamMeta>();
    +    private final Attribute.AttributeMap attributes;
    +    @SuppressWarnings("unused")
    +    private final int id;
    +    @NotNull
    +    private String name;
    +    private transient Integer nindex; // for cycle detection
    +    private transient Integer lowlink; // for cycle detection
    +    private transient Module module;
    +    private String parentModuleName;
    +    private LogicalPlan dag = null;
    +
    +    public ModuleMeta(String name, Module module)
    +    {
    +      this(name, module, new DefaultAttributeMap());
    +    }
    +
    +    public ModuleMeta(String name, Module module, DefaultAttributeMap attributeMap)
    +    {
    +      LOG.debug("Initializing {} as {}", name, module.getClass().getName());
    +      this.name = name;
    +      this.module = module;
    +      this.id = logicalOperatorSequencer.decrementAndGet();
    +      this.attributes = attributeMap;
    +      this.dag = new LogicalPlan();
    +    }
    +
    +    @Override
    +    public String getName()
    +    {
    +      return name;
    +    }
    +
    +    @Override
    +    public Module getModule()
    +    {
    +      return module;
    +    }
    +
    +    @Override
    +    public DAG.InputPortMeta getMeta(InputPort<?> port)
    +    {
    +      return null;
    +    }
    +
    +    @Override
    +    public DAG.OutputPortMeta getMeta(OutputPort<?> port)
    +    {
    +      return null;
    +    }
    +
    +    @Override
    +    public Attribute.AttributeMap getAttributes()
    +    {
    +      return null;
    --- End diff --
    
    fixed this


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message