[ 
https://issues.apache.org/jira/browse/PHOENIX-2653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15134509#comment-15134509
 ] 

James Taylor commented on PHOENIX-2653:
---------------------------------------

I think the fix for this is simply to check the data.tx.zookeeper.quorum 
property first in ConnectionQueryServicesImpl.initTxServiceClient() and use 
that as the zkQuorumServersString. Otherwise, if null, assign 
{{zkQuorumServersString}} the way you're doing today, [~tdsilva]:
{code}
    private void initTxServiceClient() {
        String zkQuorumServersString = 
connectionInfo.getZookeeperQuorum()+":"+connectionInfo.getPort();
        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)
                    )
                  )
                );
        zkClientService.startAndWait();
        ZKDiscoveryService zkDiscoveryService = new 
ZKDiscoveryService(zkClientService);
        PooledClientProvider pooledClientProvider = new PooledClientProvider(
                config, zkDiscoveryService);
        this.txServiceClient = new 
TransactionServiceClient(config,pooledClientProvider);
    }
{code}

> Provide a way for users to override the zookeeperQuorum used while 
> initializing TransactionServiceClient by setting the 
> "data.tx.zookeeper.quorum" property 
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2653
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2653
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Thomas D'Silva
>            Assignee: Thomas D'Silva
>             Fix For: 4.7.0
>
>
> From an email discussion with [~poornachandra] [~gokulavasan]
> CDAP's transaction manager's discovery information in zookeeper uses a 
> namespace. The regular znode to discover tx manager is 
> /discoverable/transaction, but for CDAP's tx manager it is 
> /cdap/discoverable/transaction, and can change based on CDAP's root.namespace 
> value.
> Picking up the zk connection string from connection info in fine in most 
> cases. We'll just need a way for user's to override that by setting 
> "data.tx.zookeeper.quorum" in a config file.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to