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

2017-03-15 Thread asfgit
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


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

2017-03-13 Thread harshach
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 partitionResponsibilities); 
   
+void refreshPartitions(List partitionResponsibilities);
+
+/**
+ * @return The oredered list of partitions being processed by all 
the tasks
+ */
 List getOrderedPartitions(Partitions allPartitionInfo);
+
+/**
+ * @return The list of partitions that are to be processed by the 
task with id {@code taskId}
+ */
+List 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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


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

2017-03-13 Thread harshach
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 partitionResponsibilities); 
   
+void refreshPartitions(List partitionResponsibilities);
+
+/**
+ * @return The oredered list of partitions being processed by all 
the tasks
+ */
 List getOrderedPartitions(Partitions allPartitionInfo);
+
+/**
+ * @return The list of partitions that are to be processed by the 
task with id {@code taskId}
+ */
+List 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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


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

2017-03-10 Thread hmcl
GitHub user hmcl opened a pull request:

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

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

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