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.void
finishSpecifyingOutput
(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 OutputT
output()
-
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:
getPipeline
in interfacePInput
- Specified by:
getPipeline
in interfacePOutput
-
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
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
-