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-2264 OpaqueTridentKafkaSpout failing after STORM-2216
Date Sun, 08 Jan 2017 23:52:52 GMT
Repository: storm
Updated Branches:
  refs/heads/1.0.x-branch ce0b155d5 -> 3b0837ee4


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

Branch: refs/heads/1.0.x-branch
Commit: 451ef9358f03d153b142fb2187ed6e9c562c8faf
Parents: ce0b155
Author: Jungtaek Lim <kabhwan@gmail.com>
Authored: Thu Jan 5 01:24:25 2017 +0900
Committer: Jungtaek Lim <kabhwan@gmail.com>
Committed: Mon Jan 9 08:50:57 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/451ef935/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 df426d1..906906d 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
@@ -150,7 +150,9 @@ public class TransactionalState {
         path = "/" + path;
         try {
             if(_curator.checkExists().forPath(path)!=null) {
-                return 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
+                return JSONValue.parse(new String(_curator.getData().forPath(path), "UTF-8"));
             } else {
                 return null;
             }


Mime
View raw message