Use Storm TickTuples to execute tasks at fixed intervals.
Configure TickTuple interval like so
Config conf = new Config();
conf.put(Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS, 1);
Here's how you tell if it's a tick tuple
if(input.getSourceStreamId().equals("__tick")) {
System.out.println("Got a tick tuple here!");
}
Written by Jamie Rothfeder
Related protips
1 Response
I was searching for the same solution. This helped. :)
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Storm
Authors
Related Tags
#storm
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#