You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Mohsen Bande <mo...@gmail.com> on 2016/11/07 06:47:36 UTC

how to pause a topology

Hi Everyone,
i know that it is possible to deactivate the spouts
is there any way to pause all spout/bolts? i.e. keep waiting tuples from
processing?
i don't wan't to discard them, as some time later i need to resume the
topology
Thank you

Re: how to pause a topology

Posted by Navin Ipe <na...@searchlighthealth.com>.
This can also be a simple logic in the spout nextTuple(). Something like:
if (pauseEmitting) {
  //don't do anything
}
else {
  //emit tuples
}

On Mon, Nov 7, 2016 at 3:58 PM, Mohsen Bande <mo...@gmail.com> wrote:

> Charles,
> when a component received a pause control tuple, what should it do with
> incoming data tuples?
> should it fail/ack them? or wait forever? none of these seems good design
>
> On Mon, Nov 7, 2016 at 10:59 AM, mr_djzhu@163.com <mr...@163.com>
> wrote:
>
>> Hi Bande,
>> You may set a "control bolt", and let all the other spout/bolt group from
>> this "control bolt". Then what you need is just to send something like
>> "control tuple" from "control bolt" to pause or resume other components.
>> Hope this will help you.
>>
>> ------------------------------
>> *Best regards!*
>> *Charles.Zhu*
>>
>>
>> *From:* Mohsen Bande <mo...@gmail.com>
>> *Date:* 2016-11-07 15:17
>> *To:* user <us...@storm.apache.org>
>> *Subject:* how to pause a topology
>> Hi Everyone,
>> i know that it is possible to deactivate the spouts
>> is there any way to pause all spout/bolts? i.e. keep waiting tuples from
>> processing?
>> i don't wan't to discard them, as some time later i need to resume the
>> topology
>> Thank you
>>
>>
>


-- 
Regards,
Navin

Re: how to pause a topology

Posted by Mohsen Bande <mo...@gmail.com>.
Charles,
when a component received a pause control tuple, what should it do with
incoming data tuples?
should it fail/ack them? or wait forever? none of these seems good design

On Mon, Nov 7, 2016 at 10:59 AM, mr_djzhu@163.com <mr...@163.com> wrote:

> Hi Bande,
> You may set a "control bolt", and let all the other spout/bolt group from
> this "control bolt". Then what you need is just to send something like
> "control tuple" from "control bolt" to pause or resume other components.
> Hope this will help you.
>
> ------------------------------
> *Best regards!*
> *Charles.Zhu*
>
>
> *From:* Mohsen Bande <mo...@gmail.com>
> *Date:* 2016-11-07 15:17
> *To:* user <us...@storm.apache.org>
> *Subject:* how to pause a topology
> Hi Everyone,
> i know that it is possible to deactivate the spouts
> is there any way to pause all spout/bolts? i.e. keep waiting tuples from
> processing?
> i don't wan't to discard them, as some time later i need to resume the
> topology
> Thank you
>
>

Re: how to pause a topology

Posted by "mr_djzhu@163.com" <mr...@163.com>.
Hi Bande,
You may set a "control bolt", and let all the other spout/bolt group from this "control bolt". Then what you need is just to send something like "control tuple" from "control bolt" to pause or resume other components.
Hope this will help you.



Best regards!
Charles.Zhu
 
From: Mohsen Bande
Date: 2016-11-07 15:17
To: user
Subject: how to pause a topology
Hi Everyone,
i know that it is possible to deactivate the spouts
is there any way to pause all spout/bolts? i.e. keep waiting tuples from processing?
i don't wan't to discard them, as some time later i need to resume the topology
Thank you