hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Sell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-746) Batching row mutations via thrift
Date Thu, 24 Jul 2008 15:29:31 GMT

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

Tim Sell commented on HBASE-746:
--------------------------------

Now that HBASE-747 has a solution we could easily solve this one by adding some functions
to the thrift server that make use of HTable.commit(list<BatchUpdate> batchUpdates)

I've created a new patch that adds the extra functions to the ThriftServer. The thing that
might be objectional is that I had to add another struct to the thrift interface which I called
BatchMutation

it looks like this.
struct BatchMutation{
  1:Text row
  2:list<Mutation> mutations
}

we need this so we can pass a list of row mutations.
The extra functions I called, mutateRows and mutateRowsTs (not the extra s)

How does this fit in with the existing naming conventions?

One thing that seems inconsistent is the existing function 
  mutateRow(Text tableName, Text row, list<Mutation> mutations).
This looks a little strange when mutateRows is
  mutateRows(Text tableName, list<BatchMutation> batches)

I'm not attached to the name BatchMutation either, I couldn't think of anything better.

The previous patch I uploaded required the thrift generated stuff to be generated again. This
patch doesn't, but it has a ton of extra stuff modifying generated.Hbase, because I regenerated
it myself, I used the same thrift revision number as the thrift library that's in hbase now.
This means the patch will give a working install straight away though. For some reason though
the new generated Hbase.java file has lots of indentation changes. Sorry about that.

The modified files are:
M      src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift
M      src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
A      src/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
M      src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java

Suggestions for how this can be done better?

> Batching row mutations via thrift
> ---------------------------------
>
>                 Key: HBASE-746
>                 URL: https://issues.apache.org/jira/browse/HBASE-746
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: thrift
>    Affects Versions: 0.2.0
>            Reporter: Tim Sell
>            Priority: Minor
>             Fix For: 0.2.1, 0.3.0
>
>         Attachments: HBASE-746-first.patch, HBASE-746-v2.patch
>
>
> It would be nice to be able to send to thrift a whole bunch of rows and mutations to
be applied to them. This will be very useful when doing a large initial dump to HBase as doing
the serialization for each row separately is expensive.

-- 
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