Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storm UI: Difference between Execute and Process Latencies

I've been trying to document meaning of all of the Storm metrics for my current project.

During this process I've collected data from this group responses as well as github.

While some of the metrics are pretty self explanatory, I've got really confused with some of the bolt metrics.

For example, what is the difference between Process Latency and Execute Latency?

From the posts on this Google group I've gathered the following information:

  • List item processing latency = timestamp when ack is called - timestamp when execute is passed tuple

  • List item execute latency = timestamp when execute function ends - timestamp when execute is passed tuple (source: http://goo.gl/3KRAl)

and

  • List item Process latency is time until tuple is acked, execute latency is time spent in execute for a tuple (source: http://goo.gl/m0fTC)

Based on what I'm seeing in my storm UI, my Execute Latency is almost always larger than the Process Latency. How could that be? Could anyone help me with exact definition of both latencies?

Thanks in advance!

like image 732
notrockstar Avatar asked May 08 '13 23:05

notrockstar


1 Answers

Ack is called in the execute function of the executor or in nutshell will be called before execute method of a bolt ends. So, execute latency is more. This snippet will make things clear (taken from here as is):

public void execute(Tuple tuple) {
  String sentence = tuple.getString(0);
  for(String word: sentence.split(" ")) {
    _collector.emit(tuple, new Values(word));
  }
  _collector.ack(tuple);
}

I hope this helps.

like image 116
Abhijeet Gaikwad Avatar answered Sep 24 '22 13:09

Abhijeet Gaikwad