Github user ilganeli commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/76#discussion_r42306624
  
    --- Diff: 
engine/src/main/java/com/datatorrent/stram/plan/physical/StreamMapping.java ---
    @@ -188,6 +192,69 @@ private void addSlidingUnifiers()
         }
       }
     
    +  private List<PTOutput> setupPartitionerUnifiers(List<PTOutput> upstream, 
Partitioner<Operator> partitioner)
    +  {
    +    Operator.Unifier<?> unifier = streamMeta.getSource().getUnifier();
    +
    +    if (unifier == null) {
    +      unifier = new DefaultUnifier();
    +    }
    +
    +    Collection<Partitioner.Partition<Operator>> collection = new 
ArrayList<>(1);
    +    DefaultPartition<Operator> firstPartition = new 
DefaultPartition<Operator>(unifier);
    +    collection.add(firstPartition);
    +
    +    Collection<Partitioner.Partition<Operator>> partitions = 
partitioner.definePartitions(collection, new 
PhysicalPlan.UnifierPartitioningContextImpl());
    +
    +    if (partitions.size() <= 1) {
    +      return upstream;
    +    }
    +    OperatorMeta om = streamMeta.getSource().getOperatorMeta();
    +
    +    InputPortMeta portMeta = null;
    +    Map<InputPortMeta, StreamMeta> inputs = om.getInputStreams();
    +    if (!inputs.isEmpty()) {
    --- End diff --
    
    Is the intent here to assign previously assigned keys if the previous 
component (connected by the stream) already has an assigned partitioning 
scheme? Can this be clarified with a comment?


---
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.
---

Reply via email to