@Internal public class ChangeStreamAction extends java.lang.Object
Constructor and Description |
---|
ChangeStreamAction(ChangeStreamMetrics metrics)
Constructs ChangeStreamAction to process individual ChangeStreamRecord.
|
Modifier and Type | Method and Description |
---|---|
java.util.Optional<DoFn.ProcessContinuation> |
run(PartitionRecord partitionRecord,
com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord record,
RestrictionTracker<StreamProgress,StreamProgress> tracker,
DoFn.OutputReceiver<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord>> receiver,
ManualWatermarkEstimator<Instant> watermarkEstimator,
BytesThroughputEstimator<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord>> throughputEstimator)
This class processes ReadChangeStreamResponse from bigtable server.
|
public ChangeStreamAction(ChangeStreamMetrics metrics)
metrics
- record beam metrics.public java.util.Optional<DoFn.ProcessContinuation> run(PartitionRecord partitionRecord, com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord record, RestrictionTracker<StreamProgress,StreamProgress> tracker, DoFn.OutputReceiver<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord>> receiver, ManualWatermarkEstimator<Instant> watermarkEstimator, BytesThroughputEstimator<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord>> throughputEstimator)
There are 2 cases that cause this function to return a non-empty ProcessContinuation.
partitionRecord
- the stream partition that generated the responserecord
- the change stream record to be processedtracker
- restrictionTracker that we use to claim next block and also to store CloseStreamreceiver
- to output DataChangewatermarkEstimator
- manually progress watermark when processing responses with watermark