storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kabh...@apache.org
Subject [1/4] storm git commit: STORM-1937 Fix WindowTridentProcessor cause NullPointerException
Date Sun, 03 Jul 2016 06:48:16 GMT
Repository: storm
Updated Branches:
  refs/heads/master 7d724e8ca -> 0f38aaaeb


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/54effe14
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/54effe14
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/54effe14

Branch: refs/heads/master
Commit: 54effe1492d8890832779a0291deb1928c8300e1
Parents: 7d724e8
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:46:33 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/54effe14/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