You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by victorspivak <vi...@gmail.com> on 2013/06/12 11:46:46 UTC

Batch and checkAndPut

I saw a similar question but not exactly what I have.I have a row with
several fields. I would like to update these fields for one row in a batch
(i assume it will be atomic) but I would like to update them if one of these
fields value satisfy a condition. What are my options? Thanks, Victor 



--
View this message in context: http://apache-hbase.679495.n3.nabble.com/Batch-and-checkAndPut-tp4046139.html
Sent from the HBase Developer mailing list archive at Nabble.com.

Re: Batch and checkAndPut

Posted by Ted Yu <yu...@gmail.com>.
You can use HTable.checkAndPut():

  boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,

      byte[] value, Put put) throws IOException;
Take a look at its javadoc for details.

Cheers

On Wed, Jun 12, 2013 at 2:46 AM, victorspivak <vi...@gmail.com>wrote:

> I saw a similar question but not exactly what I have.I have a row with
> several fields. I would like to update these fields for one row in a batch
> (i assume it will be atomic) but I would like to update them if one of
> these
> fields value satisfy a condition. What are my options? Thanks, Victor
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Batch-and-checkAndPut-tp4046139.html
> Sent from the HBase Developer mailing list archive at Nabble.com.