You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by "jamesweb3@yahoo.com.tw" <ja...@yahoo.com.tw> on 2014/07/11 04:49:38 UTC
The feature of tick-tuple
Hi, allI use this feature to dump my result to database for a period of time. But sometimes there is no data(normal tuple) to get into my topology, storm still sends tick-tuple so that it always dump to database. Is there a way if no normal tuple, storm will not send the tick-tuple?
James Fu
Re: The feature of tick-tuple
Posted by Stephen Armstrong <st...@linqia.com>.
Could you not just keep a flag in each bolt to keep track?
boolean sawData;
execute(Tuple tuple) {
if (isTick(tuple)) {
if (sawData) {
sawData = false;
... dump to database...
}
} else { // Not a tick tuple
sawData = true;
... do rest of processing ...
}
}
On Thu, Jul 10, 2014 at 7:49 PM, jamesweb3@yahoo.com.tw <
jamesweb3@yahoo.com.tw> wrote:
> Hi, all
> I use this feature to dump my result to database for a period of time. But
> sometimes there is no data(normal tuple) to get into my topology, storm
> still sends tick-tuple so that it always dump to database. Is there a way
> if no normal tuple, storm will not send the tick-tuple?
>
>
> James Fu
>
>