ModelEnforcement (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

com.google.cloud.dataflow.sdk.runners.inprocess

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 of ModelEnforcementFactory#forBundle(CommittedBundle, AppliedPTransform), each element before and after that element is provided to an underlying TransformEvaluator, and the output InProcessTransformResult and committed output bundles after the TransformEvaluator has completed.

    Typically, ModelEnforcement will obtain required metadata (such as the Coder of the input PCollection 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 to TransformEvaluator.processElement(WindowedValue) on the provided WindowedValue.
      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 and TransformEvaluator.finishBundle() has been called, producing the provided InProcessTransformResult and output bundles.
      void beforeElement(com.google.cloud.dataflow.sdk.util.WindowedValue<T> element)
      Called before a call to TransformEvaluator.processElement(WindowedValue) on the provided WindowedValue.
    • Method Detail

      • beforeElement

        void beforeElement(com.google.cloud.dataflow.sdk.util.WindowedValue<T> element)
        Called before a call to TransformEvaluator.processElement(WindowedValue) on the provided WindowedValue.
      • afterElement

        void afterElement(com.google.cloud.dataflow.sdk.util.WindowedValue<T> element)
        Called after a call to TransformEvaluator.processElement(WindowedValue) on the provided WindowedValue.


Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Dataflow
Need help? Visit our support page.