Google Cloud Dataflow SDK for Java, version 1.9.1
Interface ModelEnforcement<T>
-
public interface ModelEnforcement<T>
Enforcement tools that verify that executing code conforms to the model.ModelEnforcement is performed on a per-element and per-bundle basis. The
ModelEnforcement
is provided with the input bundle as part ofModelEnforcementFactory#forBundle(CommittedBundle, AppliedPTransform)
, each element before and after that element is provided to an underlyingTransformEvaluator
, and the outputInProcessTransformResult
and committed output bundles after theTransformEvaluator
has completed.Typically,
ModelEnforcement
will obtain required metadata (such as theCoder
of the inputPCollection
on construction, and then enforce per-element behavior (such as the immutability of input elements). When the element is output or the bundle is completed, the required conditions can be enforced across all elements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
afterElement(com.google.cloud.dataflow.sdk.util.WindowedValue<T> element)
Called after a call toTransformEvaluator.processElement(WindowedValue)
on the providedWindowedValue
.void
afterFinish(InProcessPipelineRunner.CommittedBundle<T> input, com.google.cloud.dataflow.sdk.runners.inprocess.InProcessTransformResult result, Iterable<? extends InProcessPipelineRunner.CommittedBundle<?>> outputs)
Called after a bundle has been completed andTransformEvaluator.finishBundle()
has been called, producing the providedInProcessTransformResult
andoutput bundles
.void
beforeElement(com.google.cloud.dataflow.sdk.util.WindowedValue<T> element)
Called before a call toTransformEvaluator.processElement(WindowedValue)
on the providedWindowedValue
.
-
-
-
Method Detail
-
beforeElement
void beforeElement(com.google.cloud.dataflow.sdk.util.WindowedValue<T> element)
Called before a call toTransformEvaluator.processElement(WindowedValue)
on the providedWindowedValue
.
-
afterElement
void afterElement(com.google.cloud.dataflow.sdk.util.WindowedValue<T> element)
Called after a call toTransformEvaluator.processElement(WindowedValue)
on the providedWindowedValue
.
-
afterFinish
void afterFinish(InProcessPipelineRunner.CommittedBundle<T> input, com.google.cloud.dataflow.sdk.runners.inprocess.InProcessTransformResult result, Iterable<? extends InProcessPipelineRunner.CommittedBundle<?>> outputs)
Called after a bundle has been completed andTransformEvaluator.finishBundle()
has been called, producing the providedInProcessTransformResult
andoutput bundles
.
-
-