hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Why only check1-and-putMany and check1-and-deleteMany?
Date Sun, 18 Nov 2012 04:44:04 GMT
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


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