storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [1/3] storm git commit: STORM-742 Let ShellBolt treat all messages to update heartbeat
Date Fri, 14 Aug 2015 13:43:58 GMT
Repository: storm
Updated Branches:
  refs/heads/master d7155d7be -> 5966ff3c5


STORM-742 Let ShellBolt treat all messages to update heartbeat


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/b8150125
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/b8150125
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/b8150125

Branch: refs/heads/master
Commit: b815012509e15a68bdd72cc684ab5cc91dd53b86
Parents: bc530b4
Author: Jungtaek Lim <kabhwan@gmail.com>
Authored: Wed Apr 1 07:02:09 2015 +0900
Committer: Jungtaek Lim <kabhwan@gmail.com>
Committed: Wed Apr 1 07:02:09 2015 +0900

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/task/ShellBolt.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/b8150125/storm-core/src/jvm/backtype/storm/task/ShellBolt.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/task/ShellBolt.java b/storm-core/src/jvm/backtype/storm/task/ShellBolt.java
index 308ec67..96eddfe 100644
--- a/storm-core/src/jvm/backtype/storm/task/ShellBolt.java
+++ b/storm-core/src/jvm/backtype/storm/task/ShellBolt.java
@@ -321,9 +321,11 @@ public class ShellBolt implements IBolt {
                     if (command == null) {
                         throw new IllegalArgumentException("Command not found in bolt message:
" + shellMsg);
                     }
-                    if (command.equals("sync")) {
-                        setHeartbeat();
-                    } else if(command.equals("ack")) {
+
+                    setHeartbeat();
+
+                    // We don't need to take care of sync, cause we're always updating heartbeat
+                    if(command.equals("ack")) {
                         handleAck(shellMsg.getId());
                     } else if (command.equals("fail")) {
                         handleFail(shellMsg.getId());


Mime
View raw message