@Internal @DoFn.UnboundedPerElement public class ReadChangeStreamPartitionDoFn extends DoFn<PartitionRecord,KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>>
DoFn.AlwaysFetched, DoFn.BoundedPerElement, DoFn.BundleFinalizer, DoFn.Element, DoFn.FieldAccess, DoFn.FinishBundle, DoFn.FinishBundleContext, DoFn.GetInitialRestriction, DoFn.GetInitialWatermarkEstimatorState, DoFn.GetRestrictionCoder, DoFn.GetSize, DoFn.GetWatermarkEstimatorStateCoder, DoFn.Key, DoFn.MultiOutputReceiver, DoFn.NewTracker, DoFn.NewWatermarkEstimator, DoFn.OnTimer, DoFn.OnTimerContext, DoFn.OnTimerFamily, DoFn.OnWindowExpiration, DoFn.OnWindowExpirationContext, DoFn.OutputReceiver<T>, DoFn.ProcessContext, DoFn.ProcessContinuation, DoFn.ProcessElement, DoFn.RequiresStableInput, DoFn.RequiresTimeSortedInput, DoFn.Restriction, DoFn.Setup, DoFn.SideInput, DoFn.SplitRestriction, DoFn.StartBundle, DoFn.StartBundleContext, DoFn.StateId, DoFn.Teardown, DoFn.TimerFamily, DoFn.TimerId, DoFn.Timestamp, DoFn.TruncateRestriction, DoFn.UnboundedPerElement, DoFn.WatermarkEstimatorState, DoFn.WindowedContext
Modifier and Type | Field and Description |
---|---|
static int |
THROUGHPUT_ESTIMATION_WINDOW_SECONDS |
Constructor and Description |
---|
ReadChangeStreamPartitionDoFn(Duration heartbeatDuration,
DaoFactory daoFactory,
ActionFactory actionFactory,
ChangeStreamMetrics metrics) |
Modifier and Type | Method and Description |
---|---|
Instant |
getInitialWatermarkEstimatorState(PartitionRecord partitionRecord) |
double |
getSize(StreamProgress streamProgress) |
StreamProgress |
initialRestriction() |
ManualWatermarkEstimator<Instant> |
newWatermarkEstimator(Instant watermarkEstimatorState) |
DoFn.ProcessContinuation |
processElement(PartitionRecord partitionRecord,
RestrictionTracker<StreamProgress,StreamProgress> tracker,
DoFn.OutputReceiver<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>> receiver,
ManualWatermarkEstimator<Instant> watermarkEstimator) |
ReadChangeStreamPartitionProgressTracker |
restrictionTracker(StreamProgress restriction) |
void |
setThroughputEstimator(BytesThroughputEstimator<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>> throughputEstimator)
Sets the estimator to track throughput for each DoFn instance.
|
void |
setup() |
getAllowedTimestampSkew, getInputTypeDescriptor, getOutputTypeDescriptor, populateDisplayData, prepareForProcessing
public static final int THROUGHPUT_ESTIMATION_WINDOW_SECONDS
public ReadChangeStreamPartitionDoFn(Duration heartbeatDuration, DaoFactory daoFactory, ActionFactory actionFactory, ChangeStreamMetrics metrics)
@DoFn.GetInitialWatermarkEstimatorState public Instant getInitialWatermarkEstimatorState(@DoFn.Element PartitionRecord partitionRecord)
@DoFn.NewWatermarkEstimator public ManualWatermarkEstimator<Instant> newWatermarkEstimator(@DoFn.WatermarkEstimatorState Instant watermarkEstimatorState)
@DoFn.GetInitialRestriction public StreamProgress initialRestriction()
@DoFn.NewTracker public ReadChangeStreamPartitionProgressTracker restrictionTracker(@DoFn.Restriction StreamProgress restriction)
@DoFn.GetSize public double getSize(@DoFn.Restriction StreamProgress streamProgress)
@DoFn.Setup public void setup() throws java.io.IOException
java.io.IOException
@DoFn.ProcessElement public DoFn.ProcessContinuation processElement(@DoFn.Element PartitionRecord partitionRecord, RestrictionTracker<StreamProgress,StreamProgress> tracker, DoFn.OutputReceiver<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>> receiver, ManualWatermarkEstimator<Instant> watermarkEstimator) throws java.lang.InterruptedException, java.io.IOException
java.lang.InterruptedException
java.io.IOException
public void setThroughputEstimator(BytesThroughputEstimator<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>> throughputEstimator)
throughputEstimator
- an estimator to calculate DoFn instance level throughput