Cron Job in Storm
Posted on 2018-4-16 in Code • Tagged with java, storm • Leave a comment
Add a cron job in Storm is super easy, only need two steps.
1.Overwrite getComponentConfiguration()
method of IComponent
interface.
@Override
public Map<String, Object> getComponentConfiguration() {
Config conf = new Config();
// For example, work in every 60 seconds.
conf.put(Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS, 60);
return conf;
}
2.Check whether a tuple is …
Continue reading