Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Enable partition discovery by default.
  2. Modify OffsetsInitializer to provide a different strategy for later discovered partitions, by which users can also customize strategies for new and old partitions.For the provided OffsetsInitializer :

    1.  EARLIEST startup offset strategy:  use EARLIEST for the new discovered partitions
    2.  LATEST startup offset strategy:  use EARLIEST for the new discovered partitions
    3. TIMESTAMP startup offset strategy:  use TIMESTAMP for the new discovered partitions
    4. SPECIFIC_OFFSET  startup offset strategy:   use SPECIFIC_OFFSET for the new discovered partitions

...

Code Block
languagejava
public KafkaSourceEnumerator(
            KafkaSubscriber subscriber,
            OffsetsInitializer startingOffsetInitializer,
            OffsetsInitializer stoppingOffsetInitializer,
            Properties properties,
            SplitEnumeratorContext<KafkaPartitionSplit> context,
            Boundedness boundedness,
            Set<TopicPartition> assignedPartitions,
    		 Set<TopicPartition> unassignedInitialPartitons,
             boolean noDiscovery
            ) {

}

    public KafkaSourceEnumerator(
            KafkaSubscriber subscriber,
            OffsetsInitializer startingOffsetInitializer,
            OffsetsInitializer stoppingOffsetInitializer,
            Properties properties,
            SplitEnumeratorContext<KafkaPartitionSplit> context,
            Boundedness boundedness) {
        this(
                subscriber,
                startingOffsetInitializer,
                stoppingOffsetInitializer,
                properties,
                context,
                boundedness,
                Collections.emptySet(),
                Collections.emptySet(),
                falsetrue
            );
    }



KafkaSourceEnumState

Depends on the proposed changes.

...