Currently, Streamlet API lacks an operator to allow developer to define multiple output streams that can potentially carries data of different user types.
The equivalent can be achieved by using the Spout/Bolt API, more specifically
SpoutOutputCollector.emit(java.lang.String streamId, java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
or
OutputCollector.emit(java.lang.String streamId, Tuple anchor, java.util.List<java.lang.Object> tuple)
together with
OutputFieldsDeclarer.declareStream(java.lang.String streamId, Fields fields)
to emit different data on different streams.
This would be particularly helpful when developer wants to route different types of data to separate downstream operators, each of which is written in a way that it only understands and handles one specific type of data. Basically, the operator enables the use scenario of "one distributor spout/bolt" -> "multiple processing bolts".
The Stream API in Apache Storm 2.0.0-SNAPSHOT has such a branch operator coming.
Currently, Streamlet API lacks an operator to allow developer to define multiple output streams that can potentially carries data of different user types.
The equivalent can be achieved by using the Spout/Bolt API, more specifically
SpoutOutputCollector.emit(java.lang.String streamId, java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
orOutputCollector.emit(java.lang.String streamId, Tuple anchor, java.util.List<java.lang.Object> tuple)
together withOutputFieldsDeclarer.declareStream(java.lang.String streamId, Fields fields)
to emit different data on different streams.This would be particularly helpful when developer wants to route different types of data to separate downstream operators, each of which is written in a way that it only understands and handles one specific type of data. Basically, the operator enables the use scenario of "one distributor spout/bolt" -> "multiple processing bolts".
The Stream API in Apache Storm 2.0.0-SNAPSHOT has such a branch operator coming.