If I register a metrics object with a bolt/spout, will it run in the same thread as the bolt/spout?

2014-06-03 Thread Xueming Li
Or do I need to worry about synchronization issue? Thanks in advance!


If I register a metrics object with a bolt/spout task, will it run in the same thread as the task?

2014-06-03 Thread Xueming Li
Sorry, changed the title to make it more accurate.


On Tue, Jun 3, 2014 at 11:12 PM, Xueming Li james.xueming...@gmail.com
wrote:

 Or do I need to worry about synchronization issue? Thanks in advance!



Custom metrics using IMetrics interface

2014-06-02 Thread Xueming Li
Hi all,

I am working on a project to build an order processing pipeline on top of
Storm. In order to measure performance, for every spout/bolt and every
order processed by them, one requirement is to generate custom metrics in
the form order id, order entry timestamp in milisec, order exit timestamp
in milisec and then use a metrics consumer to collect and further process
those metrics. I will greatly appreciate it if any one can share some ideas
as to how to implement this requirement. My question is, getValueAndReset
in IMetrics interface is a callback method. Looks to me that in order
to collect the metrics using IMetrics interface, I will have to use a
memory queue to temporarily store metrics generated when orders are
processed in any spout and bolt and wait for getValueAndReset to be called.
Any better idea?

Thanks,
James


Re: Storm failover, is it possible to know the last succeeded bolt when fail method gets called in spout?

2014-05-27 Thread Xueming Li
Thank you very much Taylor for prompt reply :-)