hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Spreitzer <mspre...@us.ibm.com>
Subject Re: Why only check1-and-putMany and check1-and-deleteMany?
Date Mon, 19 Nov 2012 16:19:35 GMT
If you are asking why the HBase API has appends as well as puts, I am not 
going to play the expert here.  Either there is a good reason for it, or 

My goal in this line of questioning is to understand why there is not a 
more comprehensive composite atomic operation available.  If there is a 
good reason for the API to include appends, then that reason applies here. 
 If there is no such reason, then you may ignore the appends in my 


From:   Michael Segel <michael_segel@hotmail.com>
To:     user@hbase.apache.org
Date:   11/18/2012 03:15 PM
Subject:        Re: Why only check1-and-putMany and check1-and-deleteMany?

Ok, maybe this is a silly question on my part.... 

Could you define what you mean by check and append? 
With respect to HBase, how would that be different from check and put? 

On Nov 18, 2012, at 12:28 AM, Mike Spreitzer <mspreitz@us.ibm.com> wrote:

> I am not looking at the trunk.  I am just a user looking at the 
> documented on the web site and wondering why the atomic composite 
> functionality is so limited.  It is not hard to imagine an expanded 
> interface that allows checking an arbitrary set of columns and, if each 
> has a value specified for it, doing an arbitrary set of Mutations.
> Thanks,
> Mike
> From:   Ted Yu <yuzhihong@gmail.com>
> To:     user@hbase.apache.org
> Date:   11/17/2012 11:44 PM
> Subject:        Re: Why only check1-and-putMany and 
> Are you looking at trunk code ?
> In trunk, take a look at HRegion.checkAndMutate() where you can specify
> ByteArrayComparable which does the comparison (matching).
> There is still the limit of single value:
>        } else if (result.size() == 1 && !valueIsNull) {
>          KeyValue kv = result.get(0);
> For the moment, only Put and Delete are supported:
>    if (!isPut && !(w instanceof Delete))
>      throw new DoNotRetryIOException("Action must be Put or Delete");
> If you have suggestion on how the check part can be more general, please
> comment.
> Thanks
> On Sat, Nov 17, 2012 at 7:30 PM, Mike Spreitzer <mspreitz@us.ibm.com> 
> wrote:
>> If I understand correctly, an HTable has two composite atomic 
> operations,
>> checkAndPut and checkAndDelete.  The check part checks just a single
>> column's value.  Why not allow checking more than one column?
>> Why no checkAndAppend?
>> The checkAndPut operation can put to multiple columns, right?  And the
>> checkAndDelete operation can delete multiple columns, right?  Why not 
> let
>> them be mixed?  Why not checkAndMutate?
>> Thanks!
>> Mike

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message