You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by neo21 zerro <ne...@yahoo.com> on 2015/05/07 10:42:31 UTC
KafkaSpout emit partition id and offset in tuple
Hey guys,
I need to access the partition id and offset in a bolt. I see that you emit that via the message ID. Is this information accessible in bolts? Any ideas´?
Many thanks!
Re: KafkaSpout emit partition id and offset in tuple
Posted by neo21 zerro <ne...@yahoo.com>.
very helpful, thanks!
On Monday, May 11, 2015 5:00 PM, Jeff Maass <JM...@cccis.com> wrote:
See :https://github.com/apache/stormmore specifically:https://github.com/apache/storm/blob/master/external/storm-kafka/src/jvm/storm/kafka/PartitionManager.javaInside, the class, KafkaMessageId is defined.You probably want to check out the code for the Storm version you are using. See the branch’s tags.
From: neo21 zerro <ne...@yahoo.com>
Reply-To: "user@storm.apache.org" <us...@storm.apache.org>, neo21 zerro <ne...@yahoo.com>
Date: 2015,Thursday, May 7 at 03:42
To: "user@storm.apache.org" <us...@storm.apache.org>
Subject: KafkaSpout emit partition id and offset in tuple
Hey guys,
I need to access the partition id and offset in a bolt. I see that you emit that via the message ID. Is this information accessible in bolts? Any ideas´?
Many thanks!
Re: KafkaSpout emit partition id and offset in tuple
Posted by Jeff Maass <JM...@cccis.com>.
See :
https://github.com/apache/storm
more specifically:
https://github.com/apache/storm/blob/master/external/storm-kafka/src/jvm/storm/kafka/PartitionManager.java
Inside, the class, KafkaMessageId is defined.
You probably want to check out the code for the Storm version you are using. See the branch's tags.
From: neo21 zerro <ne...@yahoo.com>>
Reply-To: "user@storm.apache.org<ma...@storm.apache.org>" <us...@storm.apache.org>>, neo21 zerro <ne...@yahoo.com>>
Date: 2015,Thursday, May 7 at 03:42
To: "user@storm.apache.org<ma...@storm.apache.org>" <us...@storm.apache.org>>
Subject: KafkaSpout emit partition id and offset in tuple
Hey guys,
I need to access the partition id and offset in a bolt. I see that you emit that via the message ID.
Is this information accessible in bolts? Any ideas´?
Many thanks!
Re: KafkaSpout emit partition id and offset in tuple
Posted by Nathan Leung <nc...@gmail.com>.
You can getMessageId from the tuple:
https://storm.apache.org/apidocs/backtype/storm/tuple/Tuple.html
On May 7, 2015 5:05 AM, "neo21 zerro" <ne...@yahoo.com> wrote:
>
> Hey guys,
>
> I need to access the partition id and offset in a bolt. I see that you
> emit that via the message ID.
> Is this information accessible in bolts? Any ideas´?
>
>
> Many thanks!
>
>