Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> Why only check1-and-putMany and check1-and-deleteMany?

Mike Spreitzer 2012-11-18, 03:30
Ted Yu 2012-11-18, 04:44
Copy link to this message
Re: Why only check1-and-putMany and check1-and-deleteMany?
I am not looking at the trunk.  I am just a user looking at the interface
documented on the web site and wondering why the atomic composite
functionality is so limited.  It is not hard to imagine an expanded
interface that allows checking an arbitrary set of columns and, if each
has a value specified for it, doing an arbitrary set of Mutations.


From:   Ted Yu <[EMAIL PROTECTED]>
Date:   11/17/2012 11:44 PM
Subject:        Re: Why only check1-and-putMany and check1-and-deleteMany?

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 <[EMAIL PROTECTED]>

> If I understand correctly, an HTable has two composite atomic
> 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
> them be mixed?  Why not checkAndMutate?
> Thanks!
> Mike

Michael Segel 2012-11-18, 20:15
Mike Spreitzer 2012-11-19, 16:19
Michael Segel 2012-11-19, 16:50
Mike Spreitzer 2012-11-19, 17:01
Michael Segel 2012-11-19, 17:22
Ted Yu 2012-11-19, 18:55