@Internal public static interface Pipeline.PipelineVisitor
A Pipeline.PipelineVisitor
can be passed into Pipeline.traverseTopologically(org.apache.beam.sdk.Pipeline.PipelineVisitor)
to be
called for each of the transforms and values in the Pipeline
.
Modifier and Type | Interface and Description |
---|---|
static class |
Pipeline.PipelineVisitor.CompositeBehavior
Control enum for indicating whether or not a traversal should process the contents of a
composite transform or not.
|
static class |
Pipeline.PipelineVisitor.Defaults
Default no-op
Pipeline.PipelineVisitor that enters all composite transforms. |
Modifier and Type | Method and Description |
---|---|
Pipeline.PipelineVisitor.CompositeBehavior |
enterCompositeTransform(org.apache.beam.sdk.runners.TransformHierarchy.Node node)
Called for each composite transform after all topological predecessors have been visited but
before any of its component transforms.
|
void |
enterPipeline(Pipeline p)
Called before visiting anything values or transforms, as many uses of a visitor require
access to the
Pipeline object itself. |
void |
leaveCompositeTransform(org.apache.beam.sdk.runners.TransformHierarchy.Node node)
Called for each composite transform after all of its component transforms and their outputs
have been visited.
|
void |
leavePipeline(Pipeline pipeline)
Called when all values and transforms in a
Pipeline have been visited. |
void |
visitPrimitiveTransform(org.apache.beam.sdk.runners.TransformHierarchy.Node node)
Called for each primitive transform after all of its topological predecessors and inputs have
been visited.
|
void |
visitValue(PValue value,
org.apache.beam.sdk.runners.TransformHierarchy.Node producer)
Called for each value after the transform that produced the value has been visited.
|
void enterPipeline(Pipeline p)
Pipeline
object itself.Pipeline.PipelineVisitor.CompositeBehavior enterCompositeTransform(org.apache.beam.sdk.runners.TransformHierarchy.Node node)
The return value controls whether or not child transforms are visited.
void leaveCompositeTransform(org.apache.beam.sdk.runners.TransformHierarchy.Node node)
void visitPrimitiveTransform(org.apache.beam.sdk.runners.TransformHierarchy.Node node)
void visitValue(PValue value, org.apache.beam.sdk.runners.TransformHierarchy.Node producer)