public class TransformTreeNode extends Object
| Constructor and Description |
|---|
TransformTreeNode(TransformTreeNode enclosingNode,
PTransform<?,?> transform,
String fullName,
PInput input)
Creates a new TransformTreeNode with the given parent and transform.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addComposite(TransformTreeNode node)
Adds a composite operation to the transform node.
|
void |
addInputProducer(PValue expandedInput,
TransformTreeNode producer)
Adds an input to the transform node.
|
void |
finishSpecifying()
Finish specifying a transform.
|
TransformTreeNode |
getEnclosingNode()
Returns the enclosing composite transform node, or null if there is none.
|
Collection<? extends PValue> |
getExpandedOutputs()
Returns the transform outputs, in expanded form.
|
String |
getFullName() |
PInput |
getInput()
Returns the transform input, in unexpanded form.
|
Map<PValue,TransformTreeNode> |
getInputs()
Returns a mapping of inputs to the producing nodes for all inputs to
the transform.
|
POutput |
getOutput()
Returns the transform output, in unexpanded form.
|
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 |
setOutput(POutput output)
Adds an output to the transform node.
|
void |
visit(Pipeline.PipelineVisitor visitor,
Set<PValue> visitedValues)
Visit the transform node.
|
public TransformTreeNode(@Nullable TransformTreeNode enclosingNode, @Nullable PTransform<?,?> transform, String fullName, @Nullable PInput input)
EnclosingNode and transform may both be null for a root-level node, which holds all other nodes.
enclosingNode - the composite node containing this nodetransform - the PTransform tracked by this nodefullName - the fully qualified name of the transforminput - the unexpanded input to the transformpublic PTransform<?,?> getTransform()
public TransformTreeNode getEnclosingNode()
public void addComposite(TransformTreeNode node)
As soon as a node is added, the transform node is considered a composite operation instead of a primitive transform.
public boolean isCompositeNode()
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.
public boolean isRootNode()
public String getFullName()
public void addInputProducer(PValue expandedInput, TransformTreeNode producer)
public PInput getInput()
public Map<PValue,TransformTreeNode> getInputs()
public void setOutput(POutput output)
public POutput getOutput()
public Collection<? extends PValue> getExpandedOutputs()
public void visit(Pipeline.PipelineVisitor visitor, Set<PValue> visitedValues)
Provides an ordered visit of the input values, the primitive transform (or child nodes for composite transforms), then the output values.
public void finishSpecifying()
All inputs are finished first, then the transform, then all outputs.