Class SpannerWriteResult
java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.SpannerWriteResult
- All Implemented Interfaces:
POutput
The results of a
SpannerIO.write()
transform.
Use getFailedMutations()
to access a PCollection
of MutationGroups that
failed to write.
The PCollection
returned by getOutput()
can be used in batch pipelines as a
completion signal to Wait.OnSignal
to indicate when
all input has been written. Note that in streaming pipelines, this signal will never be triggered
as the input is unbounded and this PCollection
is using the GlobalWindow
.
-
Constructor Summary
ConstructorsConstructorDescriptionSpannerWriteResult
(Pipeline pipeline, PCollection<Void> output, PCollection<MutationGroup> failedMutations, TupleTag<MutationGroup> failedMutationsTag) -
Method Summary
Modifier and TypeMethodDescriptionexpand()
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.
-
Constructor Details
-
SpannerWriteResult
public SpannerWriteResult(Pipeline pipeline, PCollection<Void> output, PCollection<MutationGroup> failedMutations, TupleTag<MutationGroup> failedMutationsTag)
-
-
Method Details
-
getPipeline
Description copied from interface:POutput
- Specified by:
getPipeline
in interfacePOutput
-
expand
Description copied from interface:POutput
Expands thisPOutput
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
-
getFailedMutations
-
getOutput
-
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
-