@Internal public class ChangeStreamAction extends java.lang.Object
| Constructor and Description |
|---|
ChangeStreamAction(ChangeStreamMetrics metrics,
ThroughputEstimator<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>> throughputEstimator)
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.ChangeStreamMutation>> receiver,
ManualWatermarkEstimator<Instant> watermarkEstimator,
boolean shouldDebug)
This class processes ReadChangeStreamResponse from bigtable server.
|
public ChangeStreamAction(ChangeStreamMetrics metrics, ThroughputEstimator<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>> throughputEstimator)
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.ChangeStreamMutation>> receiver, ManualWatermarkEstimator<Instant> watermarkEstimator, boolean shouldDebug)
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