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

Nick Dimiduk commented on PHOENIX-1726:
---------------------------------------

[~samarthjain]

bq. As a result, HConnectionManager.getConnection(config) code, which uses a 
map of config->hconnection to cache hconnections, always ends up creating a new 
HConnection since the Configuration class doesn't have the equals() method 
overriden (probably because the check is too expensive?).

As I recall, there's a handful of fields that are used to build the key for 
that map, and thus determine equality. I'm surprised the cloning done by 
Phoenix resulted in incompatible maps. Anyway the transition to 1.0 API's 
cleans up all the semantics around this stuff so these kinds of surprises 
should just "go away" once that happens.

Thanks a lot for the fix!

> Phoenix connection initialization makes multiple hbase connections
> ------------------------------------------------------------------
>
>                 Key: PHOENIX-1726
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1726
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Nick Dimiduk
>            Assignee: Samarth Jain
>            Priority: Minor
>              Labels: verify
>             Fix For: 4.7.0
>
>         Attachments: PHOENIX-1726.patch
>
>
> Working on other things, I enabled logging of my Phoenix app. I noticed that 
> on startup, I see 3 rounds of HBase connections happening. My app itself only 
> creates a single PhoenixConnection. You see the same thing when sqlline.py 
> connects.
> {noformat}
> 15/03/12 11:06:03 INFO impl.MetricsSystemImpl: phoenix metrics system started
> 15/03/12 11:06:04 INFO query.ConnectionQueryServicesImpl: Found quorum: 
> localhost:2181
> 15/03/12 11:06:04 INFO client.HConnectionManager$HConnectionImplementation: 
> Closing master protocol: MasterService
> 15/03/12 11:06:04 INFO client.HConnectionManager$HConnectionImplementation: 
> Closing zookeeper sessionid=0x14c0f28a8300007
> 15/03/12 11:06:04 INFO query.ConnectionQueryServicesImpl: Found quorum: 
> localhost:2181
> 15/03/12 11:06:04 INFO client.HConnectionManager$HConnectionImplementation: 
> Closing master protocol: MasterService
> 15/03/12 11:06:04 INFO client.HConnectionManager$HConnectionImplementation: 
> Closing zookeeper sessionid=0x14c0f28a8300009
> 15/03/12 11:06:05 INFO query.ConnectionQueryServicesImpl: Found quorum: 
> localhost:2181
> 15/03/12 11:06:10 INFO client.HConnectionManager$HConnectionImplementation: 
> Closing master protocol: MasterService
> 15/03/12 11:06:10 INFO client.HConnectionManager$HConnectionImplementation: 
> Closing zookeeper sessionid=0x14c0f28a830000b
> 15/03/12 11:06:16 INFO util.log: Logging initialized @14027ms
> {noformat}
> Parking here for further investigation.



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

Reply via email to