PHOENIX-2670 Guava version incompatibility of Twill vs HBase when launching M/R index
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/61fa462b Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/61fa462b Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/61fa462b Branch: refs/heads/calcite Commit: 61fa462b433296c29b1046e035f811ae159eaa85 Parents: 9dd6bab Author: James Taylor <jamestay...@apache.org> Authored: Fri Feb 19 14:33:27 2016 -0800 Committer: James Taylor <jamestay...@apache.org> Committed: Fri Feb 19 14:34:21 2016 -0800 ---------------------------------------------------------------------- .../phoenix/query/ConnectionQueryServicesImpl.java | 14 ++++++++------ pom.xml | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/61fa462b/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 9a385b2..d55ab30 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 @@ -193,6 +193,7 @@ import com.google.common.base.Joiner; import com.google.common.base.Throwables; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; +import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; @@ -204,6 +205,7 @@ 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.zookeeper.TephraZKClientService; public class ConnectionQueryServicesImpl extends DelegateQueryServices implements ConnectionQueryServices { @@ -350,14 +352,14 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement if (zkQuorumServersString==null) { zkQuorumServersString = connectionInfo.getZookeeperQuorum()+":"+connectionInfo.getPort(); } + + int timeOut = props.getInt(HConstants.ZK_SESSION_TIMEOUT, HConstants.DEFAULT_ZK_SESSION_TIMEOUT); + // Create instance of the tephra zookeeper client + ZKClientService tephraZKClientService = new TephraZKClientService(zkQuorumServersString, timeOut, null, ArrayListMultimap.<String, byte[]>create()); + ZKClientService zkClientService = ZKClientServices.delegate( ZKClients.reWatchOnExpire( - ZKClients.retryOnFailure( - ZKClientService.Builder.of(zkQuorumServersString) - .setSessionTimeout(props.getInt(HConstants.ZK_SESSION_TIMEOUT, HConstants.DEFAULT_ZK_SESSION_TIMEOUT)) - .build(), - RetryStrategies.exponentialDelay(500, 2000, TimeUnit.MILLISECONDS) - ) + ZKClients.retryOnFailure(tephraZKClientService, RetryStrategies.exponentialDelay(500, 2000, TimeUnit.MILLISECONDS)) ) ); zkClientService.startAndWait(); http://git-wip-us.apache.org/repos/asf/phoenix/blob/61fa462b/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index fe79577..b27c3b9 100644 --- a/pom.xml +++ b/pom.xml @@ -112,7 +112,7 @@ <joni.version>2.1.2</joni.version> <calcite.version>1.6.0</calcite.version> <jettyVersion>8.1.7.v20120910</jettyVersion> - <tephra.version>0.6.5</tephra.version> + <tephra.version>0.7.0</tephra.version> <spark.version>1.5.2</spark.version> <scala.version>2.10.4</scala.version> <scala.binary.version>2.10</scala.binary.version>