Repository: storm
Updated Branches:
  refs/heads/1.x-branch e606a9be5 -> 36522d2f1


A better way to get default value


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

Branch: refs/heads/1.x-branch
Commit: b23c95ad05f86df19fa2eccc139f6ec7e5e4fac3
Parents: e606a9b
Author: lujinhong <lujinho...@gmail.com>
Authored: Thu Jul 21 15:45:12 2016 +0800
Committer: Jungtaek Lim <kabh...@gmail.com>
Committed: Fri Sep 23 10:17:54 2016 +0900

----------------------------------------------------------------------
 .../storm/transactional/TransactionalSpoutCoordinator.java    | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/b23c95ad/storm-core/src/jvm/org/apache/storm/transactional/TransactionalSpoutCoordinator.java
----------------------------------------------------------------------
diff --git 
a/storm-core/src/jvm/org/apache/storm/transactional/TransactionalSpoutCoordinator.java
 
b/storm-core/src/jvm/org/apache/storm/transactional/TransactionalSpoutCoordinator.java
index b49c645..aff054b 100644
--- 
a/storm-core/src/jvm/org/apache/storm/transactional/TransactionalSpoutCoordinator.java
+++ 
b/storm-core/src/jvm/org/apache/storm/transactional/TransactionalSpoutCoordinator.java
@@ -77,12 +77,7 @@ public class TransactionalSpoutCoordinator extends 
BaseRichSpout {
         _collector = collector;
         _coordinator = _spout.getCoordinator(conf, context);
         _currTransaction = getStoredCurrTransaction(_state);
-        Object active = conf.get(Config.TOPOLOGY_MAX_SPOUT_PENDING);
-        if(active==null) {
-            _maxTransactionActive = 1;
-        } else {
-            _maxTransactionActive = Utils.getInt(active);
-        }
+        _maxTransactionActive = 
Utils.getInt(conf.get(Config.TOPOLOGY_MAX_SPOUT_PENDING), 1);
         _initializer = new StateInitializer();
     }
 

Reply via email to