storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kabh...@apache.org
Subject [1/3] storm git commit: STORM-1937 Fix WindowTridentProcessor cause NullPointerException
Date Sun, 03 Jul 2016 06:48:25 GMT
Repository: storm
Updated Branches:
  refs/heads/1.x-branch af0c2a3d2 -> ef0f1b64f


STORM-1937 Fix WindowTridentProcessor cause NullPointerException

* Closes #1531


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

Branch: refs/heads/1.x-branch
Commit: 93f7a27ca0eca72884d443615c05af3f69a8b643
Parents: af0c2a3
Author: wangperry <339359521@163.com>
Authored: Thu Jun 30 18:51:08 2016 +0800
Committer: Jungtaek Lim <kabhwan@gmail.com>
Committed: Sun Jul 3 15:45:41 2016 +0900

----------------------------------------------------------------------
 .../storm/trident/windowing/WindowTridentProcessor.java      | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/93f7a27c/storm-core/src/jvm/org/apache/storm/trident/windowing/WindowTridentProcessor.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/trident/windowing/WindowTridentProcessor.java
b/storm-core/src/jvm/org/apache/storm/trident/windowing/WindowTridentProcessor.java
index 9b12057..59110e6 100644
--- a/storm-core/src/jvm/org/apache/storm/trident/windowing/WindowTridentProcessor.java
+++ b/storm-core/src/jvm/org/apache/storm/trident/windowing/WindowTridentProcessor.java
@@ -164,10 +164,12 @@ public class WindowTridentProcessor implements TridentProcessor {
 
         if (retriedAttempt(batchId)) {
             pendingTriggerIds = (List<Integer>) windowStore.get(inprocessTriggerKey(batchTxnId));
-            for (Integer pendingTriggerId : pendingTriggerIds) {
-                triggerKeys.add(triggerKey(pendingTriggerId));
+            if (pendingTriggerIds != null) {
+                for (Integer pendingTriggerId : pendingTriggerIds) {
+                    triggerKeys.add(triggerKey(pendingTriggerId));
+                }
+                triggerValues = windowStore.get(triggerKeys);
             }
-            triggerValues = windowStore.get(triggerKeys);
         }
 
         // if there are no trigger values in earlier attempts or this is a new batch, emit
pending triggers.


Mime
View raw message