[ 
https://issues.apache.org/jira/browse/KAFKA-3225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15145392#comment-15145392
 ] 

ASF GitHub Bot commented on KAFKA-3225:
---------------------------------------

GitHub user jcustenborder opened a pull request:

    https://github.com/apache/kafka/pull/909

    KAFKA-3225: Method commit() of class SourceTask never invoked

    1. Added a test case to prove commit() on SourceTask was not being called.
    2. Added commitSourceTask() which logs potential exceptions.
    3. Added after call to finishSuccessfulFlush().


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

    $ git pull https://github.com/jcustenborder/kafka KAFKA-3225

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

    https://github.com/apache/kafka/pull/909.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 #909
    
----
commit 8bd329d3f8edfb0ad817da2cc9c205ef4f647c94
Author: Jeremy Custenborder <jer...@scarcemedia.com>
Date:   2016-02-12T21:46:30Z

    KAFKA-3225 Added test case for missing commit call on WorkerSourceTask. 
Added commitSourceTask() to follow finishSuccessfulFlush() which calls 
SourceTask.commit() and log exceptions.

----


> Method commit() of class SourceTask never invoked
> -------------------------------------------------
>
>                 Key: KAFKA-3225
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3225
>             Project: Kafka
>          Issue Type: Bug
>          Components: copycat
>    Affects Versions: 0.9.0.0
>         Environment: Windows 8.1
>            Reporter: Krzysztof Dębski
>            Assignee: Ewen Cheslack-Postava
>
> In the class org.apache.kafka.connect.source.SourceTask there is the 
> following method:
> {code}    /**
>      * <p>
>      * Commit the offsets, up to the offsets that have been returned by 
> {@link #poll()}. This
>      * method should block until the commit is complete.
>      * </p>
>      * <p>
>      * SourceTasks are not required to implement this functionality; Kafka 
> Connect will record offsets
>      * automatically. This hook is provided for systems that also need to 
> store offsets internally
>      * in their own system.
>      * </p>
>      */
>     public void commit() throws InterruptedException {
>         // This space intentionally left blank.
>     }{code}
> I have created my task which inherits from SourceTask and overrides commit(). 
> In spites of offsets being recorded automatically be Kafka, method commit() 
> is never invoked.
> I have downloaded sources of Kafka and imported them to Intelij Idea.
> Then I used "Find Usages" command. Idea found only one usage - in comments of 
> method stop().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to