hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: HBase atomic update
Date Mon, 25 Jan 2016 21:02:38 GMT
bq. what if I want to update two cells (from one row) in one atomic

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().


On Mon, Jan 25, 2016 at 12:40 PM, Yakubovich, Alexey <
Alexey.Yakubovich@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.

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