Skip to content

PartitionGroup

Creating Instance

PartitionGroup takes the following to be created:

PartitionGroup is created when:

Sensors

recordLateness

PartitionGroup is given the recordLateness metric sensor when created.

The recordLateness sensor is requested to record the following values:

  • 0 when the event time advances (the timestamp of the current record is smaller than the current stream time)

  • the difference (lateness) between the current stream time and the timestamp of the current otherwise

enforcedProcessing

PartitionGroup is given an enforcedProcessingSensor metric sensor when created.

Stream Time

PartitionGroup defines streamTime internal registry for the highest time (event-time watermark) across already-processed events (across all the partitions assigned to this StreamTask).

The streamTime is initially RecordQueue.UNKNOWN when PartitionGroup is created and later when cleared.

The streamTime changes to the given timestamp in setPartitionTime and next record.

The streamTime is used when:

setPartitionTime

void setPartitionTime(
  TopicPartition partition, 
  long partitionTime)

setPartitionTime...FIXME

setPartitionTime is used when:

Next (Stamped)Record

StampedRecord nextRecord(
  RecordInfo info, 
  long wallClockTime)

nextRecord...FIXME

nextRecord is used when:

Adding ConsumerRecords

int addRawRecords(
  TopicPartition partition,
  Iterable<ConsumerRecord<byte[], byte[]>> rawRecords)

addRawRecords...FIXME

addRawRecords is used when:

Back to top