You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Avirup Ganguly <av...@tcs.com> on 2015/07/02 06:46:30 UTC

Tick Tuple not functioning in apache storm 0.9.4

Hi,
     I have recently migrated storm version from 0.8.2 to 0.9.4. 
     In 0.8.2 I had  implemented tick tuple functionality in a bolt in my 
code. Tick tuple code in the bolt class is given  below:

private static boolean isTickTuple(Tuple tuple) {
  return tuple.getSourceComponent().equals(Constants.SYSTEM_COMPONENT_ID)
    && tuple.getSourceStreamId().equals(Constants.SYSTEM_TICK_STREAM_ID);
}


@Override
public Map<String, Object> getComponentConfiguration() {
  Config conf = new Config();
  int tickFrequencyInSeconds = 10;
  conf.put(Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS, tickFrequencyInSeconds);
  return conf;
}

 and also in execute method of that bolt class my code looks like below:

@Override
public void execute(Tuple tuple) {
  if (isTickTuple(tuple)) {
    // now you can trigger e.g. a periodic activity
  }
  else {
    // do something with the normal tuple
  }
}

 When i used to run the topology it used to trigger periodic activity 
after the time specified in tickfrequency seconds(configured in 
"getComponentConfiguration" method).
But the same piece of code is not running  in apache storm version 
0.9.4.The code inside if block is never getting executed because" 
isTickTuple" method is returning false always.
The other functionalities are working perfectly in apache storm 0.9.4 but 
tick tuple is not functioning as expected. Can you help.

Regards,
Avirup Ganguly
Tata Consultancy Services
Mailto: avirup.ganguly@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Consulting
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you