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

    https://github.com/apache/storm/pull/1995#discussion_r105763668
  
    --- Diff: 
storm-core/src/jvm/org/apache/storm/trident/spout/IOpaquePartitionedTridentSpout.java
 ---
    @@ -52,13 +52,26 @@
              * This method is called when this task is responsible for a new 
set of partitions. Should be used
              * to manage things like connections to brokers.
              */        
    -        void refreshPartitions(List<Partition> partitionResponsibilities); 
       
    +        void refreshPartitions(List<Partition> partitionResponsibilities);
    +
    +        /**
    +         * @return The oredered list of partitions being processed by all 
the tasks
    +         */
             List<Partition> getOrderedPartitions(Partitions allPartitionInfo);
    +
    +        /**
    +         * @return The list of partitions that are to be processed by the 
task with id {@code taskId}
    +         */
    +        List<Partition> getPartitionsForTask(int taskId, int numTasks, 
Partitions allPartitionInfo);
    --- End diff --
    
    if we are making changes to interface here, why keep getPartitionsForTask. 
Given the partition assignment depends on Kafka consumer api, Why not let it 
take over the assignment. All of this assignment magic came about because we 
ended up using the lower-level API. We should look at a way to remove this all 
together as the consumer API does a better handling of distributing partitions.


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