You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Kevin Fu <ke...@gmail.com> on 2015/12/03 10:18:29 UTC

trident problem for stats at intervals

Hi,

I have used the the non-transactional spout and bolt for some tasks.
And it works great.

But when I tried to use the trident topology, I got confused.
What I want to do is to count unique user id in 5 minutes, and save the
number to db.
If I use the non-transactional spout and bolt, I use tick tuples from the
"__system" component and "__tick" stream to trigger the count process every
5 minutes.

So, how can I do this while using trident?
1. Is it possible for a trident topology reading from tick stream?
2. Because the counting is done every 5 minutes, I would clear the user id
set for the next 5 minutes. And is it possible that a trident topology owns
a map/set, and clear it when some special tuple arrived?


I am new to trident and it would be great if anyone could offer any help.

Thank you.