public List < String > getSpoutNames ( PhysicalPlan pp ) { TopologyAPI . Topology localTopology = pp . getTopology ( ) ; ArrayList < String > spoutNames = new ArrayList <> ( ) ; for ( TopologyAPI . Spout spout : localTopology . getSpoutsList ( ) ) { spoutNames . add ( spout . getComp ( ) . getName ( ) ) ; } return spoutNames ; }
A utility method to extract spout component names from the topology .