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

Lars Hofhansl commented on PHOENIX-5134:
----------------------------------------

I can see use cases for both ways. Perhaps we have 1000's of tenants and want 
to use a single HConnection... Or we might only have a few tenants with wildly 
different settings.

[~jamestaylor], any comment? (This relates to the other Jira where we wanted to 
pass the HBase timestamp via a hint, but then thought a new connection is fine, 
since the underlying HConnection is cached).


> Phoenix Connection Driver #normalize does not distinguish different url with 
> same ZK quorum but different Properties
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-5134
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5134
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Xu Cang
>            Assignee: Xinyi Yan
>            Priority: Minor
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> In this code
> https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java#L228
> Phoenix now uses a cache to maintain Hconnections. The cache's key is 
> generated by 'normalize' method here:
> https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java#L312
> The normalize method takes ZK quorum, port, rootNode, principle and keytab 
> into account. But not properties passed in in url. 
> E.g.
> Request to reate one connection by this url: 
> jdbc:phoenix:localhost:61733;TenantId=1
> Request to create another connection by this url
> jdbc:phoenix:localhost:61733;TenantId=2
> Based on logic we have, it will result in one same Hconnection in the 
> connection cache here. 
> This might not be something we really want. 
> For example, different tenant wants to have different HBase config (such as 
> HBase timeout settings) With the same Hconnection returned, tenant2's config 
> will be ignored silently. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to