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:53:01 GMT
Repository: storm
Updated Branches:
  refs/heads/1.x-branch c364f4daa -> a8d805121


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

Branch: refs/heads/1.x-branch
Commit: f01372f23c3a658aee05c5e236313dd59ec4325b
Parents: c364f4d
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:30:07 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/f01372f2/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