[
https://issues.apache.org/jira/browse/HBASE-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613811#action_12613811
]
Jean-Daniel Cryans commented on HBASE-747:
------------------------------------------
Well I was thinking about only implementing the simple version e.g. wrapping a
bunch of row mutations in a single update. I consider two different options on
how the client could interact with region servers:
- Simplest way, it does the equivalent of doing a series of BatchUpdate in an
iteration . There would be no gain using the API directly, those using Thrift
would have far less RPCs to do. The code would be something like :
{code}
public synchronized void commit(final BatchUpdate batchUpdate)
throws IOException {
for(BatchRowUpdate rowUpdate : batchUpdate.getRowUpdates()) {
connection.getRegionServerWithRetries(
new ServerCallable<Boolean>(connection, tableName, rowUpdate.getRow()) {
...
}
{code}
- A better version would group rows that goes in the same server so that it
reduces RPCs between the client and the region servers.
I think the first one would be doable for 0.2.0 (which is why I put there in
the first place).
Jim, if there's a 1GB update, I guess the client will have first to handle a
massive OOME ;) But yeah, this solution does not handle big updates(the
javadoc would have to reflect this), the more badass one I described in
HBASE-48 would.
Finally, I think we should put such a facility in 0.2.0 since this release is
supposed to offer a stable API. Then we can implement something more efficient
for 0.3.0 or in a 0.2 minor revision.
> Add a simple way to do batch updates of many rows
> -------------------------------------------------
>
> Key: HBASE-747
> URL: https://issues.apache.org/jira/browse/HBASE-747
> Project: Hadoop HBase
> Issue Type: New Feature
> Components: client
> Affects Versions: 0.2.0
> Reporter: Jean-Daniel Cryans
> Assignee: Jean-Daniel Cryans
> Fix For: 0.2.1, 0.3.0
>
>
> Add a simple to do batch updates of many rows as described in HBASE-48.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.