[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185678#comment-13185678
 ] 

jirapos...@reviews.apache.org commented on HBASE-3584:
--


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3481/
---

(Updated 2012-01-13 17:11:21.333184)


Review request for hbase.


Changes
---

This version passes all tests.
Fixed some Java doc comments.

This is a good candidate for commit.


Summary
---

Add API for atomic row mutations to HBase (currently Put and Delete).

Client API would look like this:
Delete d = new Delete(ROW);
Put p = new Put(ROW);
...
AtomicRowMutation arm = new AtomicRowMutation(ROW);
arm.add(p);
arm.add(d);
myHtable.mutateAtomically(arm);


This addresses bug HBASE-3584.
https://issues.apache.org/jira/browse/HBASE-3584


Diffs (updated)
-

  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
 1231172 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
 1231172 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
 1231172 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
 1231172 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java
 1231172 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1231172 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1231172 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
 1231172 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
 1231172 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
 1231172 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
 1231172 

Diff: https://reviews.apache.org/r/3481/diff


Testing
---

* Simple functional test: TestFromClientSide.testAtomicRowMutation
* Multithreaded stress test: TestAtomicOperation.testAtomicMutationMultiThreads
* coprocessor test: TestRegionObserverInterface.testAtomicRowMutation
* manual testing


Thanks,

Lars



 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Zhihong Yu (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185736#comment-13185736
 ] 

Zhihong Yu commented on HBASE-3584:
---

The coprocessor hooks are contingent upon this condition:
{code}
walEdit == null
{code}
I think this is different from current practice.

Can we instantiate WALEdit locally and use it when coprocessorHost != null ?

 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Lars Hofhansl (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185750#comment-13185750
 ] 

Lars Hofhansl commented on HBASE-3584:
--

Hmm... Somehow I have to indicate that coprocessor hooks are executed by the 
caller.
In the special case of mutateAtomically the caller has to handle the 
coprocessor hooks (to avoid deadlocks).

If coprocessorHost != null and this is a call from mutateAtomically we cannot 
instantiate the WALEdit locally, because it is needed by the coprocessor hooks 
(who could change it).

walEdit is the one passed in, it is null unless the call is from 
mutateAtomically.
The one actually used is localWalEdit. Maybe I should rename walEdit to 
passedWalEdit?


 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Zhihong Yu (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185762#comment-13185762
 ] 

Zhihong Yu commented on HBASE-3584:
---

How about we always instantiate WALEdit, called localWalEdit.
We have the passedWalEdit.
And we maintain effectiveWalEdit which would be:
{code}
passedWalEdit == null ? localWalEdit : passedWalEdit
{code}
We use localWalEdit for coprocessor hook and effectiveWalEdit for 
addFamilyMapToWALEdit() and log.append() :-)

 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Lars Hofhansl (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185778#comment-13185778
 ] 

Lars Hofhansl commented on HBASE-3584:
--

It's kind of how it works now. If walEdit is passed in non-null, use that one 
(and also assume that the caller used that same walEdit to execute the 
pre-hooks and will use it execute the post hooks), otherwise make a local one.

If there is a non-null passedWalEdit, that same one *has* to be used for 
addFamilyMapToWALEdit() and log.append().

In the end it is similar to passing the writeEntry in. The caller perform the 
grouping of the operations, so it has to control what writeEntry and what 
walEdits to use.

Would it be less confusing to pass in an extra flag to indicate whether the 
coprocessor hooks need to be executed?

 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Lars Hofhansl (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185785#comment-13185785
 ] 

Lars Hofhansl commented on HBASE-3584:
--

Oh... and this is the piece of code that does this:
{code}
WALEdit localWalEdit = walEdit == null ? new WALEdit() : walEdit;
{code}
Inside internal{Put|Delete} it is always using localWalEdit, except for 
deciding whether the coprocessor hooks need to be executed (where it used 
walEdit==null as a flag).

 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Zhihong Yu (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185791#comment-13185791
 ] 

Zhihong Yu commented on HBASE-3584:
---

The current logic is different from what I described @ 13/Jan/12 19:06.
With 3 xxWalEdit's, coprocessor hooks would always be executed, consistent with 
current practice.

I think the above is cleaner compared to introducing a boolean.

 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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
 

[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Lars Hofhansl (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185813#comment-13185813
 ] 

Lars Hofhansl commented on HBASE-3584:
--

Now I am getting confused :)
These are the parameters:
1. mutateAtomically needs to run the pre/post coprocessor hooks (so 
internal{Put|Delete} should not run the pre/post hooks when called from 
mutateAtomically).
2. the walEdits used on the pre/post hooks must the same as the ones used in 
addFamilyMapToWALEdit()/log.append()
3. if not called from mutateAtomically internal{Put|Delete} are responsible for 
executing the pre/post hooks (as currently done), using a local walEdit.

 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Zhihong Yu (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185817#comment-13185817
 ] 

Zhihong Yu commented on HBASE-3584:
---

I agree.
Sorry for the confusion.

 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185820#comment-13185820
 ] 

jirapos...@reviews.apache.org commented on HBASE-3584:
--


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3481/#review4370
---



http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java
https://reviews.apache.org/r/3481/#comment9827

Yep... The same that way that all KVs in Put/Delete's familyMap replicate 
the same rowkey... Should tackle that generally in a separate jira.



http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java
https://reviews.apache.org/r/3481/#comment9828

Versions are 0-based? :)



http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java
https://reviews.apache.org/r/3481/#comment9829

Append is also a Mutation and is not supported (neither is Increment, but 
that's not a Mutation).
If/when we support all Mutation we can have a general add(Mutation) 
mutation (nice thing that this won't change the visible client api)



http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java
https://reviews.apache.org/r/3481/#comment9830

Yep!



http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java
https://reviews.apache.org/r/3481/#comment9831

Will change



http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
https://reviews.apache.org/r/3481/#comment9832

Hmm... Torn about this.
The main point of this is that it is atomic. We already have multiAction 
(which can take Mutations), but it is not atomic.



- Lars


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.



 

[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185841#comment-13185841
 ] 

jirapos...@reviews.apache.org commented on HBASE-3584:
--



bq.  On 2012-01-13 20:17:55, Lars Hofhansl wrote:
bq.   
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java,
 line 755
bq.   https://reviews.apache.org/r/3481/diff/4/?file=68809#file68809line755
bq.  
bq.   Hmm... Torn about this.
bq.   The main point of this is that it is atomic. We already have 
multiAction (which can take Mutations), but it is not atomic.
bq.  

Ok

MultiAction is x-row, right?   RowMutation has the row prefix.

But if you think it makes it clearer, go for it.


- Michael


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3481/#review4370
---


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: 

[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Lars Hofhansl (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185911#comment-13185911
 ] 

Lars Hofhansl commented on HBASE-3584:
--

Wanna call it mutateRow (in HTable/RegionServer/Region)? That would match the 
RowMutation object name.

Is this good enough for commit, or are you guys unsure?

 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread stack (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185914#comment-13185914
 ] 

stack commented on HBASE-3584:
--

bq. Wanna call it mutateRow (in HTable/RegionServer/Region)? That would match 
the RowMutation object name.

Fine by me.  You going to change the class name too?

I'm fine w/ commit.

 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Lars Hofhansl (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185925#comment-13185925
 ] 

Lars Hofhansl commented on HBASE-3584:
--

Yep... HTable.mutateRow(RowMutation)

 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Zhihong Yu (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13186035#comment-13186035
 ] 

Zhihong Yu commented on HBASE-3584:
---

+1 if unit tests pass.

Nice work, Lars.

 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-final.txt, 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Amitanand Aiyer (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13186046#comment-13186046
 ] 

Amitanand Aiyer commented on HBASE-3584:


Thanks Lars. I was indeed referring to the batching that you were talking 
about. 

Never mind about the multi- version of the atomicMutation. Was stuck thinking 
about 89 in my mind. Was wondering if we might need another function that takes 
a list of AtomicRowMutations, as an input. As you point out, HTable.batch 
should do this in trunk.

 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-final.txt, 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Hadoop QA (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13186051#comment-13186051
 ] 

Hadoop QA commented on HBASE-3584:
--

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12510551/3584-final.txt
  against trunk revision .

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 9 new or modified tests.

-1 javadoc.  The javadoc tool appears to have generated -145 warning 
messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 82 new Findbugs (version 
1.3.9) warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

 -1 core tests.  The patch failed these unit tests:
   org.apache.hadoop.hbase.coprocessor.TestMasterObserver
  org.apache.hadoop.hbase.mapreduce.TestImportTsv
  org.apache.hadoop.hbase.mapred.TestTableMapReduce
  org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/757//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/757//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/757//console

This message is automatically generated.

 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-final.txt, 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-13 Thread Lars Hofhansl (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13186055#comment-13186055
 ] 

Lars Hofhansl commented on HBASE-3584:
--

Ran the 4 failing tests locally. All pass. Will commit later this evening.

@Amit: Cool. Let me know if you think there's some other functionality missing.

 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-final.txt, 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread Lars Hofhansl (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185243#comment-13185243
 ] 

Lars Hofhansl commented on HBASE-3584:
--

Also this patch only addresses this for Put and Delete. Increment (and Append) 
do not adhere to mvcc (and cannot be easily made so), so wrapping them into an 
single atomic operation is (currently) pointless.

 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
Reporter: ryan rawson
Assignee: Lars Hofhansl
 Attachments: 3584-v1.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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread Zhihong Yu (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185251#comment-13185251
 ] 

Zhihong Yu commented on HBASE-3584:
---

Putting the patch on review board would make reviewing easier.

 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
Reporter: ryan rawson
Assignee: Lars Hofhansl
 Attachments: 3584-v1.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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185260#comment-13185260
 ] 

jirapos...@reviews.apache.org commented on HBASE-3584:
--


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3481/
---

Review request for hbase.


Summary
---

Add API for atomic row mutations to HBase (currently Put and Delete).

Client API would look like this:
Delete d = new Delete(ROW);
Put p = new Put(ROW);
...
AtomicRowMutation arm = new AtomicRowMutation(ROW);
arm.add(p);
arm.add(d);
myHtable.atomicMutation(arm);


This addresses bug HBASE-3584.
https://issues.apache.org/jira/browse/HBASE-3584


Diffs
-

  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
 1230675 

Diff: https://reviews.apache.org/r/3481/diff


Testing
---

* Simple functional test: TestFromClientSide.testAtomicRowMutation
* Multithreaded stress test: TestAtomicOperation.testAtomicMutationMultiThreads
* manual testing


Thanks,

Lars



 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
Reporter: ryan rawson
Assignee: Lars Hofhansl
 Attachments: 3584-v1.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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread Zhihong Yu (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185265#comment-13185265
 ] 

Zhihong Yu commented on HBASE-3584:
---

w.r.t. the coprocessor pre hooks, I think option 2 is better.
{code}
+ * The mutations are in performed in the order in which they
+ * were added.
{code}
The above should read 'are performed'.

For atomicMutation(), maybe mutateAtomically is a better name for the method ?
{code}
+  internalDelete((Delete)d, HConstants.DEFAULT_CLUSTER_ID, 
d.getWriteToWAL(), w);
+} else {
+  throw new DoNotRetryIOException(Action must be Put or Delete);  
{code}
Type cast above isn't needed. Please include m in the exception message.

 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
Reporter: ryan rawson
Assignee: Lars Hofhansl
 Attachments: 3584-v1.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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185271#comment-13185271
 ] 

jirapos...@reviews.apache.org commented on HBASE-3584:
--


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3481/#review4336
---


Overall lgtm, but you have a lot of excessive whitespaceing (look for the red 
in the review)

- Alex


On 2012-01-12 21:40:26, 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-12 21:40:26)
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.atomicMutation(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
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
 1230675 
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.  * 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
Reporter: ryan rawson
Assignee: Lars Hofhansl
 Attachments: 3584-v1.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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread Lars Hofhansl (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185272#comment-13185272
 ] 

Lars Hofhansl commented on HBASE-3584:
--

Thanks Ted. Looked at the coprocessor API more. Unfortunately both pre and post 
hooks for Delete and Put take a WALEdit argument; the WALEdit is only created 
when the Delete/Put happens.
Could move creation of all WALEdits up in this case and pass WALEdits down, 
seems nasty.

It turns out there are some inconsistencies with Put and Delete right now. The 
Put posthook is executed after the region was released, but the Delete posthook 
is executed with the region lock held.

Will address your other comments.


 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
Reporter: ryan rawson
Assignee: Lars Hofhansl
 Attachments: 3584-v1.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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185288#comment-13185288
 ] 

jirapos...@reviews.apache.org commented on HBASE-3584:
--


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3481/
---

(Updated 2012-01-12 22:10:17.90)


Review request for hbase.


Changes
---

Addressing Alex' and Ted's comment:
* whitespace
* renamed atomicMutation to mutateAtomically
* spelling


Summary (updated)
---

Add API for atomic row mutations to HBase (currently Put and Delete).

Client API would look like this:
Delete d = new Delete(ROW);
Put p = new Put(ROW);
...
AtomicRowMutation arm = new AtomicRowMutation(ROW);
arm.add(p);
arm.add(d);
myHtable.mutateAtomically(arm);


This addresses bug HBASE-3584.
https://issues.apache.org/jira/browse/HBASE-3584


Diffs (updated)
-

  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
 1230675 

Diff: https://reviews.apache.org/r/3481/diff


Testing
---

* Simple functional test: TestFromClientSide.testAtomicRowMutation
* Multithreaded stress test: TestAtomicOperation.testAtomicMutationMultiThreads
* manual testing


Thanks,

Lars



 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
Reporter: ryan rawson
Assignee: Lars Hofhansl
 Attachments: 3584-v1.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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185343#comment-13185343
 ] 

jirapos...@reviews.apache.org commented on HBASE-3584:
--


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3481/
---

(Updated 2012-01-12 23:59:55.729776)


Review request for hbase.


Changes
---

* This version deals correctly with coprocessors.
* addressed Ted's comments.


Summary
---

Add API for atomic row mutations to HBase (currently Put and Delete).

Client API would look like this:
Delete d = new Delete(ROW);
Put p = new Put(ROW);
...
AtomicRowMutation arm = new AtomicRowMutation(ROW);
arm.add(p);
arm.add(d);
myHtable.mutateAtomically(arm);


This addresses bug HBASE-3584.
https://issues.apache.org/jira/browse/HBASE-3584


Diffs (updated)
-

  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/AtomicRowMutation.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
 1230675 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
 1230675 

Diff: https://reviews.apache.org/r/3481/diff


Testing (updated)
---

* Simple functional test: TestFromClientSide.testAtomicRowMutation
* Multithreaded stress test: TestAtomicOperation.testAtomicMutationMultiThreads
* coprocessor test: TestRegionObserverInterface.testAtomicRowMutation
* manual testing


Thanks,

Lars



 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
Reporter: ryan rawson
Assignee: Lars Hofhansl
 Attachments: 3584-v1.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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185344#comment-13185344
 ] 

jirapos...@reviews.apache.org commented on HBASE-3584:
--



bq.  On 2012-01-12 23:23:18, Ted Yu wrote:
bq.   
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java,
 line 654
bq.   https://reviews.apache.org/r/3481/diff/2/?file=68443#file68443line654
bq.  
bq.   Can we implement this method ?

In a different jira, if there is demand. There are many unsupported methods in 
here.


- Lars


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3481/#review4341
---


On 2012-01-12 23:59:55, 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-12 23:59:55)
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
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
 1230675 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
 1230675 
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
Reporter: ryan rawson
Assignee: Lars Hofhansl
 Attachments: 3584-v1.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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread Amitanand Aiyer (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185357#comment-13185357
 ] 

Amitanand Aiyer commented on HBASE-3584:


Nice feature, lars!! 

Would be nice to have a batch/list functionality as well, like we have for 
deletes/puts.

Are there any (future?) plans to have a multi- version of the atomicMutation?

 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
Reporter: ryan rawson
Assignee: Lars Hofhansl
 Attachments: 3584-v1.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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread Lars Hofhansl (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185399#comment-13185399
 ] 

Lars Hofhansl commented on HBASE-3584:
--

Hi Amit... Since AtomicRowMutation implements the Row interface batching would 
be done with HTable.batch (which takes a ListRow and translates to an 
HRegionServer.multi request). Is that what you meant?

Not entirely sure what you mean with multi-version atomicMutation. Multiple 
versions is already possible by adding multiple Puts/Deletes with different 
versions).
Or do you mean atomic operations across multiple different rows? That is not 
going to happen any time soon :)


 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
Reporter: ryan rawson
Assignee: Lars Hofhansl
 Attachments: 3584-v1.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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-12 Thread Hadoop QA (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185459#comment-13185459
 ] 

Hadoop QA commented on HBASE-3584:
--

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12510460/3584-v3.txt
  against trunk revision .

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 9 new or modified tests.

-1 javadoc.  The javadoc tool appears to have generated -147 warning 
messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 82 new Findbugs (version 
1.3.9) warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

 -1 core tests.  The patch failed these unit tests:
   
org.apache.hadoop.hbase.coprocessor.TestRegionObserverInterface
  org.apache.hadoop.hbase.mapreduce.TestImportTsv
  org.apache.hadoop.hbase.mapred.TestTableMapReduce
  org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/752//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/752//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/752//console

This message is automatically generated.

 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




[jira] [Commented] (HBASE-3584) We need to atomically put/delete/increment in one call

2012-01-08 Thread Lars Hofhansl (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13182327#comment-13182327
 ] 

Lars Hofhansl commented on HBASE-3584:
--

Should we do this before client 2.0?

What should the client side API look like?
Something like: AtomicRowOperation (which implements Row, so can itself be 
batched), which wraps a set Put/Delete/Increment/Append (all for the same 
rowkey)?

Compared to a straight put(ListPut), this would probably be slower as we 
cannot do the same mini batching (not with a *lot* of refactoring).

Also it is not entirely clear that this could even work with Increment/Append 
of the special immediate-visibility that those need. So maybe start with 
Put/Delete.


 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
Reporter: ryan rawson

 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




[jira] Commented: (HBASE-3584) We need to atomically put/delete/increment in one call

2011-03-11 Thread ryan rawson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13005880#comment-13005880
 ] 

ryan rawson commented on HBASE-3584:


yes API 2.0. Just putting it in here for notability

 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
Reporter: ryan rawson
 Fix For: 0.92.0


 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] Commented: (HBASE-3584) We need to atomically put/delete/increment in one call

2011-02-28 Thread stack (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13000666#comment-13000666
 ] 

stack commented on HBASE-3584:
--

You think this a client API 2.0 feature Ryan?

 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
Reporter: ryan rawson
 Fix For: 0.92.0


 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira