Github user HeartSaVioR commented on a diff in the pull request:
https://github.com/apache/storm/pull/286#discussion_r18745322
--- Diff: storm-core/src/jvm/backtype/storm/spout/ShellSpout.java ---
@@ -189,9 +207,53 @@ private void handleLog(ShellMsg shellMsg) {
@Override
public void activate() {
+ LOG.info("Start checking heartbeat...");
+ // prevent timer to check heartbeat based on last thing before
activate
+ setHeartbeat();
+ heartBeatExecutor.scheduleAtFixedRate(new
SpoutHeartbeatTimerTask(this), 1, 1, TimeUnit.SECONDS);
--- End diff --
@itaifrenkel I don't know well about ScheduledThreadPoolExecutor, so I have
a question.
When our runnable task runs within 1s, can task be executed by fixed rate?
If it is, I think scheduleAtFixedRate makes sense. I'm expecting heartbeat
check exactly per 1s.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---