You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by hmcl <gi...@git.apache.org> on 2017/03/10 23:56:49 UTC

[GitHub] storm pull request #1995: STORM-2407: KafkaTridentSpoutOpaque Doesn't Poll D...

GitHub user hmcl opened a pull request:

    https://github.com/apache/storm/pull/1995

    STORM-2407: KafkaTridentSpoutOpaque Doesn't Poll Data From All Topic-\u2026

    \u2026Partitions When Parallelism Hint Not a Multiple Total Topic-Partitions
    
     - Introduce logic to poll data from the topic partitions assigned to each  task

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hmcl/storm-apache 1.x-branch_STORM-2407_KafkaTridentMissesData

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/1995.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1995
    
----
commit b88854110099edb778d5a906ff1f838737b673a3
Author: Hugo Louro <hm...@gmail.com>
Date:   2017-03-10T21:13:31Z

    STORM-2407: KafkaTridentSpoutOpaque Doesn't Poll Data From All Topic-Partitions When Parallelism Hint Not a Multiple Total Topic-Partitions
     - Introduce logic to poll data from the topic partitions assigned to each  task

----


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

[GitHub] storm pull request #1995: STORM-2407: KafkaTridentSpoutOpaque Doesn't Poll D...

Posted by harshach <gi...@git.apache.org>.
Github user harshach commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1995#discussion_r105775453
  
    --- 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 --
    
    @hmcl my bad, missed the kafkaConsumer.assignments() part. This looks good.


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

[GitHub] storm pull request #1995: STORM-2407: KafkaTridentSpoutOpaque Doesn't Poll D...

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

[GitHub] storm pull request #1995: STORM-2407: KafkaTridentSpoutOpaque Doesn't Poll D...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/storm/pull/1995


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

[GitHub] storm issue #1995: STORM-2407: KafkaTridentSpoutOpaque Doesn't Poll Data Fro...

Posted by harshach <gi...@git.apache.org>.
Github user harshach commented on the issue:

    https://github.com/apache/storm/pull/1995
  
    +1. 


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