Class PartitionGroup


  • public class PartitionGroup
    extends java.lang.Object
    A PartitionGroup is composed from a set of partitions. It also maintains the timestamp of this group, a.k.a. the stream time of the associated task. It is defined as the maximum timestamp of all the records having been retrieved for processing from this PartitionGroup so far. We decide from which partition to retrieve the next record to process based on partitions' timestamps. The timestamp of a specific partition is initialized as UNKNOWN (-1), and is updated with the head record's timestamp if it is smaller (i.e. it should be monotonically increasing); when the partition's buffer becomes empty and there is no head record, the partition's timestamp will not be updated any more.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      void close()  
      java.util.Set<org.apache.kafka.common.TopicPartition> partitions()  
      long timestamp()
      Return the timestamp of this partition group as the smallest partition timestamp among all its partitions
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • partitions

        public java.util.Set<org.apache.kafka.common.TopicPartition> partitions()
      • timestamp

        public long timestamp()
        Return the timestamp of this partition group as the smallest partition timestamp among all its partitions
      • close

        public void close()
      • clear

        public void clear()