I am not understanding how I would split a stream in Apache Storm. For example, I have bolt A that after some computation has somevalue1, somevalue2, and somevalue3. It wants to send somevalue1 to bolt B, somevalue2 to bolt C, and somevalue1,somevalue2 to bolt D. How would I do this in Storm? What grouping would I use and what would my topology look like? Thank you in advance for your help.
标签:
apache-storm
相关问题
- Is there an alternative to Twitter Storm that is w
- Apache Storm: storm-core build failure
- How to Set spoutconfig from default setting?
- Processing records in order in Storm
- storm topology: one to many (random)
相关文章
- STORM ERROR java.lang.UnsatisfiedLinkError?
- Storm dynamic topology
- Storm topology configuration
- Proper way to ACK in Storm in a chain of bolts
- In storm, how to specify specific version of pytho
- KafkaSpout throws NoClassDefFoundError for log4j
- Max number of tuple replays on Storm Kafka Spout
- how to tune the parallelism hint in storm
You have two options here: Stream Groups and "Direct Grouping". Depending on your requirements, one of them is going to serves you.
Have a look at WordCountTopology sample project to see whether that is what you are looking for. Otherwise, "Direct Grouping" is going to be a better alternative.
But again, picking a grouping strategy depends on your requirements.
You can use different streams if your case needs that, it is not really splitting, but you will have a lot of flexibility, you could use it for content based routing from a bolt for instance:
You declare the stream in the bolt:
You emit from the bolt on the chosen stream:
You listen to the correct stream through the topology