Details
Description
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.
Attachments
Attachments
Issue Links
- is depended upon by
-
HBASE-4508 Backport HBASE-3777 to 0.90 branch
- Closed
- is related to
-
HBASE-3766 Manage Connections Through Reference Counts
- Closed
- relates to
-
HBASE-2925 LRU of HConnectionManager.HBASE_INSTANCES breaks if HBaseConfiguration is changed
- Closed
-
HBASE-3792 TableInputFormat leaks ZK connections
- Closed
-
HBASE-3861 MiniZooKeeperCluster.startup() should refer to hbase.zookeeper.property.maxClientCnxns
- Closed