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-2264 OpaqueTridentKafkaSpout failing after STORM-2216
Date Mon, 09 Jan 2017 00:46:15 GMT
Repository: storm
Updated Branches:
  refs/heads/master b41e9a161 -> e23a4e369


STORM-2264 OpaqueTridentKafkaSpout failing after STORM-2216

* use JSONValue.parse() instead of JSONValue.parseWithException() in TransactionState
  * this just rolls back to previous, doesn't provide better approach


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

Branch: refs/heads/master
Commit: 71269e411bec714f4844790831200dda25d0241b
Parents: abee4d7
Author: Jungtaek Lim <kabhwan@gmail.com>
Authored: Thu Jan 5 01:24:25 2017 +0900
Committer: Jungtaek Lim <kabhwan@gmail.com>
Committed: Thu Jan 5 01:24:25 2017 +0900

----------------------------------------------------------------------
 .../apache/storm/trident/topology/state/TransactionalState.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/71269e41/storm-core/src/jvm/org/apache/storm/trident/topology/state/TransactionalState.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/trident/topology/state/TransactionalState.java
b/storm-core/src/jvm/org/apache/storm/trident/topology/state/TransactionalState.java
index c61f4e4..8b63547 100644
--- a/storm-core/src/jvm/org/apache/storm/trident/topology/state/TransactionalState.java
+++ b/storm-core/src/jvm/org/apache/storm/trident/topology/state/TransactionalState.java
@@ -162,7 +162,9 @@ public class TransactionalState {
         try {
             Object data;
             if(_curator.checkExists().forPath(path)!=null) {
-                data = JSONValue.parseWithException(new String(_curator.getData().forPath(path),
"UTF-8"));
+                // intentionally using parse() instead of parseWithException() to handle
error cases as null
+                // this have been used from the start of Trident so we could treat it as
safer way
+                data = JSONValue.parse(new String(_curator.getData().forPath(path), "UTF-8"));
             } else {
                 data = null;
             }


Mime
View raw message