[ 
https://issues.apache.org/jira/browse/HADOOP-2611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563295#action_12563295
 ] 

Jim Kellerman commented on HADOOP-2611:
---------------------------------------

I don't see a significant difference between RowMutation and BatchUpdate other 
than RowMutation takes a timestamp.

Why not let BatchUpdate be a public class, and add two new commit methods:

commit(BatchUpdate b)
commit(BatchUpdate b, long timestamp)

then move the body of commit that deals with sending the batch to the region 
server to commitInternal(BatchUpdate, long)

With respect to lockid being useless in the current API, and that currently we 
only support one update at a time, consider changing HTable.batch to be a 
concurrent list, then the 'lockid' becomes the index into the list.



> [hbase] Create a RowMutation class in the public API
> ----------------------------------------------------
>
>                 Key: HADOOP-2611
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2611
>             Project: Hadoop Core
>          Issue Type: New Feature
>          Components: contrib/hbase
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>         Attachments: 2611.patch
>
>
> Today, when you want to interact with a row in HBase, you start an update, 
> make changes, and then commit the lock. This is fine for very simple 
> applications. However, when you try to do things like support table 
> operations as part of a MapReduce job, it becomes more difficult to support.
> I propose that we create a new class, RowMutation (a la the Bigtable paper), 
> which encapsulates a group of actions on a row, and make this available to 
> API consumers. It might look something like:
> {code}
> RowMutation r = table.getMutation(row_key);
> r.setTimestamp(1111);
> r.put(new Text("colfam1:name", value));
> r.delete(new Text("colfam2:deleted"));
> table.commit(r);
> {code}
> This syntax would supercede the existing startUpdate/commit format, which 
> could be deprecated and mapped to a RowMutation behind the scenes. 

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

Reply via email to