hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guilherme Mauro Germoglio Barbosa (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HBASE-1251) HConnectionManager.getConnection(HBaseConfiguration) returns same HConnection for different HBaseConfigurations
Date Tue, 10 Mar 2009 13:42:50 GMT

     [ https://issues.apache.org/jira/browse/HBASE-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Guilherme Mauro Germoglio Barbosa updated HBASE-1251:
-----------------------------------------------------

    Attachment: HBASE-1251.patch

I've edited HConnectionManager in order to use all HBaseConfiguration instead of only HBASE_DIR
as key on the HBASE_INSTANCES map. To do so, I've implemented HBaseConfiguration.hashcode()
- just like a HashMap.hashCode() is implemented.

code review is needed. 

> HConnectionManager.getConnection(HBaseConfiguration) returns same HConnection for different
HBaseConfigurations 
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-1251
>                 URL: https://issues.apache.org/jira/browse/HBASE-1251
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.19.0
>            Reporter: Guilherme Mauro Germoglio Barbosa
>         Attachments: HBASE-1251.patch
>
>
> This occurs when the following happens:
> 1. Consider a client that invokes HBaseAdmin.checkHBaseAvailable(config) before doing
anything. Although this method copies the HBaseConfiguration object and sets hbase.client.retries.number
to 1 (see HBaseAdmin, line 751), it creates an HBaseAdmin object, which invokes HConnectionManager.getConnection(conf).
Please notice that this conf is that with hbase.client.retries.number equals to 1. 
> 2. HConnectionManager.getConnection then creates a HConnection using this conf and puts
it into a static map (see HConnectionManager, line 93) indexed by hbase.rootdir. 
> 3. Then, if the same client now creates a HTable object (using, for instance, a HBaseConfiguration
with  hbase.client.retries.number equals to 10 but the same hbase.rootdir), it will invoke
HConnectionManager.getConnection(conf) again (see HTable, line 109). However, when it checks
the static map for a HConnection it finds one - the one previously created by the HBaseAdmin
object and using hbase.client.retries.number 1 - and returns it without creating a new one
with the correct HBaseConfiguration.
> However, the expected behavior is: HConnectionManager must return different HConnections
for different HBaseConfigurations.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message