Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-3225

Method commit() of class SourceTask never invoked

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0.0
    • Fix Version/s: 0.10.0.0
    • Component/s: KafkaConnect
    • Labels:
      None
    • Environment:
      Windows 8.1

      Description

      In the class org.apache.kafka.connect.source.SourceTask there is the following method:

          /**
           * <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.
          }

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

        Attachments

          Activity

            People

            • Assignee:
              ewencp Ewen Cheslack-Postava
              Reporter:
              krzysiek85 Krzysztof Dębski
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: