@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<org.apache.beam.sdk.transforms.DoFn.ProcessContinuation> |
run(PartitionRecord partitionRecord,
com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord record,
org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker<StreamProgress,StreamProgress> tracker,
org.apache.beam.sdk.transforms.DoFn.OutputReceiver<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord>> receiver,
org.apache.beam.sdk.transforms.splittabledofn.ManualWatermarkEstimator<org.joda.time.Instant> watermarkEstimator,
BytesThroughputEstimator<org.apache.beam.sdk.values.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<org.apache.beam.sdk.transforms.DoFn.ProcessContinuation> run(PartitionRecord partitionRecord, com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord record, org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker<StreamProgress,StreamProgress> tracker, org.apache.beam.sdk.transforms.DoFn.OutputReceiver<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord>> receiver, org.apache.beam.sdk.transforms.splittabledofn.ManualWatermarkEstimator<org.joda.time.Instant> watermarkEstimator, BytesThroughputEstimator<org.apache.beam.sdk.values.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