An Apache Storm bolt receive multiple input tuples from different spout/bolt

旧时模样 提交于 2019-12-05 16:49:42

Tutorial answers your question.

https://storm.apache.org/documentation/Tutorial.html

Here is the code for your goal(C/P from tutorial):

builder.setBolt("exclaim2", new ExclamationBolt(), 5)
            .shuffleGrouping("words")
            .shuffleGrouping("exclaim1");

exclaim2 will accept tuples from both words and exclaim1, both using shuffle grouping.

Yes Possible. Only thing to take care is it should follow DAG structure. In your case, below is the flow. 1. Spout reads the data and sends to bolt C 2. Same Spout reads the data and sends to bolt B 3. Bolt B filters some data and forwards to Bolt C

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!