hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1177498 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/client/HTable.java src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
Date Fri, 30 Sep 2011 04:03:33 GMT
Author: tedyu
Date: Fri Sep 30 04:03:33 2011
New Revision: 1177498

URL: http://svn.apache.org/viewvc?rev=1177498&view=rev
Log:
HBASE-4412  No need to retry scan operation on the same server in case of
               RegionServerStoppedException (Ming Ma)

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1177498&r1=1177497&r2=1177498&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Fri Sep 30 04:03:33 2011
@@ -319,6 +319,8 @@ Release 0.92.0 - Unreleased
    HBASE-3130  [replication] ReplicationSource can't recover from session
                expired on remote clusters (Chris Trezzo via JD)
    HBASE-4212  TestMasterFailover fails occasionally (Gao Jinchao)
+   HBASE-4412  No need to retry scan operation on the same server in case of
+               RegionServerStoppedException (Ming Ma)
 
   TESTS
    HBASE-4450  test for number of blocks read: to serve as baseline for expected

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java?rev=1177498&r1=1177497&r2=1177498&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java Fri Sep 30 04:03:33
2011
@@ -59,6 +59,7 @@ import org.apache.hadoop.hbase.client.Me
 import org.apache.hadoop.hbase.client.coprocessor.Batch;
 import org.apache.hadoop.hbase.ipc.CoprocessorProtocol;
 import org.apache.hadoop.hbase.ipc.ExecRPCInvoker;
+import org.apache.hadoop.hbase.regionserver.RegionServerStoppedException;
 import org.apache.hadoop.hbase.util.Addressing;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Pair;
@@ -1201,7 +1202,8 @@ public class HTable implements HTableInt
               }
             } else {
               Throwable cause = e.getCause();
-              if (cause == null || !(cause instanceof NotServingRegionException)) {
+              if (cause == null || (!(cause instanceof NotServingRegionException)
+                  && !(cause instanceof RegionServerStoppedException))) {
                 throw e;
               }
             }

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java?rev=1177498&r1=1177497&r2=1177498&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java Fri Sep
30 04:03:33 2011
@@ -28,6 +28,7 @@ import org.apache.hadoop.hbase.DoNotRetr
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.NotServingRegionException;
 import org.apache.hadoop.hbase.RemoteExceptionHandler;
+import org.apache.hadoop.hbase.regionserver.RegionServerStoppedException;
 import org.apache.hadoop.ipc.RemoteException;
 
 
@@ -88,6 +89,11 @@ public class ScannerCallable extends Ser
           // when what we need is to open scanner against new location.
           // Attach NSRE to signal client that it needs to resetup scanner.
           throw new DoNotRetryIOException("Reset scanner", ioe);
+        } else if (ioe instanceof RegionServerStoppedException) {
+          // Throw a DNRE so that we break out of cycle of calling RSSE
+          // when what we need is to open scanner against new location.
+          // Attach RSSE to signal client that it needs to resetup scanner.
+          throw new DoNotRetryIOException("Reset scanner", ioe);
         } else {
           // The outer layers will retry
           throw ioe;



Mime
View raw message