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

Karthick Sankarachary commented on HBASE-3777:
----------------------------------------------

Please review the updated version (V2) of the patch, which:

# Adds the following properties to the connection key:
#* The zookeeper client port, which is pulled in by {{ZKConfig#makeZKProps}}.
#* The recoverable zookeeper wait time, which is pulled in by the 
{{ZooKeeperWatcher}}.
# Closes the {{HConnection}} only if there are no strong references to it. This 
is necessitated by the fact that they can now potentially be shared by multiple 
clients and configurations. Note that it relies on the garbage collector to 
clean up the connection, which I feel is a safer approach. Alternatively, we 
can have the HCM implement a reference counting mechanism, but that would call 
for a strict clean up strategy.
# As far as testing is concerned, all but five tests passed. FWIW, those 
failures occur even without the patch, so in that sense, no regressions were 
found.

> Redefine Identity Of HBase Configuration
> ----------------------------------------
>
>                 Key: HBASE-3777
>                 URL: https://issues.apache.org/jira/browse/HBASE-3777
>             Project: HBase
>          Issue Type: Improvement
>          Components: client, ipc
>    Affects Versions: 0.90.2
>            Reporter: Karthick Sankarachary
>            Assignee: Karthick Sankarachary
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-3777-V2.patch, HBASE-3777.patch
>
>
> Judging from the javadoc in {{HConnectionManager}}, sharing connections 
> across multiple clients going to the same cluster is supposedly a good thing. 
> However, the fact that there is a one-to-one mapping between a configuration 
> and connection instance, kind of works against that goal. Specifically, when 
> you create {{HTable}} instances using a given {{Configuration}} instance and 
> a copy thereof, we end up with two distinct {{HConnection}} instances under 
> the covers. Is this really expected behavior, especially given that the 
> configuration instance gets cloned a lot?
> Here, I'd like to play devil's advocate and propose that we "deep-compare" 
> {{HBaseConfiguration}} instances, so that multiple {{HBaseConfiguration}} 
> instances that have the same properties map to the same {{HConnection}} 
> instance. In case one is "concerned that a single {{HConnection}} is 
> insufficient for sharing amongst clients",  to quote the javadoc, then one 
> should be able to mark a given {{HBaseConfiguration}} instance as being 
> "uniquely identifiable".
> Note that "sharing connections makes clean up of {{HConnection}} instances a 
> little awkward", unless of course, you apply the change described in 
> HBASE-3766.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to