Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9408A55D for ; Wed, 20 Apr 2011 03:15:19 +0000 (UTC) Received: (qmail 53873 invoked by uid 500); 20 Apr 2011 03:15:19 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 53843 invoked by uid 500); 20 Apr 2011 03:15:19 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 53831 invoked by uid 99); 20 Apr 2011 03:15:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2011 03:15:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2011 03:15:16 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 76604A95E3 for ; Wed, 20 Apr 2011 03:14:39 +0000 (UTC) Date: Wed, 20 Apr 2011 03:14:39 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: <1907483395.69022.1303269279481.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <839182052.56068.1302727205724.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-3777) Redefine Identity Of HBase Configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-3777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021932#comment-13021932 ] Ted Yu commented on HBASE-3777: ------------------------------- We can break out of the loop in HConnectionManager.putConnection() if the reference count reaches 0, right ? {code} if (entry.getValue().decRef() > 0) { connectionKey = null; } else break; {code} > 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-V3.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