Package org.apache.beam.sdk.transforms
Class WithFailures.Result<OutputT extends POutput,FailureElementT>
- java.lang.Object
-
- org.apache.beam.sdk.transforms.WithFailures.Result<OutputT,FailureElementT>
-
- Type Parameters:
OutputT
- Output typeFailureElementT
- Element type for the failurePCollection
- Enclosing class:
- WithFailures
public abstract static class WithFailures.Result<OutputT extends POutput,FailureElementT> extends java.lang.Object implements PInput, POutput
An intermediate output type for PTransforms that allows an output collection to live alongside a collection of elements that failed the transform.
-
-
Constructor Summary
Constructors Constructor Description Result()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.Map<TupleTag<?>,PValue>
expand()
abstract PCollection<FailureElementT>
failures()
OutputT
failuresTo(java.util.List<PCollection<FailureElementT>> failureCollections)
Adds the failure collection to the passed list and returns just the output collection.void
finishSpecifyingOutput(java.lang.String transformName, PInput input, PTransform<?,?> transform)
As part of applying the producingPTransform
, finalizes this output to make it ready for being used as an input and for running.Pipeline
getPipeline()
static <OutputElementT,FailureElementT>
WithFailures.Result<PCollection<OutputElementT>,FailureElementT>of(PCollection<OutputElementT> output, PCollection<FailureElementT> failures)
static <OutputElementT,FailureElementT>
WithFailures.Result<PCollection<OutputElementT>,FailureElementT>of(PCollectionTuple tuple, TupleTag<OutputElementT> outputTag, TupleTag<FailureElementT> failureTag)
static <OutputT extends POutput,FailureElementT>
WithFailures.Result<OutputT,FailureElementT>of(OutputT output, PCollection<FailureElementT> failures)
abstract OutputT
output()
-
-
-
Method Detail
-
output
public abstract OutputT output()
-
failures
public abstract PCollection<FailureElementT> failures()
-
of
public static <OutputT extends POutput,FailureElementT> WithFailures.Result<OutputT,FailureElementT> of(OutputT output, PCollection<FailureElementT> failures)
-
of
public static <OutputElementT,FailureElementT> WithFailures.Result<PCollection<OutputElementT>,FailureElementT> of(PCollection<OutputElementT> output, PCollection<FailureElementT> failures)
-
of
public static <OutputElementT,FailureElementT> WithFailures.Result<PCollection<OutputElementT>,FailureElementT> of(PCollectionTuple tuple, TupleTag<OutputElementT> outputTag, TupleTag<FailureElementT> failureTag)
-
failuresTo
public OutputT failuresTo(java.util.List<PCollection<FailureElementT>> failureCollections)
Adds the failure collection to the passed list and returns just the output collection.
-
getPipeline
public Pipeline getPipeline()
Description copied from interface:PInput
- Specified by:
getPipeline
in interfacePInput
- Specified by:
getPipeline
in interfacePOutput
-
expand
public java.util.Map<TupleTag<?>,PValue> expand()
Description copied from interface:PInput
Expands thisPInput
into a list of its component outputPValues
.- A
PValue
expands to itself. - A tuple or list of
PValues
(such asPCollectionTuple
orPCollectionList
) expands to its componentPValue PValues
.
Not intended to be invoked directly by user code.
- A
-
finishSpecifyingOutput
public void finishSpecifyingOutput(java.lang.String transformName, PInput input, PTransform<?,?> transform)
Description copied from interface:POutput
As part of applying the producingPTransform
, finalizes this output to make it ready for being used as an input and for running.This includes ensuring that all
PCollections
haveCoders
specified or defaulted.Automatically invoked whenever this
POutput
is output, afterPOutput.finishSpecifyingOutput(String, PInput, PTransform)
has been called on each componentPValue
returned byPOutput.expand()
.- Specified by:
finishSpecifyingOutput
in interfacePOutput
-
-