Interface OffsetsInitializer.PartitionOffsetsRetriever

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Map<org.apache.kafka.common.TopicPartition,​Long> beginningOffsets​(Collection<org.apache.kafka.common.TopicPartition> partitions)
      List beginning offsets for the specified partitions.
      Map<org.apache.kafka.common.TopicPartition,​Long> committedOffsets​(Collection<org.apache.kafka.common.TopicPartition> partitions)
      The group id should be the set for KafkaSource before invoking this method.
      Map<org.apache.kafka.common.TopicPartition,​Long> endOffsets​(Collection<org.apache.kafka.common.TopicPartition> partitions)
      List end offsets for the specified partitions.
      Map<org.apache.kafka.common.TopicPartition,​org.apache.kafka.clients.consumer.OffsetAndTimestamp> offsetsForTimes​(Map<org.apache.kafka.common.TopicPartition,​Long> timestampsToSearch)
      List offsets matching a timestamp for the specified partitions.
    • Method Detail

      • committedOffsets

        Map<org.apache.kafka.common.TopicPartition,​Long> committedOffsets​(Collection<org.apache.kafka.common.TopicPartition> partitions)
        The group id should be the set for KafkaSource before invoking this method. Otherwise an IllegalStateException will be thrown.
        Throws:
        IllegalStateException - if the group id is not set for the KafkaSource.
        See Also:
        Admin.listConsumerGroupOffsets(String, ListConsumerGroupOffsetsOptions)
      • endOffsets

        Map<org.apache.kafka.common.TopicPartition,​Long> endOffsets​(Collection<org.apache.kafka.common.TopicPartition> partitions)
        List end offsets for the specified partitions.
      • beginningOffsets

        Map<org.apache.kafka.common.TopicPartition,​Long> beginningOffsets​(Collection<org.apache.kafka.common.TopicPartition> partitions)
        List beginning offsets for the specified partitions.
      • offsetsForTimes

        Map<org.apache.kafka.common.TopicPartition,​org.apache.kafka.clients.consumer.OffsetAndTimestamp> offsetsForTimes​(Map<org.apache.kafka.common.TopicPartition,​Long> timestampsToSearch)
        List offsets matching a timestamp for the specified partitions.