hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-1758) Extract interface out of HTable
Date Wed, 12 Aug 2009 03:20:14 GMT

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

stack commented on HBASE-1758:

I like the @since 0.21.0

newHTableInterface should be createHTableInterface?  (Just a suggestion -- whats usual factory
semantics?  If you change it here, would need to change in HTablePool too where you do newHTable)

New classes need the apache license on top.  Steal from another class and just make sure year
is 2009.

In the interface, should the methods be public?  Maybe it doesn't matter in an interface?

I'd remove the setTableFactory in HTablePool method.  Add a constructor that optionally takes
a factory I'd say that allows inserting other than HTableFactory.... but not as a method.

HTableFactory should just be an inner-class of HTablePool?

All of above are just suggestions.  Do as you will with them.  Only change required is addition
of the apache license.

Patch looks great.

> Extract interface out of HTable
> -------------------------------
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>         Attachments: HTableInterface.patch
> As per discussions in Hackathon, we have extracted interface out of HTable and named
it as HTableInterface. This will make unit testing client code easier and simplify client
> It opens other possibilities such as creating a HTable that does not do any RPC calls,
MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory
on it. Thus developers can write their own HTableInterfaceFactory impl to return their own
HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

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

View raw message