@InterfaceAudience.Public public class RemoteWithExtrasException extends org.apache.hadoop.ipc.RemoteException
RemoteException
with some extra information. If source exception was a
DoNotRetryIOException
, isDoNotRetry()
will return true.
A RemoteException
hosts exceptions we got from the server.
Modifier and Type | Class and Description |
---|---|
private static class |
RemoteWithExtrasException.ClassLoaderHolder
Dynamic class loader to load filter/comparators
|
Modifier and Type | Field and Description |
---|---|
private boolean |
doNotRetry |
private String |
hostname |
private int |
port |
private boolean |
serverOverloaded |
Constructor and Description |
---|
RemoteWithExtrasException(String className,
String msg,
boolean doNotRetry) |
RemoteWithExtrasException(String className,
String msg,
boolean doNotRetry,
boolean serverOverloaded) |
RemoteWithExtrasException(String className,
String msg,
String hostname,
int port,
boolean doNotRetry) |
RemoteWithExtrasException(String className,
String msg,
String hostname,
int port,
boolean doNotRetry,
boolean serverOverloaded) |
Modifier and Type | Method and Description |
---|---|
String |
getHostname()
Returns null if not set
|
int |
getPort()
Returns -1 if not set
|
private IOException |
instantiateException(Class<? extends IOException> cls) |
boolean |
isDoNotRetry()
Returns True if origin exception was a do not retry type.
|
boolean |
isServerOverloaded()
Returns True if the server was considered overloaded when the exception was thrown.
|
IOException |
unwrapRemoteException() |
getClassName, getErrorCode, toString, unwrapRemoteException, valueOf
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
private final int port
private final boolean doNotRetry
private final boolean serverOverloaded
public RemoteWithExtrasException(String className, String msg, boolean doNotRetry)
public RemoteWithExtrasException(String className, String msg, boolean doNotRetry, boolean serverOverloaded)
public RemoteWithExtrasException(String className, String msg, String hostname, int port, boolean doNotRetry)
public RemoteWithExtrasException(String className, String msg, String hostname, int port, boolean doNotRetry, boolean serverOverloaded)
public IOException unwrapRemoteException()
unwrapRemoteException
in class org.apache.hadoop.ipc.RemoteException
private IOException instantiateException(Class<? extends IOException> cls) throws Exception
Exception
public String getHostname()
public int getPort()
public boolean isDoNotRetry()
public boolean isServerOverloaded()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.