Package org.apache.beam.sdk.runners
Class TransformHierarchy.Node
- java.lang.Object
-
- org.apache.beam.sdk.runners.TransformHierarchy.Node
-
- Enclosing class:
- TransformHierarchy
public class TransformHierarchy.Node extends java.lang.Object
Provides internal tracking of transform relationships with helper methods for initialization and ordered visitation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addComposite(TransformHierarchy.Node node)
Adds a composite operation to the transform node.TransformHierarchy.Node
getEnclosingNode()
Returns the enclosing composite transform node, or null if there is none.java.lang.String
getFullName()
java.util.Map<TupleTag<?>,PCollection<?>>
getInputs()
Returns the transform input, in fully expanded form.java.util.Map<TupleTag<?>,PCollection<?>>
getOutputs()
Returns the transform output, in expanded form.@Nullable PTransform<?,?>
getTransform()
Returns the transform associated with this transform node.boolean
isCompositeNode()
Returns true if this node represents a composite transform that does not perform processing of its own, but merely encapsulates a sub-pipeline (which may be empty).boolean
isRootNode()
void
replaceChild(TransformHierarchy.Node existing, TransformHierarchy.Node replacement)
Replace a sub-node of this transform node.AppliedPTransform<?,?,?>
toAppliedPTransform(Pipeline pipeline)
Returns theAppliedPTransform
representing thisTransformHierarchy.Node
.java.lang.String
toString()
-
-
-
Method Detail
-
getTransform
public @Nullable PTransform<?,?> getTransform()
Returns the transform associated with this transform node.- Returns:
null
if and only if this is the root node of the graph, which has no associated transform
-
getEnclosingNode
public TransformHierarchy.Node getEnclosingNode()
Returns the enclosing composite transform node, or null if there is none.
-
addComposite
public void addComposite(TransformHierarchy.Node node)
Adds a composite operation to the transform node.As soon as a node is added, the transform node is considered a composite operation instead of a primitive transform.
-
replaceChild
public void replaceChild(TransformHierarchy.Node existing, TransformHierarchy.Node replacement)
Replace a sub-node of this transform node.The existing
TransformHierarchy.Node
must be a direct child of thisTransformHierarchy.Node
. The replacement node need not be fully specified.
-
isCompositeNode
public boolean isCompositeNode()
Returns true if this node represents a composite transform that does not perform processing of its own, but merely encapsulates a sub-pipeline (which may be empty).Note that a node may be composite with no sub-transforms if it returns its input directly extracts a component of a tuple, or other operations that occur at pipeline assembly time.
-
isRootNode
public boolean isRootNode()
-
getFullName
public java.lang.String getFullName()
-
getInputs
public java.util.Map<TupleTag<?>,PCollection<?>> getInputs()
Returns the transform input, in fully expanded form.
-
getOutputs
public java.util.Map<TupleTag<?>,PCollection<?>> getOutputs()
Returns the transform output, in expanded form.
-
toAppliedPTransform
public AppliedPTransform<?,?,?> toAppliedPTransform(Pipeline pipeline)
Returns theAppliedPTransform
representing thisTransformHierarchy.Node
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-