HBASE-10432 Rpc retries non-recoverable error
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1574973 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
52b775db97
commit
1237a85052
@ -187,6 +187,9 @@ public class RpcRetryingCaller<T> {
|
|||||||
if (t instanceof RemoteException) {
|
if (t instanceof RemoteException) {
|
||||||
t = ((RemoteException)t).unwrapRemoteException();
|
t = ((RemoteException)t).unwrapRemoteException();
|
||||||
}
|
}
|
||||||
|
if (t instanceof LinkageError) {
|
||||||
|
throw new DoNotRetryIOException(t);
|
||||||
|
}
|
||||||
if (t instanceof ServiceException) {
|
if (t instanceof ServiceException) {
|
||||||
ServiceException se = (ServiceException)t;
|
ServiceException se = (ServiceException)t;
|
||||||
Throwable cause = se.getCause();
|
Throwable cause = se.getCause();
|
||||||
|
@ -33,6 +33,7 @@ import org.apache.hadoop.classification.InterfaceAudience;
|
|||||||
import org.apache.hadoop.classification.InterfaceStability;
|
import org.apache.hadoop.classification.InterfaceStability;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.hbase.CellScanner;
|
import org.apache.hadoop.hbase.CellScanner;
|
||||||
|
import org.apache.hadoop.hbase.DoNotRetryIOException;
|
||||||
import org.apache.hadoop.hbase.HBaseIOException;
|
import org.apache.hadoop.hbase.HBaseIOException;
|
||||||
import org.apache.hadoop.hbase.HConstants;
|
import org.apache.hadoop.hbase.HConstants;
|
||||||
import org.apache.hadoop.hbase.ServerName;
|
import org.apache.hadoop.hbase.ServerName;
|
||||||
@ -961,7 +962,10 @@ public class RpcClient {
|
|||||||
IOException e = ExceptionUtil.asInterrupt(t);
|
IOException e = ExceptionUtil.asInterrupt(t);
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
failedServers.addToFailedServers(remoteId.address);
|
failedServers.addToFailedServers(remoteId.address);
|
||||||
if (t instanceof IOException) {
|
if (t instanceof LinkageError) {
|
||||||
|
// probably the hbase hadoop version does not match the running hadoop version
|
||||||
|
e = new DoNotRetryIOException(t);
|
||||||
|
} else if (t instanceof IOException) {
|
||||||
e = (IOException) t;
|
e = (IOException) t;
|
||||||
} else {
|
} else {
|
||||||
e = new IOException("Could not set up IO Streams to " + server, t);
|
e = new IOException("Could not set up IO Streams to " + server, t);
|
||||||
|
@ -1719,6 +1719,10 @@ public class RpcServer implements RpcServerInterface {
|
|||||||
String msg = "Unable to read call parameter from client " + getHostAddress();
|
String msg = "Unable to read call parameter from client " + getHostAddress();
|
||||||
LOG.warn(msg, t);
|
LOG.warn(msg, t);
|
||||||
|
|
||||||
|
// probably the hbase hadoop version does not match the running hadoop version
|
||||||
|
if (t instanceof LinkageError) {
|
||||||
|
t = new DoNotRetryIOException(t);
|
||||||
|
}
|
||||||
// If the method is not present on the server, do not retry.
|
// If the method is not present on the server, do not retry.
|
||||||
if (t instanceof UnsupportedOperationException) {
|
if (t instanceof UnsupportedOperationException) {
|
||||||
t = new DoNotRetryIOException(t);
|
t = new DoNotRetryIOException(t);
|
||||||
@ -2048,6 +2052,7 @@ public class RpcServer implements RpcServerInterface {
|
|||||||
// putting it on the wire. Its needed to adhere to the pb Service Interface but we don't
|
// putting it on the wire. Its needed to adhere to the pb Service Interface but we don't
|
||||||
// need to pass it over the wire.
|
// need to pass it over the wire.
|
||||||
if (e instanceof ServiceException) e = e.getCause();
|
if (e instanceof ServiceException) e = e.getCause();
|
||||||
|
if (e instanceof LinkageError) throw new DoNotRetryIOException(e);
|
||||||
if (e instanceof IOException) throw (IOException)e;
|
if (e instanceof IOException) throw (IOException)e;
|
||||||
LOG.error("Unexpected throwable object ", e);
|
LOG.error("Unexpected throwable object ", e);
|
||||||
throw new IOException(e.getMessage(), e);
|
throw new IOException(e.getMessage(), e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user