[ISSUE] (TEPHRA-171) Remove dependency on guava-13 classes in Tephra

0 views
Skip to first unread message

Poorna Chandra (JIRA)

unread,
Feb 9, 2016, 10:02:21 PM2/9/16
to tephr...@googlegroups.com
Poorna Chandra created an issue
 
Tephra / Improvement TEPHRA-171
Remove dependency on guava-13 classes in Tephra
Issue Type: Improvement Improvement
Assignee: Poorna Chandra
Components: core
Created: 09/Feb/16 7:01 PM
Fix Versions: 0.6.5
Priority: Major Major
Reporter: Poorna Chandra

Using guava-13 classes causes issues when using TransactionServiceClient in co-processor or through mapreduce. More information - https://issues.apache.org/jira/browse/PHOENIX-2670

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.1.5#6160-sha1:a61a0fc)
Atlassian logo

Poorna Chandra (JIRA)

unread,
Feb 10, 2016, 2:46:21 PM2/10/16
to tephr...@googlegroups.com
Poorna Chandra updated an issue
Change By: Poorna Chandra
Assignee: Poorna Chandra Sagar Kapare

James Taylor (JIRA)

unread,
Feb 11, 2016, 1:06:23 PM2/11/16
to tephr...@googlegroups.com
James Taylor commented on an issue
 
Re: Remove dependency on guava-13 classes in Tephra

Thanks for filing this, Poorna Chandra. Sagar Kapare - do you have an ETA on this as it's one of the JIRAs that is gating our release? Let us know if we can help in any way - we're happy to validate your fix on our end.

Using guava-13 classes causes issues when using TransactionServiceClient in co-processor or through mapreduce. More information - https://issues.apache.org/jira/browse/PHOENIX-2670

Poorna Chandra (JIRA)

unread,
Feb 12, 2016, 2:45:21 AM2/12/16
to tephr...@googlegroups.com
Poorna Chandra commented on an issue

James Taylor We plan to have this fixed early next week.

James Taylor (JIRA)

unread,
Feb 16, 2016, 3:56:24 AM2/16/16
to tephr...@googlegroups.com

Poorna Chandra (JIRA)

unread,
Feb 16, 2016, 5:15:22 PM2/16/16
to tephr...@googlegroups.com
Poorna Chandra commented on an issue

James Taylor Tephra uses Thrift-0.9.0 too - https://github.com/caskdata/tephra/blob/develop/pom.xml#L105. Something else could be introducing Thrift-0.9.3 into classpath.

Sagar Kapare (JIRA)

unread,
Feb 16, 2016, 7:53:22 PM2/16/16
to tephr...@googlegroups.com
Sagar Kapare commented on an issue

PR for downgrading the guava version to 12.0.1 in tephra - https://github.com/caskdata/tephra/pull/114

James Taylor (JIRA)

unread,
Feb 16, 2016, 8:15:22 PM2/16/16
to tephr...@googlegroups.com
James Taylor commented on an issue

Thanks for the quick turn around on this, Sagar Kapare. Does this also remove the dependency that Tephra has on Twill?

Poorna Chandra (JIRA)

unread,
Feb 16, 2016, 8:26:21 PM2/16/16
to tephr...@googlegroups.com
Poorna Chandra commented on an issue

James Taylor Tephra still uses twill for leader election, etc. We will not change that in this JIRA. Reducing twill dependencies will be in a different release as it is more involved.

James Taylor (JIRA)

unread,
Feb 16, 2016, 8:30:21 PM2/16/16
to tephr...@googlegroups.com
James Taylor commented on an issue

Ok, no problem. Saw a fair number of twill related classes, so just wanted to check.

Sagar Kapare (JIRA)

unread,
Feb 17, 2016, 5:57:23 PM2/17/16
to tephr...@googlegroups.com

Sagar Kapare (JIRA)

unread,
Feb 17, 2016, 5:57:24 PM2/17/16
to tephr...@googlegroups.com
Sagar Kapare edited a comment on an issue
PR to add the ZKClientService in Tephra - https://github.com/caskdata/tephra/pull/115 .
Working on the TransactionManager changes now.

Sagar Kapare (JIRA)

unread,
Feb 18, 2016, 10:05:22 PM2/18/16
to tephr...@googlegroups.com
Sagar Kapare commented on an issue

PR for the changes is merged to develop branch - https://github.com/caskdata/tephra/pull/115. Verified that the integration tests are passing on it. No further changes are required for this JIRA.

James Taylor In this PR we removed the guava-13 references from the TransactionServiceClient. If Phoenix code base has references to org.apache.twill.internal.zookeeper.DefaultZKClientService or is using org.apache.twill.zookeeper.ZKClientService.Builder, then it will need to be changed to co.cask.tephra.zookeeper.TephraZKClientService which does not have guava-13 dependencies.

James Taylor (JIRA)

unread,
Feb 19, 2016, 1:45:27 AM2/19/16
to tephr...@googlegroups.com
James Taylor commented on an issue

Thanks, Sagar Kapare. Here's our initialization code, but I'm not sure how it should be changed. Any advice?

    private void initTxServiceClient() {
        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(
                      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);
    }

Sagar Kapare (JIRA)

unread,
Feb 19, 2016, 2:05:21 AM2/19/16
to tephr...@googlegroups.com
Sagar Kapare commented on an issue

The code can be changed as

private void initTxServiceClient() {
        String zkQuorumServersString = this.getProps().get(TxConstants.Service.CFG_DATA_TX_ZOOKEEPER_QUORUM);
        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(tephraZKClientService, 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);
    }

James Taylor (JIRA)

unread,
Feb 19, 2016, 3:16:22 AM2/19/16
to tephr...@googlegroups.com
James Taylor commented on an issue

Thanks, Sagar Kapare - worked like a charm. I'll let you know tomorrow once we test it on a real cluster.

James Taylor (JIRA)

unread,
Feb 19, 2016, 2:11:23 PM2/19/16
to tephr...@googlegroups.com
James Taylor commented on an issue

We've confirmed[1] this fixes the issue we were seeing, Sagar Kapare, Poorna Chandra. If you could cut us a 0.7.0 release, then we'll be ready for our new RC as well. Thanks a lot for the fix!

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

Sagar Kapare (JIRA)

unread,
Feb 19, 2016, 2:19:22 PM2/19/16
to tephr...@googlegroups.com
Sagar Kapare commented on an issue

Thanks for the confirmation James Taylor. Marking this bug as fixed.

Sagar Kapare (JIRA)

unread,
Feb 19, 2016, 2:19:23 PM2/19/16
to tephr...@googlegroups.com
Sagar Kapare resolved an issue as Fixed
Change By: Sagar Kapare
Status: In Progress Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages