hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Yates (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-6495) HBaseAdmin shouldn't expect HConnection to be an HConnectionImplementation
Date Thu, 06 Sep 2012 01:13:08 GMT

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

Jesse Yates commented on HBASE-6495:

Patch is for trunk. Would you like a 0.94 one as well? Its going to be a bit different, given
the PB changes...
> HBaseAdmin shouldn't expect HConnection to be an HConnectionImplementation
> --------------------------------------------------------------------------
>                 Key: HBASE-6495
>                 URL: https://issues.apache.org/jira/browse/HBASE-6495
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0, 0.94.1
>            Reporter: Jesse Yates
>             Fix For: 0.96.0
>         Attachments: hbase-6495-v0.patch
> Currently, the HBaseAdmin has a constructor that takes an HConnection, but then immediately
casts it to an HConnectionManager.HConnectionImplementation:
> {code}
>   public HBaseAdmin(HConnection connection)
>       throws MasterNotRunningException, ZooKeeperConnectionException {
>     this.conf = connection.getConfiguration();
>     // We want the real class, without showing it our public interface,
>     //  hence the cast.
>     this.connection = (HConnectionManager.HConnectionImplementation)connection;
> {code}
> However, this breaks the explicit contract in the javadocs and makes it basically impossible
to mock out the hbaseadmin. 
> We need to either make the hbaseadmin use a basic HConnection and optimize for cases
where its smarter or bring up the couple of methods in HConnectionManager.HConnectionImplementation
to the HConnection interface.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message