[ https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185807#comment-13185807 ]
jirapos...@reviews.apache.org commented on HBASE-3584: ------------------------------------------------------ ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3481/#review4368 ----------------------------------------------------------- +1 with some comments below. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java <https://reviews.apache.org/r/3481/#comment9816> You think this class needs to be AtomicRowMutation? (makes me want to 'duck and cover'). All mutations on a row in hbase are 'atomic' so the prefix strikes me as redundant http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java <https://reviews.apache.org/r/3481/#comment9817> Yeah, its kinda crazy all this duplication of say the row byte array.. it'll be here and then up in Put and Delete. Its like we need a shorthand of some kind.... but for another time. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java <https://reviews.apache.org/r/3481/#comment9818> Should be 0? (No biggie) http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java <https://reviews.apache.org/r/3481/#comment9819> Why have an add for Put and one for Delete and not just an add Mutation? http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java <https://reviews.apache.org/r/3481/#comment9820> Important! http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java <https://reviews.apache.org/r/3481/#comment9821> Usually we add space around operators. Next time. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java <https://reviews.apache.org/r/3481/#comment9822> Good http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java <https://reviews.apache.org/r/3481/#comment9823> Call it mutate? http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java <https://reviews.apache.org/r/3481/#comment9824> mutate? http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java <https://reviews.apache.org/r/3481/#comment9825> Duplicated code? We should fix this up some day - Michael On 2012-01-13 17:11:21, Lars Hofhansl wrote: bq. bq. ----------------------------------------------------------- bq. This is an automatically generated e-mail. To reply, visit: bq. https://reviews.apache.org/r/3481/ bq. ----------------------------------------------------------- bq. bq. (Updated 2012-01-13 17:11:21) bq. bq. bq. Review request for hbase. bq. bq. bq. Summary bq. ------- bq. bq. Add API for atomic row mutations to HBase (currently Put and Delete). bq. bq. Client API would look like this: bq. Delete d = new Delete(ROW); bq. Put p = new Put(ROW); bq. ... bq. AtomicRowMutation arm = new AtomicRowMutation(ROW); bq. arm.add(p); bq. arm.add(d); bq. myHtable.mutateAtomically(arm); bq. bq. bq. This addresses bug HBASE-3584. bq. https://issues.apache.org/jira/browse/HBASE-3584 bq. bq. bq. Diffs bq. ----- bq. bq. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java PRE-CREATION bq. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java 1231172 bq. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java 1231172 bq. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java 1231172 bq. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 1231172 bq. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java 1231172 bq. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 1231172 bq. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1231172 bq. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java 1231172 bq. http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java 1231172 bq. http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java 1231172 bq. http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java 1231172 bq. bq. Diff: https://reviews.apache.org/r/3481/diff bq. bq. bq. Testing bq. ------- bq. bq. * Simple functional test: TestFromClientSide.testAtomicRowMutation bq. * Multithreaded stress test: TestAtomicOperation.testAtomicMutationMultiThreads bq. * coprocessor test: TestRegionObserverInterface.testAtomicRowMutation bq. * manual testing bq. bq. bq. Thanks, bq. bq. Lars bq. bq. > We need to atomically put/delete/increment in one call > ------------------------------------------------------ > > Key: HBASE-3584 > URL: https://issues.apache.org/jira/browse/HBASE-3584 > Project: HBase > Issue Type: Bug > Components: client, coprocessors, regionserver > Reporter: ryan rawson > Assignee: Lars Hofhansl > Fix For: 0.94.0 > > Attachments: 3584-v1.txt, 3584-v3.txt > > > Right now we have the following calls: > put(Put) > delete(Delete) > increment(Increments) > But we cannot combine all of the above in a single call, complete with a > single row lock. It would be nice to do that. > It would also allow us to do a CAS where we could do a put/increment if the > check succeeded. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira