Package org.apache.beam.sdk.io.kafka
Class TimestampPolicy.PartitionContext
- java.lang.Object
-
- org.apache.beam.sdk.io.kafka.TimestampPolicy.PartitionContext
-
- Enclosing class:
- TimestampPolicy<K,V>
public abstract static class TimestampPolicy.PartitionContext extends java.lang.ObjectThe context contains state maintained in the reader for the partition. Available with each of the methods in @TimestampPolicy.
-
-
Constructor Summary
Constructors Constructor Description PartitionContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract org.joda.time.InstantgetBacklogCheckTime()The time at which latest offset for the partition was fetched in order to calculate backlog.abstract longgetMessageBacklog()Current backlog in messages (latest offset of the partition - last processed record offset).
-
-
-
Method Detail
-
getMessageBacklog
public abstract long getMessageBacklog()
Current backlog in messages (latest offset of the partition - last processed record offset).
-
getBacklogCheckTime
public abstract org.joda.time.Instant getBacklogCheckTime()
The time at which latest offset for the partition was fetched in order to calculate backlog. The reader periodically polls for latest offsets. This timestamp is useful in advancing watermark for idle partitions as inTimestampPolicyFactory.LogAppendTimePolicy.
-
-