You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2017/02/01 23:54:04 UTC
[1/3] storm git commit: STORM-2331: Emitting from JavaScript should
work when not using anchoring or when anchoring into multiple tuples.
Repository: storm
Updated Branches:
refs/heads/master 1064ed107 -> 9c8d7b916
STORM-2331: Emitting from JavaScript should work when not using anchoring or when anchoring
into multiple tuples.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/03b8b793
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/03b8b793
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/03b8b793
Branch: refs/heads/master
Commit: 03b8b793616d8b75130746fd496c622a50ba9ad9
Parents: 1811273
Author: Antti J�rvinen <an...@alupark.fi>
Authored: Sat Jan 28 13:11:26 2017 +0200
Committer: Antti J�rvinen <an...@alupark.fi>
Committed: Sat Jan 28 13:22:26 2017 +0200
----------------------------------------------------------------------
.../src/main/resources/resources/storm.js | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/03b8b793/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 c8462ba..206119c 100755
--- a/storm-multilang/javascript/src/main/resources/resources/storm.js
+++ b/storm-multilang/javascript/src/main/resources/resources/storm.js
@@ -138,9 +138,10 @@ Storm.prototype.handleNewTaskId = function(taskIds) {
*
* For bolt, the json must contain the required fields:
* - tuple - the value to emit
- * - anchorTupleId - the value of the anchor tuple (the input tuple that lead to this emit). Used to track the source
* tuple and return ack when all components successfully finished to process it.
* and may contain the optional fields:
+ * - anchorTupleId - the value of the anchor tuple or array of anchor tuples (the input tuple(s) that lead to this emit).
+ * Used to track the source tuple and return ack when all components successfully finished to process it.
* - stream (if empty - emit to default stream)
*
* For spout, the json must contain the required fields:
@@ -175,10 +176,10 @@ Storm.prototype.emit = function(messageDetails, onTaskIds) {
*
* For bolt, the json must contain the required fields:
* - tuple - the value to emit
- * - anchorTupleId - the value of the anchor tuple (the input tuple that lead to this emit). Used to track the source
- * tuple and return ack when all components successfully finished to process it.
* - task - indicate the task to send the tuple to.
* and may contain the optional fields:
+ * - anchorTupleId - the value of the anchor tuple or array of anchor tuples (the input tuple(s) that lead to this emit).
+ * Used to track the source tuple and return ack when all components successfully finished to process it.
* - stream (if empty - emit to default stream)
*
* For spout, the json must contain the required fields:
@@ -246,21 +247,28 @@ BasicBolt.prototype.constructor = BasicBolt;
* Emit message.
* @param commandDetails json with the required fields:
* - tuple - the value to emit
- * - anchorTupleId - the value of the anchor tuple (the input tuple that lead to this emit). Used to track the source
- * tuple and return ack when all components successfully finished to process it.
* and the optional fields:
+ * - anchorTupleId - the value of the anchor tuple or array of anchor tuples (the input tuple(s) that lead to this emit).
+ * Used to track the source tuple and return ack when all components successfully finished to process it.
* - stream (if empty - emit to default stream)
* - task (pass only to emit to specific task)
*/
BasicBolt.prototype.__emit = function(commandDetails) {
var self = this;
+ var anchors = [];
+ if (commandDetails.anchorTupleId instanceof Array) {
+ anchors = commandDetails.anchorTupleId;
+ } else if (commandDetails.anchorTupleId) {
+ anchors = [commandDetails.anchorTupleId];
+ }
+
var message = {
command: "emit",
tuple: commandDetails.tuple,
stream: commandDetails.stream,
task: commandDetails.task,
- anchors: [commandDetails.anchorTupleId]
+ anchors: anchors
};
this.sendMsgToParent(message);
[2/3] storm git commit: Merge branch 'master' of
https://github.com/EitZei/storm into STORM-2331
Posted by sr...@apache.org.
Merge branch 'master' of https://github.com/EitZei/storm into STORM-2331
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/dfbf6fef
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/dfbf6fef
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/dfbf6fef
Branch: refs/heads/master
Commit: dfbf6fef81fbd8cf29e99b167299177e9907a706
Parents: 1064ed1 03b8b79
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Wed Feb 1 15:46:36 2017 -0800
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Wed Feb 1 15:46:36 2017 -0800
----------------------------------------------------------------------
.../src/main/resources/resources/storm.js | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
[3/3] storm git commit: Added STORM-2331 to CHANGELOG.
Posted by sr...@apache.org.
Added STORM-2331 to CHANGELOG.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/9c8d7b91
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/9c8d7b91
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/9c8d7b91
Branch: refs/heads/master
Commit: 9c8d7b916f09e4d7cc97db1b089496e8ab356a9a
Parents: dfbf6fe
Author: Sriharsha Chintalapani <ha...@hortonworks.com>
Authored: Wed Feb 1 15:47:16 2017 -0800
Committer: Sriharsha Chintalapani <ha...@hortonworks.com>
Committed: Wed Feb 1 15:47:16 2017 -0800
----------------------------------------------------------------------
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/9c8d7b91/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 242a247..112d055 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -195,6 +195,7 @@
* STORM-1769: Added a test to check local nimbus with notifier plugin
## 1.1.0
+ * STORM-2331: Emitting from JavaScript should work when not anchoring.
* STORM-2320: DRPC client printer class reusable for local and remote DRPC.
* STORM-2225: change spout config to be simpler.
* STORM-2330: Fix storm sql code generation for UDAF with non standard sql types