Github user arunmahadevan commented on a diff in the pull request: https://github.com/apache/storm/pull/2089#discussion_r113388244 --- Diff: storm-client/src/jvm/org/apache/storm/topology/TopologyBuilder.java --- @@ -353,6 +421,31 @@ public void setStateSpout(String id, IRichStateSpout stateSpout, Number parallel } /** + * Define a new spout in this topology. + * + * @param id the id of this component. This id is referenced by other components that want to consume this spout's outputs. + * @param supplier lambda expression that implements tuple generating for this spout + * @throws IllegalArgumentException if {@code parallelism_hint} is not positive + */ + public SpoutDeclarer setSpout(String id, SerializableSupplier<Object> supplier) throws IllegalArgumentException { + return setSpout(id, supplier, null); + } + + /** + * Define a new spout in this topology with the specified parallelism. If the spout declares + * itself as non-distributed, the parallelism_hint will be ignored and only one task + * will be allocated to this component. + * + * @param id the id of this component. This id is referenced by other components that want to consume this spout's outputs. + * @param parallelism_hint the number of tasks that should be assigned to execute this spout. Each task will run on a thread in a process somewhere around the cluster. + * @param supplier lambda expression that implements tuple generating for this spout + * @throws IllegalArgumentException if {@code parallelism_hint} is not positive + */ + public SpoutDeclarer setSpout(String id, SerializableSupplier<Object> supplier, Number parallelism_hint) throws IllegalArgumentException { --- End diff -- same as above
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---