Repository: storm
Updated Branches:
  refs/heads/1.0.x-branch 7fcbf93ed -> fc4179c0f


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

Branch: refs/heads/1.0.x-branch
Commit: b873995e4daeffabdb9edaf69a4b5e712c830043
Parents: 7fcbf93
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:18:15 2016 +0900

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


http://git-wip-us.apache.org/repos/asf/storm/blob/b873995e/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