hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1553170 - in /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase: coprocessor/BaseRegionObserver.java coprocessor/RegionObserver.java regionserver/HRegion.java regionserver/RegionCoprocessorHost.java
Date Mon, 23 Dec 2013 18:36:02 GMT
Author: larsh
Date: Mon Dec 23 18:36:02 2013
New Revision: 1553170

URL: http://svn.apache.org/r1553170
Log:
HBASE-10225 Bug in calls to RegionObsever.postScannerFilterRow (Anoop)

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java?rev=1553170&r1=1553169&r2=1553170&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
Mon Dec 23 18:36:02 2013
@@ -340,10 +340,11 @@ public abstract class BaseRegionObserver
 
   @Override
   public boolean postScannerFilterRow(final ObserverContext<RegionCoprocessorEnvironment>
e,
-      final InternalScanner s, final byte[] currentRow, final boolean hasMore) throws IOException
{
+      final InternalScanner s, final byte[] currentRow, final int offset, final short length,
+      final boolean hasMore) throws IOException {
     return hasMore;
   }
-  
+
   @Override
   public void preScannerClose(final ObserverContext<RegionCoprocessorEnvironment> e,
       final InternalScanner s) throws IOException {

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java?rev=1553170&r1=1553169&r2=1553170&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
Mon Dec 23 18:36:02 2013
@@ -819,12 +819,15 @@ public interface RegionObserver extends 
    * @param c the environment provided by the region server
    * @param s the scanner
    * @param currentRow The current rowkey which got filtered out
+   * @param offset offset to rowkey
+   * @param length length of rowkey
    * @param hasMore the 'has more' indication
    * @return whether more rows are available for the scanner or not
    * @throws IOException
    */
   boolean postScannerFilterRow(final ObserverContext<RegionCoprocessorEnvironment>
c,
-      final InternalScanner s, final byte[] currentRow, final boolean hasMore) throws IOException;
+      final InternalScanner s, final byte[] currentRow, final int offset, final short length,
+      final boolean hasMore) throws IOException;
   
   /**
    * Called before the client closes a scanner.

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1553170&r1=1553169&r2=1553170&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Mon
Dec 23 18:36:02 2013
@@ -4154,7 +4154,8 @@ public class HRegion implements HeapSize
       resetFilters();
       // Calling the hook in CP which allows it to do a fast forward
       if (this.region.getCoprocessorHost() != null) {
-        return this.region.getCoprocessorHost().postScannerFilterRow(this, currentRow);
+        return this.region.getCoprocessorHost().postScannerFilterRow(this, currentRow, offset,
+            length);
       }
       return true;
     }

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java?rev=1553170&r1=1553169&r2=1553170&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
Mon Dec 23 18:36:02 2013
@@ -1390,11 +1390,13 @@ public class RegionCoprocessorHost
    * filter.
    * @param s the scanner
    * @param currentRow The current rowkey which got filtered out
+   * @param offset offset to rowkey
+   * @param length length of rowkey
    * @return whether more rows are available for the scanner or not
    * @throws IOException
    */
-  public boolean postScannerFilterRow(final InternalScanner s, final byte[] currentRow)
-      throws IOException {
+  public boolean postScannerFilterRow(final InternalScanner s, final byte[] currentRow, int
offset,
+      short length) throws IOException {
     boolean hasMore = true; // By default assume more rows there.
     ObserverContext<RegionCoprocessorEnvironment> ctx = null;
     for (RegionEnvironment env : coprocessors) {
@@ -1402,7 +1404,7 @@ public class RegionCoprocessorHost
         ctx = ObserverContext.createAndPrepare(env, ctx);
         try {
           hasMore = ((RegionObserver) env.getInstance()).postScannerFilterRow(ctx, s, currentRow,
-              hasMore);
+              offset, length, hasMore);
         } catch (Throwable e) {
           handleCoprocessorThrowable(env, e);
         }



Mime
View raw message