HBase
  1. HBase
  2. HBASE-4903

Return a result from RegionObserver.preIncrement()

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.92.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The only way to return a result from RegionObserver.preIncrement() is to use Result.readFields() after serializing the correct result.

      This can be fixed either returning a Result object from that function or adding setters to Result. Another option is to modify the parameters and receive a List<KeyValue> as preGet() does.

      1. HBASE-4903.patch
        6 kB
        Daniel Gómez Ferro
      2. HBASE-4903.patch
        11 kB
        Daniel Gómez Ferro
      3. HBASE-4903-0.92.patch
        7 kB
        Lars Hofhansl
      4. 4903-add.txt
        0.8 kB
        Lars Hofhansl

        Activity

        Hide
        Daniel Gómez Ferro added a comment -

        Return a Result object from RegionObserver.pre/postIncrement()

        The user can easily create a new Result or forward it unmodified.

        Show
        Daniel Gómez Ferro added a comment - Return a Result object from RegionObserver.pre/postIncrement() The user can easily create a new Result or forward it unmodified.
        Hide
        Lars Hofhansl added a comment -
        {pre|post}

        Append has the same problem.

        Show
        Lars Hofhansl added a comment - {pre|post} Append has the same problem.
        Hide
        Lars Hofhansl added a comment -

        patch lgtm

        Show
        Lars Hofhansl added a comment - patch lgtm
        Hide
        Daniel Gómez Ferro added a comment -

        Modified pre/postAppend as well, good catch.

        I removed the Result parameter from both pre* functions and updated the documentation.

        Show
        Daniel Gómez Ferro added a comment - Modified pre/postAppend as well, good catch. I removed the Result parameter from both pre* functions and updated the documentation.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12505635/HBASE-4903.patch
        against trunk revision .

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

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

        -1 javadoc. The javadoc tool appears to have generated -162 warning messages.

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

        -1 findbugs. The patch appears to introduce 67 new Findbugs (version 1.3.9) warnings.

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

        -1 core tests. The patch failed these unit tests:
        org.apache.hadoop.hbase.master.TestRollingRestart
        org.apache.hadoop.hbase.master.TestRestartCluster
        org.apache.hadoop.hbase.master.TestDistributedLogSplitting
        org.apache.hadoop.hbase.master.TestHMasterRPCException
        org.apache.hadoop.hbase.mapreduce.TestTimeRangeMapRed
        org.apache.hadoop.hbase.master.TestMaster
        org.apache.hadoop.hbase.mapreduce.TestLoadIncrementalHFilesSplitRecovery
        org.apache.hadoop.hbase.master.TestMasterRestartAfterDisablingTable
        org.apache.hadoop.hbase.mapreduce.TestTableInputFormatScan
        org.apache.hadoop.hbase.master.TestZKBasedOpenCloseRegion
        org.apache.hadoop.hbase.TestFullLogReconstruction
        org.apache.hadoop.hbase.avro.TestAvroServer
        org.apache.hadoop.hbase.mapreduce.TestLoadIncrementalHFiles
        org.apache.hadoop.hbase.master.TestMasterFailover
        org.apache.hadoop.hbase.mapreduce.TestImportTsv
        org.apache.hadoop.hbase.master.TestMasterTransitions
        org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat
        org.apache.hadoop.hbase.mapreduce.TestTableMapReduce
        org.apache.hadoop.hbase.master.TestOpenedRegionHandler

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/408//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/408//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/408//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/12505635/HBASE-4903.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 javadoc. The javadoc tool appears to have generated -162 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 67 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hbase.master.TestRollingRestart org.apache.hadoop.hbase.master.TestRestartCluster org.apache.hadoop.hbase.master.TestDistributedLogSplitting org.apache.hadoop.hbase.master.TestHMasterRPCException org.apache.hadoop.hbase.mapreduce.TestTimeRangeMapRed org.apache.hadoop.hbase.master.TestMaster org.apache.hadoop.hbase.mapreduce.TestLoadIncrementalHFilesSplitRecovery org.apache.hadoop.hbase.master.TestMasterRestartAfterDisablingTable org.apache.hadoop.hbase.mapreduce.TestTableInputFormatScan org.apache.hadoop.hbase.master.TestZKBasedOpenCloseRegion org.apache.hadoop.hbase.TestFullLogReconstruction org.apache.hadoop.hbase.avro.TestAvroServer org.apache.hadoop.hbase.mapreduce.TestLoadIncrementalHFiles org.apache.hadoop.hbase.master.TestMasterFailover org.apache.hadoop.hbase.mapreduce.TestImportTsv org.apache.hadoop.hbase.master.TestMasterTransitions org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat org.apache.hadoop.hbase.mapreduce.TestTableMapReduce org.apache.hadoop.hbase.master.TestOpenedRegionHandler Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/408//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/408//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/408//console This message is automatically generated.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12505641/HBASE-4903.patch
        against trunk revision .

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

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

        -1 javadoc. The javadoc tool appears to have generated -162 warning messages.

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

        -1 findbugs. The patch appears to introduce 67 new Findbugs (version 1.3.9) warnings.

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

        -1 core tests. The patch failed these unit tests:
        org.apache.hadoop.hbase.replication.TestReplication
        org.apache.hadoop.hbase.client.TestAdmin

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/409//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/409//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/409//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/12505641/HBASE-4903.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 javadoc. The javadoc tool appears to have generated -162 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 67 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hbase.replication.TestReplication org.apache.hadoop.hbase.client.TestAdmin Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/409//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/409//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/409//console This message is automatically generated.
        Hide
        Lars Hofhansl added a comment -

        Thanks for fixing append as well. Patch looks good... +1

        The two failures look unrelated, I'll double check before I commit.

        Show
        Lars Hofhansl added a comment - Thanks for fixing append as well. Patch looks good... +1 The two failures look unrelated, I'll double check before I commit.
        Hide
        stack added a comment -

        Should this go into 0.92? Seems like problem w/ the api?

        Show
        stack added a comment - Should this go into 0.92? Seems like problem w/ the api?
        Hide
        Lars Hofhansl added a comment -

        Hmm... Good point. I think so.
        If you +1 it, I'll put it into 0.92 and trunk
        (0.92 target is now 0.92.1?)

        Show
        Lars Hofhansl added a comment - Hmm... Good point. I think so. If you +1 it, I'll put it into 0.92 and trunk (0.92 target is now 0.92.1?)
        Hide
        stack added a comment -

        +1 on patch. I moved all outstanding 0.92.0 issues to 0.92.1. This one, commit to 0.92 branch and mark fix as 0.92.1. If (smile) a new RC, I'll do fix up so version is 0.92.0 so this fix is included in 0.92.0. I think thats the right thing to do.

        Show
        stack added a comment - +1 on patch. I moved all outstanding 0.92.0 issues to 0.92.1. This one, commit to 0.92 branch and mark fix as 0.92.1. If (smile) a new RC, I'll do fix up so version is 0.92.0 so this fix is included in 0.92.0. I think thats the right thing to do.
        Hide
        Lars Hofhansl added a comment -

        Cool. Will do this evening.

        Show
        Lars Hofhansl added a comment - Cool. Will do this evening.
        Hide
        Lars Hofhansl added a comment -

        0.92 does not have appends, here's the 0.92 version I created and committed

        Show
        Lars Hofhansl added a comment - 0.92 does not have appends, here's the 0.92 version I created and committed
        Hide
        Lars Hofhansl added a comment -

        Committed to 0.92 and trunk.

        Show
        Lars Hofhansl added a comment - Committed to 0.92 and trunk.
        Hide
        Lars Hofhansl added a comment -

        Thanks for the patch Daniel!

        Show
        Lars Hofhansl added a comment - Thanks for the patch Daniel!
        Hide
        Lars Hofhansl added a comment -

        btw. I did verify that both TestReplication and TestAdmin pass locally before I committed.

        Show
        Lars Hofhansl added a comment - btw. I did verify that both TestReplication and TestAdmin pass locally before I committed.
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2505 (See https://builds.apache.org/job/HBase-TRUNK/2505/)
        HBASE-4903 Return a result from RegionObserver.preIncrement (Daniel Gómez Ferro)

        larsh :
        Files :

        • /hbase/trunk/CHANGES.txt
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
        • /hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2505 (See https://builds.apache.org/job/HBase-TRUNK/2505/ ) HBASE-4903 Return a result from RegionObserver.preIncrement (Daniel Gómez Ferro) larsh : Files : /hbase/trunk/CHANGES.txt /hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java /hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java /hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92 #166 (See https://builds.apache.org/job/HBase-0.92/166/)
        HBASE-4903 Return a result from RegionObserver.preIncrement (Daniel Gómez Ferro)

        larsh :
        Files :

        • /hbase/branches/0.92/CHANGES.txt
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
        • /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
        Show
        Hudson added a comment - Integrated in HBase-0.92 #166 (See https://builds.apache.org/job/HBase-0.92/166/ ) HBASE-4903 Return a result from RegionObserver.preIncrement (Daniel Gómez Ferro) larsh : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92-security #28 (See https://builds.apache.org/job/HBase-0.92-security/28/)
        HBASE-4903 Return a result from RegionObserver.preIncrement (Daniel Gómez Ferro)

        larsh :
        Files :

        • /hbase/branches/0.92/CHANGES.txt
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
        • /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
        Show
        Hudson added a comment - Integrated in HBase-0.92-security #28 (See https://builds.apache.org/job/HBase-0.92-security/28/ ) HBASE-4903 Return a result from RegionObserver.preIncrement (Daniel Gómez Ferro) larsh : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-security #18 (See https://builds.apache.org/job/HBase-TRUNK-security/18/)
        HBASE-4903 Return a result from RegionObserver.preIncrement (Daniel Gómez Ferro)

        larsh :
        Files :

        • /hbase/trunk/CHANGES.txt
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
        • /hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-security #18 (See https://builds.apache.org/job/HBase-TRUNK-security/18/ ) HBASE-4903 Return a result from RegionObserver.preIncrement (Daniel Gómez Ferro) larsh : Files : /hbase/trunk/CHANGES.txt /hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java /hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java /hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
        Hide
        Lars Hofhansl added a comment -

        Addendum for the security build (both 0.92 and trunk).

        Show
        Lars Hofhansl added a comment - Addendum for the security build (both 0.92 and trunk).
        Hide
        Lars Hofhansl added a comment -

        addendum committed to 0.92 and trunk.

        Show
        Lars Hofhansl added a comment - addendum committed to 0.92 and trunk.
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92 #168 (See https://builds.apache.org/job/HBase-0.92/168/)
        HBASE-4903 addendum for security build

        larsh :
        Files :

        • /hbase/branches/0.92/security/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
        Show
        Hudson added a comment - Integrated in HBase-0.92 #168 (See https://builds.apache.org/job/HBase-0.92/168/ ) HBASE-4903 addendum for security build larsh : Files : /hbase/branches/0.92/security/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2508 (See https://builds.apache.org/job/HBase-TRUNK/2508/)
        HBASE-4903 addendum for security build

        larsh :
        Files :

        • /hbase/trunk/security/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2508 (See https://builds.apache.org/job/HBase-TRUNK/2508/ ) HBASE-4903 addendum for security build larsh : Files : /hbase/trunk/security/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92-security #29 (See https://builds.apache.org/job/HBase-0.92-security/29/)
        HBASE-4903 addendum for security build

        larsh :
        Files :

        • /hbase/branches/0.92/security/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
        Show
        Hudson added a comment - Integrated in HBase-0.92-security #29 (See https://builds.apache.org/job/HBase-0.92-security/29/ ) HBASE-4903 addendum for security build larsh : Files : /hbase/branches/0.92/security/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-security #19 (See https://builds.apache.org/job/HBase-TRUNK-security/19/)
        HBASE-4903 addendum for security build

        larsh :
        Files :

        • /hbase/trunk/security/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-security #19 (See https://builds.apache.org/job/HBase-TRUNK-security/19/ ) HBASE-4903 addendum for security build larsh : Files : /hbase/trunk/security/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
        Hide
        stack added a comment -

        This will be in 0.92 afterall; cutting a new RC.

        Show
        stack added a comment - This will be in 0.92 afterall; cutting a new RC.

          People

          • Assignee:
            Unassigned
            Reporter:
            Daniel Gómez Ferro
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development