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 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 -
Method Summary
Modifier and TypeMethodDescriptionexpand()abstract PCollection<FailureElementT> failures()failuresTo(List<PCollection<FailureElementT>> failureCollections) Adds the failure collection to the passed list and returns just the output collection.voidfinishSpecifyingOutput(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.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 OutputToutput()
-
Constructor Details
-
Result
public Result()
-
-
Method Details
-
output
-
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
Adds the failure collection to the passed list and returns just the output collection. -
getPipeline
Description copied from interface:PInput- Specified by:
getPipelinein interfacePInput- Specified by:
getPipelinein interfacePOutput
-
expand
Description copied from interface:PInputExpands thisPInputinto a list of its component outputPValues.- A
PValueexpands to itself. - A tuple or list of
PValues(such asPCollectionTupleorPCollectionList) expands to its componentPValue PValues.
Not intended to be invoked directly by user code.
- A
-
finishSpecifyingOutput
Description copied from interface:POutputAs 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
PCollectionshaveCodersspecified or defaulted.Automatically invoked whenever this
POutputis output, afterPOutput.finishSpecifyingOutput(String, PInput, PTransform)has been called on each componentPValuereturned byPOutput.expand().- Specified by:
finishSpecifyingOutputin interfacePOutput
-