hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Em <mailformailingli...@yahoo.de>
Subject Re: Multi-CheckAnd...
Date Sun, 28 Apr 2013 08:06:58 GMT
Hi,

my API was not correct.

It has to look like this (forgot the "value"-param):

public boolean[] multiCheckAndPut(byte[]row, byte[] family, byte[]
 column, byte[] value, List<Put> puts);

> In the API you described, what is the meaning for first parameter, row ?
> Are the puts allowed to write into rows with row keys other than that
> specified by row ?

To be consistent with the other checkAndXXX-methods:
You are free to choose the rowKey in any way you like - even choosing
one from another region is considered valid. However those methods were
made for rows that are located in the same region as the related Put and
are only atomic compare-and-set-operations, if the specified rowKey for
the comparison is the same as the row of the related Put.

Kind regards,
Em


Am 28.04.2013 00:48, schrieb Ted Yu:
> In the API you described, what is the meaning for first parameter, row ?
> Are the puts allowed to write into rows with row keys other than that
> specified by row ?
> 
> I am asking because potentially the rowkey range implied by puts may span
> beyond one region.
> If that is the case, HBase doesn't support atomicity (across regions).
> 
> Cheers
> 
> On Sat, Apr 27, 2013 at 11:09 PM, Em <mailformailinglists@yahoo.de> wrote:
> 
>> Hello list,
>>
>> I was wondering how to create a multi-row-mutation with
>> precondition-constraints.
>>
>> Something like this:
>>
>> public boolean[] multiCheckAndPut(byte[]row, byte[] family, byte[]
>> column, List<Put> puts);
>>
>> This looks a little bit ugly but illustrates the idea.
>>
>> Are there any alternatives that would fit the use-case?
>>
>> Kind regards,
>> Em
>>
> 

Mime
View raw message