You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by td...@apache.org on 2016/02/08 21:34:24 UTC

phoenix git commit: PHOENIX-2653 Use data.tx.zookeeper.quorum property to initialize TransactionServiceClient falling back to HBase ZK quorum setting

Repository: phoenix
Updated Branches:
  refs/heads/master b0122a541 -> 39a982db9


PHOENIX-2653 Use data.tx.zookeeper.quorum property to initialize TransactionServiceClient falling back to HBase ZK quorum setting


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

Branch: refs/heads/master
Commit: 39a982db98f52b33decb30ec51ca4b92a230abd2
Parents: b0122a5
Author: Thomas D'Silva <td...@salesforce.com>
Authored: Mon Feb 8 12:11:05 2016 -0800
Committer: Thomas D'Silva <td...@salesforce.com>
Committed: Mon Feb 8 12:27:58 2016 -0800

----------------------------------------------------------------------
 .../phoenix/query/ConnectionQueryServicesImpl.java       | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/39a982db/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 8eba40b..f2a4512 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -187,6 +187,12 @@ import org.apache.twill.zookeeper.ZKClients;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import co.cask.tephra.TransactionSystemClient;
+import co.cask.tephra.TxConstants;
+import co.cask.tephra.distributed.PooledClientProvider;
+import co.cask.tephra.distributed.TransactionServiceClient;
+import co.cask.tephra.hbase98.coprocessor.TransactionProcessor;
+
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Joiner;
 import com.google.common.base.Throwables;
@@ -346,7 +352,10 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement
     }
     
     private void initTxServiceClient() {
-        String zkQuorumServersString = connectionInfo.getZookeeperQuorum()+":"+connectionInfo.getPort();
+        String zkQuorumServersString = this.getProps().get(TxConstants.Service.CFG_DATA_TX_ZOOKEEPER_QUORUM);
+        if (zkQuorumServersString==null) {
+            zkQuorumServersString = connectionInfo.getZookeeperQuorum()+":"+connectionInfo.getPort();
+        }
         ZKClientService zkClientService = ZKClientServices.delegate(
                   ZKClients.reWatchOnExpire(
                     ZKClients.retryOnFailure(