[ https://issues.apache.org/jira/browse/KAFKA-4002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15400206#comment-15400206 ]
ASF GitHub Bot commented on KAFKA-4002: --------------------------------------- GitHub user Ishiihara opened a pull request: https://github.com/apache/kafka/pull/1686 KAFKA-4002: task.open() should be invoked in case that 0 partitions is assigned to task You can merge this pull request into a Git repository by running: $ git pull https://github.com/Ishiihara/kafka open-partition Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1686.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 #1686 ---- commit 1575cacb89c549544a0b02a7108ee5e069264784 Author: Liquan Pei <liquan...@gmail.com> Date: 2016-07-29T23:13:49Z Call task.open() with empty partitions ---- > task.open() should be invoked in case that 0 partitions is assigned to task. > ----------------------------------------------------------------------------- > > Key: KAFKA-4002 > URL: https://issues.apache.org/jira/browse/KAFKA-4002 > Project: Kafka > Issue Type: Bug > Components: KafkaConnect > Affects Versions: 0.10.0.0 > Reporter: Liquan Pei > Assignee: Liquan Pei > Fix For: 0.11.0.0 > > Original Estimate: 4h > Remaining Estimate: 4h > > In case that 0 partitions is assigned to a task, the open() call in task was > not invoked, but then put() was called later. The put() call with empty data > is to hand control to the task so that it can continue working on the > buffered data. > If task.open() is not invoked in case of 0 partitions are assigned, connector > developers needs to do some special handling in this case, i.e. do not call > any method in writer to avoid null pointer exceptions. To make the connector > developers' life easy, it probably better to change the behavior so the call > is made even 0 partitions are assigned . -- This message was sent by Atlassian JIRA (v6.3.4#6332)