You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Link Wang <li...@gmail.com> on 2014/07/14 17:27:57 UTC

回复: How to specify StreamID in storm-kafka spout?

Thanks for your reply, but i mean that KafkaSpout don't provide a way to set stream id, and from it's source code, i found this statement in PartitionManager class: 
collector.emit(tup, new KafkaMessageId(partition, offset);
And this is the only emit call.

Vladi Feigin <vl...@gmail.com>编写:

>You need to pass the stream ID (you define it ) in SpoutOutputCollector emit method (first parameter)
>
>And  you need also to pass stream id when you build a topology (TopologyBuilder) . For example when you call shuffleGrouping method 
>
>Vladi
>
>
>
>
>On Mon, Jul 14, 2014 at 11:50 AM, Link Wang <li...@gmail.com> wrote:
>
>Dear all, 
>
>
>    I'm using KafkaSpout of 0.9.2-incubating, I want my KafkaSpout to emit more than one stream with given streamID, but It seems that there's not way to do this. any help? 
>
>bellow is my pom dependency of storm-kafka: 
>
>        <dependency>
>
>            <groupId>org.apache.storm</groupId>
>
>            <artifactId>storm-kafka</artifactId>
>
>            <version>0.9.2-incubating</version>
>
>        </dependency>
>
>
>Link Wang
>
>