apache_beam.runners.direct.consumer_tracking_pipeline_visitor module

ConsumerTrackingPipelineVisitor, a PipelineVisitor object.

class apache_beam.runners.direct.consumer_tracking_pipeline_visitor.ConsumerTrackingPipelineVisitor[source]

Bases: apache_beam.pipeline.PipelineVisitor

For internal use only; no backwards-compatibility guarantees.

Visitor for extracting value-consumer relations from the graph.

Tracks the AppliedPTransforms that consume each PValue in the Pipeline. This is used to schedule consuming PTransforms to consume input after the upstream transform has produced and committed output.

views

Returns a list of side intputs extracted from the graph.

Returns:A list of pvalue.AsSideInput.
visit_transform(applied_ptransform)[source]
enter_composite_transform(transform_node)

Callback for entering traversal of a composite transform node.

leave_composite_transform(transform_node)

Callback for leaving traversal of a composite transform node.

visit_value(value, producer_node)

Callback for visiting a PValue in the pipeline DAG.

Parameters:
  • value – PValue visited (typically a PCollection instance).
  • producer_node – AppliedPTransform object whose transform produced the pvalue.