public SpoutDeclarer setSpout ( String id , IRichSpout spout , Number parallelismHint ) { validateComponentName ( id ) ; SpoutDeclarer s = new SpoutDeclarer ( id , spout , parallelismHint ) ; spouts . put ( id , s ) ; return s ; }
Define a new spout in this topology with the specified parallelism . If the spout declares itself as non - distributed the parallelismHint will be ignored and only one task will be allocated to this component .