hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1214430 - in /hbase/branches/0.92: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Date Wed, 14 Dec 2011 19:56:23 GMT
Author: tedyu
Date: Wed Dec 14 19:56:23 2011
New Revision: 1214430

URL: http://svn.apache.org/viewvc?rev=1214430&view=rev
Log:
HBASE-5026  Add coprocessor hook to HRegionServer.ScannerListener.leaseExpired()

Modified:
    hbase/branches/0.92/CHANGES.txt
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1214430&r1=1214429&r2=1214430&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Wed Dec 14 19:56:23 2011
@@ -486,6 +486,7 @@ Release 0.92.0 - Unreleased
    HBASE-4881  Unhealthy region is on service caused by rollback of region splitting
                (Chunhui Shen)
    HBASE-4997  SplitLogManager can have a race on batch.installed (Prakash Khemani)
+   HBASE-5026  Add coprocessor hook to HRegionServer.ScannerListener.leaseExpired()
 
   TESTS
    HBASE-4492  TestRollingRestart fails intermittently

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1214430&r1=1214429&r2=1214430&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Wed Dec 14 19:56:23 2011
@@ -2203,9 +2203,18 @@ public class HRegionServer implements HR
       RegionScanner s = scanners.remove(this.scannerName);
       if (s != null) {
         try {
+          HRegion region = getRegion(s.getRegionInfo().getRegionName());
+          if (region != null && region.getCoprocessorHost() != null) {
+            region.getCoprocessorHost().preScannerClose(s);
+          }
+
           s.close();
+          if (region != null && region.getCoprocessorHost() != null) {
+            region.getCoprocessorHost().postScannerClose(s);
+          }
         } catch (IOException e) {
-          LOG.error("Closing scanner", e);
+          LOG.error("Closing scanner for "
+              + s.getRegionInfo().getRegionNameAsString(), e);
         }
       }
     }



Mime
View raw message