HBASE-4412 No need to retry scan operation on the same server in case of

RegionServerStoppedException (Ming Ma)


git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1177498 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2011-09-30 04:03:33 +00:00
parent 3a7bda2cd1
commit 93a104a018
3 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -59,6 +59,7 @@ import org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitor;
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 HTableInterface, Closeable {
}
} else {
Throwable cause = e.getCause();
if (cause == null || !(cause instanceof NotServingRegionException)) {
if (cause == null || (!(cause instanceof NotServingRegionException)
&& !(cause instanceof RegionServerStoppedException))) {
throw e;
}
}

View File

@ -28,6 +28,7 @@ import org.apache.hadoop.hbase.DoNotRetryIOException;
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 ServerCallable<Result[]> {
// 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;