hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [1/2] hbase git commit: HBASE-17587 Do not Rethrow DoNotRetryIOException as UnknownScannerException
Date Tue, 07 Feb 2017 00:21:33 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 84d7318f8 -> 62f7b3952


HBASE-17587 Do not Rethrow DoNotRetryIOException as UnknownScannerException

Signed-off-by: Andrew Purtell <apurtell@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/43078862
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/43078862
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/43078862

Branch: refs/heads/branch-1.1
Commit: 4307886247a206bc0b1d9a12333a3afac3778c1e
Parents: 84d7318
Author: Zach York <zyork@amazon.com>
Authored: Thu Feb 2 02:44:58 2017 -0800
Committer: Enis Soztutar <enis@apache.org>
Committed: Mon Feb 6 16:14:15 2017 -0800

----------------------------------------------------------------------
 .../apache/hadoop/hbase/regionserver/RSRpcServices.java | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/43078862/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
index 116d70c..fed9e62 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
@@ -18,6 +18,7 @@
  */
 package org.apache.hadoop.hbase.regionserver;
 
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.net.InetSocketAddress;
@@ -2539,6 +2540,17 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
           // row that the client has last seen.
           closeScanner(region, scanner, scannerName);
 
+          // rethrow DoNotRetryIOException. This can avoid the retry in ClientScanner.
+          if (e instanceof DoNotRetryIOException) {
+            throw e;
+          }
+
+          // If it is a FileNotFoundException, wrap as a
+          // DoNotRetryIOException. This can avoid the retry in ClientScanner.
+          if (e instanceof FileNotFoundException) {
+            throw new DoNotRetryIOException(e);
+          }
+
           // We closed the scanner already. Instead of throwing the IOException, and client
           // retrying with the same scannerId only to get USE on the next RPC, we directly
throw
           // a special exception to save an RPC.


Mime
View raw message