You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Kashyap Mhaisekar <ka...@gmail.com> on 2014/03/17 05:15:54 UTC

Clean exit of Storm topology

Hi,
I am using Kafka Consumer as a spout while the bolts processes the data.
Since the topology run infinitely waiting for the data to flow by, is there
a way to cleanly exit the topology.
I'd like to know if there is a way to bring down the topology with a clean
exit (meaning, consumer should stop consuming the messages after shutdown
is called, the bolts should finish the jobs being done and finally, the
topology should terminate). terminte can be either via a Ctrl^C, kill from
command line or using the storm jar itself.

Any pointers is appreciated.

Regards,
Kashyap

Re: Clean exit of Storm topology

Posted by Jason Jackson <ja...@gmail.com>.
When you kill a topology you can set a timeout value, e.g. storm kill -w 30
topology-name. This will deactivate the topology first, this allows the
topology to drain itself of all tuples that are in mid-way through
processing. Then 30 seconds later kill -9 is executed on each process.


On Sun, Mar 16, 2014 at 9:15 PM, Kashyap Mhaisekar <ka...@gmail.com>wrote:

> Hi,
> I am using Kafka Consumer as a spout while the bolts processes the data.
> Since the topology run infinitely waiting for the data to flow by, is there
> a way to cleanly exit the topology.
> I'd like to know if there is a way to bring down the topology with a clean
> exit (meaning, consumer should stop consuming the messages after shutdown
> is called, the bolts should finish the jobs being done and finally, the
> topology should terminate). terminte can be either via a Ctrl^C, kill from
> command line or using the storm jar itself.
>
> Any pointers is appreciated.
>
> Regards,
> Kashyap
>
>
>