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>
The context contains state maintained in the reader for the partition. Available with each of
the methods in @
TimestampPolicy
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Instant
The time at which latest offset for the partition was fetched in order to calculate backlog.abstract long
Current backlog in messages (latest offset of the partition - last processed record offset).
-
Constructor Details
-
PartitionContext
public PartitionContext()
-
-
Method Details
-
getMessageBacklog
public abstract long getMessageBacklog()Current backlog in messages (latest offset of the partition - last processed record offset). -
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
.
-