Class BundleCheckpointHandlers.StateAndTimerBundleCheckpointHandler<T>
java.lang.Object
org.apache.beam.runners.fnexecution.control.BundleCheckpointHandlers.StateAndTimerBundleCheckpointHandler<T>
- All Implemented Interfaces:
BundleCheckpointHandler
- Enclosing class:
BundleCheckpointHandlers
public static class BundleCheckpointHandlers.StateAndTimerBundleCheckpointHandler<T>
extends Object
implements BundleCheckpointHandler
A
BundleCheckpointHandler which uses TimerInternals.TimerData and MapState to reschedule BeamFnApi.DelayedBundleApplication.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStateAndTimerBundleCheckpointHandler(org.apache.beam.runners.core.TimerInternalsFactory<T> timerInternalsFactory, org.apache.beam.runners.core.StateInternalsFactory<T> stateInternalsFactory, Coder<WindowedValue<T>> residualCoder, Coder windowCoder) -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisSdfTimer(String timerId) A helper function to help check whether the given timer is the timer which is set for reschedulingBeamFnApi.DelayedBundleApplication.voidonCheckpoint(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleResponse response) static <T> org.apache.beam.runners.core.StateTag<MapState<String, WindowedValue<T>>> residualStateTag(Coder<WindowedValue<T>> residualCoder) The single, stable state tag holding every SDF self-checkpoint residual for a key/window, keyed by the per-residual checkpoint id.
-
Field Details
-
SDF_PREFIX
- See Also:
-
SDF_RESIDUAL_STATE
The state id under which all SDF self-checkpoint residuals for a key/window are stored.- See Also:
-
-
Constructor Details
-
StateAndTimerBundleCheckpointHandler
-
-
Method Details
-
isSdfTimer
A helper function to help check whether the given timer is the timer which is set for reschedulingBeamFnApi.DelayedBundleApplication. -
residualStateTag
public static <T> org.apache.beam.runners.core.StateTag<MapState<String,WindowedValue<T>>> residualStateTag(Coder<WindowedValue<T>> residualCoder) The single, stable state tag holding every SDF self-checkpoint residual for a key/window, keyed by the per-residual checkpoint id. Storing all residuals under one stable descriptor, instead of a freshStateTags.value(java.lang.String, org.apache.beam.sdk.coders.Coder<T>)per residual, keeps a polling SDF's keyed state bounded. See https://github.com/apache/beam/issues/27648. -
onCheckpoint
public void onCheckpoint(org.apache.beam.model.fnexecution.v1.BeamFnApi.ProcessBundleResponse response) - Specified by:
onCheckpointin interfaceBundleCheckpointHandler
-