HBase
  1. HBase
  2. HBASE-10262

provide user/client checkAndPut/checkAndDelete API with full CompareOp rather than only CompareOp.EQUAL

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      currently checkAndPut/checkAndDelete provided by HTable doesn't support full CompareOp other than CompareOp.EQUAL, which limits user/client from doing more flexible checkAndPut/checkAndDelete operation. this improvement fixes this limit by exposing additional checkAndPut/checkAndDelete API with full CompareOp support.

        Activity

        Hide
        Lars Hofhansl added a comment -

        Agreed. Closed as DUP.

        Show
        Lars Hofhansl added a comment - Agreed. Closed as DUP.
        Hide
        Andrew Purtell added a comment -

        Rather than start a new discussion here, especially because it skips relevant information on the other issue, let's close this as duplicate and continue on HBASE-5923

        Show
        Andrew Purtell added a comment - Rather than start a new discussion here, especially because it skips relevant information on the other issue, let's close this as duplicate and continue on HBASE-5923
        Hide
        Lars Hofhansl added a comment -

        Please see (long'ish) discussion on HBASE-5923. If we allow control of the compareOp we need to allow for different comparators as well (for LESS, etc)
        Or we can punt on that and just force binary comparator as we do not for EQUAL

        Show
        Lars Hofhansl added a comment - Please see (long'ish) discussion on HBASE-5923 . If we allow control of the compareOp we need to allow for different comparators as well (for LESS, etc) Or we can punt on that and just force binary comparator as we do not for EQUAL
        Hide
        Honghua Feng added a comment -

        all unit tests passed in my local machine, including the above 3 failed cases. wondering...

        Show
        Honghua Feng added a comment - all unit tests passed in my local machine, including the above 3 failed cases. wondering...
        Hide
        Honghua Feng added a comment -

        Anoop Sam John Thanks for reminder. Yes, it duplicates HBASE-5923 by its purpose. After going through the discussion, my understanding is it can't be achieved gracefully since it also exposes pb type CompareType to client (according to Lars Hofhansl's patch and stack's suggestion).
        Seems it's feasible to using CompareFilter.CompareOp as the HTable/HTableInterface interface argument and mapping it to pb CompareType just before making the request, as my patch does. Would Lars Hofhansl and stack check/review the patch to determine if it looks good enough to go in the trunk? According unit-tests in TestFromClientSide are also provided. Thanks.

        Show
        Honghua Feng added a comment - Anoop Sam John Thanks for reminder. Yes, it duplicates HBASE-5923 by its purpose. After going through the discussion, my understanding is it can't be achieved gracefully since it also exposes pb type CompareType to client (according to Lars Hofhansl 's patch and stack 's suggestion). Seems it's feasible to using CompareFilter.CompareOp as the HTable/HTableInterface interface argument and mapping it to pb CompareType just before making the request, as my patch does. Would Lars Hofhansl and stack check/review the patch to determine if it looks good enough to go in the trunk? According unit-tests in TestFromClientSide are also provided. Thanks.
        Hide
        Anoop Sam John added a comment -

        Duplicates HBASE-5923?

        Show
        Anoop Sam John added a comment - Duplicates HBASE-5923 ?
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12620924/HBASE-10262-trunk_v0.patch
        against trunk revision .
        ATTACHMENT ID: 12620924

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 hadoop1.0. The patch compiles against the hadoop 1.0 profile.

        +1 hadoop1.1. The patch compiles against the hadoop 1.1 profile.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 lineLengths. The patch does not introduce lines longer than 100

        -1 site. The patch appears to cause mvn site goal to fail.

        -1 core tests. The patch failed these unit tests:
        org.apache.hadoop.hbase.coprocessor.TestRegionServerCoprocessorExceptionWithAbort
        org.apache.hadoop.hbase.util.TestHBaseFsck

        -1 core zombie tests. There are 1 zombie test(s): at org.apache.hadoop.hbase.TestAcidGuarantees.testGetAtomicity(TestAcidGuarantees.java:331)

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12620924/HBASE-10262-trunk_v0.patch against trunk revision . ATTACHMENT ID: 12620924 +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 3 new or modified tests. +1 hadoop1.0 . The patch compiles against the hadoop 1.0 profile. +1 hadoop1.1 . The patch compiles against the hadoop 1.1 profile. +1 javadoc . The javadoc tool did not generate any warning messages. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 lineLengths . The patch does not introduce lines longer than 100 -1 site . The patch appears to cause mvn site goal to fail. -1 core tests . The patch failed these unit tests: org.apache.hadoop.hbase.coprocessor.TestRegionServerCoprocessorExceptionWithAbort org.apache.hadoop.hbase.util.TestHBaseFsck -1 core zombie tests . There are 1 zombie test(s): at org.apache.hadoop.hbase.TestAcidGuarantees.testGetAtomicity(TestAcidGuarantees.java:331) Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/8309//console This message is automatically generated.
        Hide
        Honghua Feng added a comment -

        thank Ted Yu and ping Andrew Purtell

        Show
        Honghua Feng added a comment - thank Ted Yu and ping Andrew Purtell
        Hide
        Honghua Feng added a comment -

        patch attached

        Show
        Honghua Feng added a comment - patch attached

          People

          • Assignee:
            Honghua Feng
            Reporter:
            Honghua Feng
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development