GitHub user lw-lin opened a pull request: https://github.com/apache/spark/pull/16902
[SPARK-19564][SS][KAFKA] KafkaOffsetReader's consumers should not be in the same group ## What changes were proposed in this pull request? In `KafkaOffsetReader`, when error occurs, we abort the existing consumer and create a new consumer. In our current implementation, the first consumer and the second consumer would be in the same group, which violates our intention of the two consumers not being in the same group. The cause is that, in our current implementation, the first consumer is created before `groupId` and `nextId` are initialized in the constructor. Then even if `groupId` and `nextId` are increased during the creation of that first consumer, `groupId` and `nextId` would still be initialized to default values in the constructor. We should make sure that `groupId` and `nextId` are initialized before any consumer is created. ## How was this patch tested? Ran 100 times of `KafkaSourceSuite`; all passed You can merge this pull request into a Git repository by running: $ git pull https://github.com/lw-lin/spark SPARK-19564- Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16902.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 #16902 ---- commit d755739842caf170e1a90e7ffd605123f830fd50 Author: Liwei Lin <lwl...@gmail.com> Date: 2017-02-12T09:55:41Z Fix commit 0f19af3b6b2fdc8f527f952bbf65681755c3f6b4 Author: Liwei Lin <lwl...@gmail.com> Date: 2017-02-12T13:40:37Z Run 100 times # This is the 1st commit message: Run 100 times # This is the commit message #2: Revert "Run 100 times" ---- --- 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. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org