Thanks Andrew

Here is the events I got from Kafka, I only print out the field timestamp:

2013-03-22 12:43:00-07:00
2013-03-22 12:44:00-07:00
2013-03-22 12:45:00-07:00
2013-03-22 12:49:00-07:00
2013-03-22 12:47:00-07:00
2013-03-22 12:48:00-07:00
2013-03-22 12:46:00-07:00
2013-03-22 12:51:00-07:00
2013-03-22 12:50:00-07:00
2013-03-22 12:52:00-07:00
2013-03-22 12:55:00-07:00
2013-03-22 12:54:00-07:00
2013-03-22 12:53:00-07:00
2013-03-22 12:58:00-07:00
2013-03-22 12:57:00-07:00
2013-03-22 12:56:00-07:00

Basically the events are being recorded every minute before it was fed into 
kafka, it was shuffled in kafka, so the timestamp is out of order while reading 
in storm kafkaSpout, I want to be able to sort the tuples based on timestamp 
then emit in order. That will be great if there is example code I can read.

thanks

AL




> On Aug 25, 2015, at 3:47 PM, Andrew Xor <[email protected]> wrote:
> 
> What do you mean by that? It's a bit vague as timestamps can have quite high 
> resolution (like for example minutes, seconds, msec) so you will probably 
> have to do a bit of bucketization before sorting them.... then by using a 
> partition aggregator (in Trident at least) you can to this very easily.
> ​​
> Hope this helps.
> 
> Kindly yours,
> 
> Andrew Grammenos
> 
> -- PGP PKey --
> ​ <https://www.dropbox.com/s/2kcxe59zsi9nrdt/pgpsig.txt>
> https://www.dropbox.com/s/yxvycjvlsc111bh/pgpsig.txt 
> <https://www.dropbox.com/s/ei2nqsen641daei/pgpsig.txt>
> 
> On Wed, Aug 26, 2015 at 1:37 AM, Alec Lee <[email protected] 
> <mailto:[email protected]>> wrote:
> Hi, all
> 
> is there any sample codes to sort the events in terms of the timestamps field 
> of a tuple?
> 
> thanks
> 
> 
> AL
> 

Reply via email to