Class RemoteException

All Implemented Interfaces:
Serializable

public class RemoteException extends IOException
See Also:
  • Constructor Details

    • RemoteException

      public RemoteException(String className, String msg)
      Parameters:
      className - wrapped exception, may be null
      msg - 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 null
      msg - may be null
      erCode - may be null
  • Method Details

    • getClassName

      public String 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

      public IOException unwrapRemoteException(Class<?>... lookupTypes)
      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

      public IOException unwrapRemoteException()
      Instantiate and return the exception wrapped up by this remote exception.

      This unwraps any Throwable that has a constructor taking a String as a parameter. Otherwise it returns this.

      Returns:
      Throwable
    • valueOf

      public static RemoteException valueOf(Attributes attrs)
      Create RemoteException from attributes.
      Parameters:
      attrs - may not be null.
      Returns:
      RemoteException.
    • toString

      public String toString()
      Overrides:
      toString in class Throwable