You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Alexis Sukrieh <su...@gmail.com> on 2014/05/19 13:57:09 UTC

How to catch exceptions from a Spout

Hi there,

First of all, as this is my first message to the list, I'd like to thank
you all for Storm, this project is impressive and is very interesting. I'm
glad I found it for the new project I'm working on! It's a pleasure to
learn how to master it.

Here comes my first questions.

I've built a topology with a Spout that emits tweets from the "Sample"
streaming API, using twitter4j.

This is working fine, but every once in a while, I get an exception from
twitter4j which results in an "unserializable exception" error showing up
in my Storm UI (under the "last error" field).

I'd like to catch that exception but I clearly have no clue where this can
be caught. Anyone has an idea on the good way (if any) to catch exceptions
in a Spout?

Also, my Spout's stats remain empty (0 acked and 0 failed) no matter of my
bolts activities (counters are updated perfectly for them). Is there any
reason for that? I thought the stats for the Spout would be the sum of the
bolts.

Should I ack/fail tuples from the Spout itself? If so, it looks a bit
complicated to implement, it would mean to keep a state somewhere between
bolts and spout. Am I missing something?

Thanks a lot for your help!

-- 
Alexis Sukrieh

http://twitter.com/sukria - http://blog.sukria.net

"People get annoyed when you try to debug them." -- Larry Wall