Interface TransformTranslator.TranslationContext

  • Enclosing interface:
    TransformTranslator<TransformT extends org.apache.beam.sdk.transforms.PTransform>

    public static interface TransformTranslator.TranslationContext
    The interface provided to registered callbacks for interacting with the DataflowRunner, including reading and writing the values of PCollections and side inputs.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      TransformTranslator.StepTranslationContext addStep​(org.apache.beam.sdk.transforms.PTransform<?,​?> transform, java.lang.String type)
      Adds a step to the Dataflow workflow for the given transform, with the given Dataflow step type.
      OutputReference asOutputReference​(org.apache.beam.sdk.values.PValue value, org.apache.beam.sdk.runners.AppliedPTransform<?,​?,​?> producer)
      Encode a PValue reference as an output reference.
      org.apache.beam.sdk.runners.AppliedPTransform<?,​?,​?> getCurrentParent()
      Gets the parent composite transform to the current transform, if one exists.
      org.apache.beam.sdk.runners.AppliedPTransform<?,​?,​?> getCurrentTransform()  
      java.lang.String getFullName​(org.apache.beam.sdk.transforms.PTransform<?,​?> transform)
      Returns the full name of the currently being translated transform.
      <InputT extends org.apache.beam.sdk.values.PValue>
      InputT
      getInput​(org.apache.beam.sdk.transforms.PTransform<InputT,​?> transform)  
      <InputT extends org.apache.beam.sdk.values.PInput>
      java.util.Map<org.apache.beam.sdk.values.TupleTag<?>,​org.apache.beam.sdk.values.PCollection<?>>
      getInputs​(org.apache.beam.sdk.transforms.PTransform<InputT,​?> transform)
      Returns the input of the currently being translated transform.
      <OutputT extends org.apache.beam.sdk.values.PValue>
      OutputT
      getOutput​(org.apache.beam.sdk.transforms.PTransform<?,​OutputT> transform)  
      <OutputT extends org.apache.beam.sdk.values.POutput>
      java.util.Map<org.apache.beam.sdk.values.TupleTag<?>,​org.apache.beam.sdk.values.PCollection<?>>
      getOutputs​(org.apache.beam.sdk.transforms.PTransform<?,​OutputT> transform)
      Returns the output of the currently being translated transform.
      DataflowPipelineOptions getPipelineOptions()
      Returns the configured pipeline options.
      org.apache.beam.sdk.runners.AppliedPTransform<?,​?,​?> getProducer​(org.apache.beam.sdk.values.PValue value)
      Get the AppliedPTransform that produced the provided PValue.
      org.apache.beam.sdk.util.construction.SdkComponents getSdkComponents()  
      default boolean isStreamingEngine()  
    • Method Detail

      • isStreamingEngine

        default boolean isStreamingEngine()
      • getInputs

        <InputT extends org.apache.beam.sdk.values.PInput> java.util.Map<org.apache.beam.sdk.values.TupleTag<?>,​org.apache.beam.sdk.values.PCollection<?>> getInputs​(org.apache.beam.sdk.transforms.PTransform<InputT,​?> transform)
        Returns the input of the currently being translated transform.
      • getInput

        <InputT extends org.apache.beam.sdk.values.PValue> InputT getInput​(org.apache.beam.sdk.transforms.PTransform<InputT,​?> transform)
      • getOutputs

        <OutputT extends org.apache.beam.sdk.values.POutput> java.util.Map<org.apache.beam.sdk.values.TupleTag<?>,​org.apache.beam.sdk.values.PCollection<?>> getOutputs​(org.apache.beam.sdk.transforms.PTransform<?,​OutputT> transform)
        Returns the output of the currently being translated transform.
      • getOutput

        <OutputT extends org.apache.beam.sdk.values.PValue> OutputT getOutput​(org.apache.beam.sdk.transforms.PTransform<?,​OutputT> transform)
      • getFullName

        java.lang.String getFullName​(org.apache.beam.sdk.transforms.PTransform<?,​?> transform)
        Returns the full name of the currently being translated transform.
      • addStep

        TransformTranslator.StepTranslationContext addStep​(org.apache.beam.sdk.transforms.PTransform<?,​?> transform,
                                                           java.lang.String type)
        Adds a step to the Dataflow workflow for the given transform, with the given Dataflow step type.
      • asOutputReference

        OutputReference asOutputReference​(org.apache.beam.sdk.values.PValue value,
                                          org.apache.beam.sdk.runners.AppliedPTransform<?,​?,​?> producer)
        Encode a PValue reference as an output reference.
      • getSdkComponents

        org.apache.beam.sdk.util.construction.SdkComponents getSdkComponents()
      • getCurrentTransform

        org.apache.beam.sdk.runners.AppliedPTransform<?,​?,​?> getCurrentTransform()
      • getProducer

        org.apache.beam.sdk.runners.AppliedPTransform<?,​?,​?> getProducer​(org.apache.beam.sdk.values.PValue value)
        Get the AppliedPTransform that produced the provided PValue.
      • getCurrentParent

        org.apache.beam.sdk.runners.AppliedPTransform<?,​?,​?> getCurrentParent()
        Gets the parent composite transform to the current transform, if one exists. Otherwise returns one null.