You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jonathan Gray (JIRA)" <ji...@apache.org> on 2010/06/02 02:43:43 UTC

[jira] Commented: (HBASE-2648) API Rework: Have Delete and Put implement same Interface or subclass same 'Mutation' ancestor (Get too? And Result?)

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

Jonathan Gray commented on HBASE-2648:
--------------------------------------

Ahhh!  No more of those old scary 880 proposals!

The one you point out is a bit strange with Delete under Get?  It's also got all kinds of Cell stuff with no concept of KeyValue or column as family and qualifier.

I think if we were going to add some base classes to our API we can do it in a pretty simple and non-invasive way.

Put and Delete would implement or extend RowMutation or Mutation.  I like RowMutation because these are both single row mutations so it's more explicit.

Get and Scan could also implement or extend something but it's more like a Get is a special kind of Scan now so it could just extend Scan?  That wouldn't necessarily help for cases like this where we want to pass out either type to the same thing but I'm not sure it's needed for reads?

> API Rework: Have Delete and Put implement same Interface or subclass same 'Mutation' ancestor (Get too?  And Result?)
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-2648
>                 URL: https://issues.apache.org/jira/browse/HBASE-2648
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: stack
>
> Our API has a problem in that we can't pass a mix of Put and Delete edits.  We see it in various places.
> HBASE-1626 tried to add being able to emit Puts and Deletes from your Map or Reduce but as HBASE-1969 points out, it won't work as done.
> Ryan talks about need of being able to pass a set of Deletes and Puts against a single row so we can do a bunch of edits all under the umbrella of a single row *lock*.
> Related, HBASE-1845 wants to do bulk put/gets/deletes all in same way and HBASE-2609 is related in that it asks that the Delete and Put API work the same.
> For at least the first issue, in hbase-1969, "HBASE-1626 does not work as advertised due to lack of "instanceof" check in MR framework", Lars G suggests we have a Mutation class that can carry Deletes and Puts on a row.  He notes that the sample client code in the BT table seems to do this.  This Mutation carrying-class could be used to solve the Ryan issue above.
> But maybe we need something more radical, an API overhaul (again) to do something like was proposed long-time ago in hbase-880.  This was an ugly, unfinished proposal but many of the classes shared an ancestor -> https://issues.apache.org/jira/secure/attachment/12395138/880proposal5-v2.png.

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