You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2016/05/16 09:46:06 UTC
[1/2] storm git commit: fix some comment typos,
add convenience methods for checking if tuple is tick or heartbeat
tuple to match python version
Repository: storm
Updated Branches:
refs/heads/master 946042124 -> efe131d20
fix some comment typos, add convenience methods for checking if tuple is tick or heartbeat tuple to match python version
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/e48b2848
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/e48b2848
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/e48b2848
Branch: refs/heads/master
Commit: e48b28483fe5874a8245b782581d2d513471a2f3
Parents: 0cade64
Author: David Luu <da...@mistsys.com>
Authored: Thu Apr 28 18:33:47 2016 -0700
Committer: David Luu <da...@mistsys.com>
Committed: Thu Apr 28 18:33:47 2016 -0700
----------------------------------------------------------------------
.../src/main/resources/resources/storm.js | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/e48b2848/storm-multilang/javascript/src/main/resources/resources/storm.js
----------------------------------------------------------------------
diff --git a/storm-multilang/javascript/src/main/resources/resources/storm.js b/storm-multilang/javascript/src/main/resources/resources/storm.js
index dc6efc1..c8462ba 100755
--- a/storm-multilang/javascript/src/main/resources/resources/storm.js
+++ b/storm-multilang/javascript/src/main/resources/resources/storm.js
@@ -199,7 +199,7 @@ Storm.prototype.emitDirect = function(commandDetails) {
/**
* Initialize storm component according to the configuration received.
- * @param conf configuration object accrding to storm protocol.
+ * @param conf configuration object according to storm protocol.
* @param context context object according to storm protocol.
* @param done callback. Call this method when finished initializing.
*/
@@ -221,10 +221,18 @@ function Tuple(id, component, stream, task, values) {
this.values = values;
}
+Tuple.prototype.isTickTuple = function(){
+ return this.task === -1 && this.stream === "__tick";
+}
+
+Tuple.prototype.isHeartbeatTuple = function(){
+ return this.task === -1 && this.stream === "__heartbeat";
+}
+
/**
* Base class for storm bolt.
* To create a bolt implement 'process' method.
- * You may also implement initialize method to
+ * You may also implement initialize method too
*/
function BasicBolt() {
Storm.call(this);
@@ -262,7 +270,7 @@ BasicBolt.prototype.handleNewCommand = function(command) {
var self = this;
var tup = new Tuple(command["id"], command["comp"], command["stream"], command["task"], command["tuple"]);
- if (tup.task === -1 && tup.stream === "__heartbeat") {
+ if (tup.isHeartbeatTuple()) {
self.sync();
return;
}
@@ -293,7 +301,6 @@ BasicBolt.prototype.fail = function(tup, err) {
this.sendMsgToParent({"command": "fail", "id": tup.id});
}
-
/**
* Base class for storm spout.
* To create a spout implement the following methods: nextTuple, ack and fail (nextTuple - mandatory, ack and fail
@@ -370,4 +377,4 @@ Spout.prototype.__emit = function(commandDetails) {
}
module.exports.BasicBolt = BasicBolt;
-module.exports.Spout = Spout;
\ No newline at end of file
+module.exports.Spout = Spout;
[2/2] storm git commit: Merge branch 'master' of
https://github.com/daluu/storm into storm-pr-1378
Posted by ka...@apache.org.
Merge branch 'master' of https://github.com/daluu/storm into storm-pr-1378
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/efe131d2
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/efe131d2
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/efe131d2
Branch: refs/heads/master
Commit: efe131d20319f2a1044e3922dadb8c25cb832b3c
Parents: 9460421 e48b284
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Mon May 16 18:43:09 2016 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Mon May 16 18:43:09 2016 +0900
----------------------------------------------------------------------
.../src/main/resources/resources/storm.js | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------