Package org.apache.hadoop.ipc
Class RemoteException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.hadoop.ipc.RemoteException
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteException(String className, String msg) RemoteException(String className, String msg, org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RpcResponseHeaderProto.RpcErrorCodeProto erCode) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RpcResponseHeaderProto.RpcErrorCodePrototoString()Instantiate and return the exception wrapped up by this remote exception.unwrapRemoteException(Class<?>... lookupTypes) If this remote exception wraps up one of the lookupTypes then return this exception.static RemoteExceptionvalueOf(Attributes attrs) Create RemoteException from attributes.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
RemoteException
- Parameters:
className- wrapped exception, may be nullmsg- may be null
-
RemoteException
public RemoteException(String className, String msg, org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RpcResponseHeaderProto.RpcErrorCodeProto erCode) - Parameters:
className- wrapped exception, may be nullmsg- may be nullerCode- may be null
-
-
Method Details
-
getClassName
- Returns:
- the class name for the wrapped exception; may be null if none was given.
-
getErrorCode
public org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RpcResponseHeaderProto.RpcErrorCodeProto getErrorCode()- Returns:
- may be null if the code was newer than our protobuf definitions or none was given.
-
unwrapRemoteException
If this remote exception wraps up one of the lookupTypes then return this exception.Unwraps any IOException.
- Parameters:
lookupTypes- the desired exception class. may be null.- Returns:
- IOException, which is either the lookupClass exception or this.
-
unwrapRemoteException
Instantiate and return the exception wrapped up by this remote exception.This unwraps any
Throwablethat has a constructor taking aStringas a parameter. Otherwise it returns this.- Returns:
Throwable
-
valueOf
Create RemoteException from attributes.- Parameters:
attrs- may not be null.- Returns:
- RemoteException.
-
toString
-