Class CountingPipelineVisitor

  • All Implemented Interfaces:
    org.apache.beam.sdk.Pipeline.PipelineVisitor

    public class CountingPipelineVisitor
    extends org.apache.beam.sdk.Pipeline.PipelineVisitor.Defaults
    Pipeline visitors that fills a lookup table of PValue to number of consumers.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.beam.sdk.Pipeline.PipelineVisitor

        org.apache.beam.sdk.Pipeline.PipelineVisitor.CompositeBehavior, org.apache.beam.sdk.Pipeline.PipelineVisitor.Defaults
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getNumConsumers​(org.apache.beam.sdk.values.PValue value)
      Calculate number of consumers of a given PValue.
      void visitPrimitiveTransform​(org.apache.beam.sdk.runners.TransformHierarchy.Node node)  
      • Methods inherited from class org.apache.beam.sdk.Pipeline.PipelineVisitor.Defaults

        enterCompositeTransform, enterPipeline, getPipeline, leaveCompositeTransform, leavePipeline, visitValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CountingPipelineVisitor

        public CountingPipelineVisitor()
    • Method Detail

      • visitPrimitiveTransform

        public void visitPrimitiveTransform​(org.apache.beam.sdk.runners.TransformHierarchy.Node node)
        Specified by:
        visitPrimitiveTransform in interface org.apache.beam.sdk.Pipeline.PipelineVisitor
        Overrides:
        visitPrimitiveTransform in class org.apache.beam.sdk.Pipeline.PipelineVisitor.Defaults
      • getNumConsumers

        public int getNumConsumers​(org.apache.beam.sdk.values.PValue value)
        Calculate number of consumers of a given PValue.
        Parameters:
        value - PValue to perform calculation for.
        Returns:
        Number of consumers.