Thank you Ted.
You are right it should works. Concerning condition when it can be
necessary: one case is when several (spark) executors can update the same
row with two int cells: C1 and C2, representing a range. Then C1 Should be
always <= C2. But without synch between executors, the data integrity can
be broken.
Thanks again

 + something), and data integrity for instance require
On 1/25/16, 3:02 PM, "Ted Yu" <yuzhih...@gmail.com> wrote:

>bq. what if I want to update two cells (from one row) in one atomic
>operation
>
>Can you clarify the condition on which the update should be performed ?
>Meaning, do you want to compare with one column or compare with two
>columns
>?
>
>If you want to compare with one column and update the row depending on
>result of the comparison, you can call addColumn() of Put twice (for the
>two columns, respectively) and pass the Put to checkAndPut().
>
>Cheers
>
>On Mon, Jan 25, 2016 at 12:40 PM, Yakubovich, Alexey <
>alexey.yakubov...@searshc.com> wrote:
>
>> I am trying to master HBase, and vuala, I discover that so nice API
>> components:
>>
>> checkAndPut, checkAndDelete, Increment, Append   (HTable)
>>
>> Or may be not so nice? So e.g. checkAndPut can atomically update the
>> specified cell.
>> But what if I want to update two cells (from one row) in one atomic
>> operation? What if it¹s two cells from two different rows, but in need
>>to
>> be updated atomically?
>>
>> What is the best way to achieve that?
>>
>> Thank you
>> Alexey
>>
>> This message, including any attachments, is the property of Sears
>>Holdings
>> Corporation and/or one of its subsidiaries. It is confidential and may
>> contain proprietary or legally privileged information. If you are not
>>the
>> intended recipient, please delete it without reading the contents. Thank
>> you.
>>

This message, including any attachments, is the property of Sears Holdings 
Corporation and/or one of its subsidiaries. It is confidential and may contain 
proprietary or legally privileged information. If you are not the intended 
recipient, please delete it without reading the contents. Thank you.

Reply via email to