Class RPCUtil

java.lang.Object
org.apache.hadoop.yarn.ipc.RPCUtil

@LimitedPrivate({"MapReduce","YARN"}) public class RPCUtil extends Object
  • Constructor Details

    • RPCUtil

      public RPCUtil()
  • Method Details

    • getRemoteException

      public static org.apache.hadoop.yarn.exceptions.YarnException getRemoteException(Throwable t)
      Returns an instance of YarnException.
      Parameters:
      t - instance of Throwable.
      Returns:
      instance of YarnException.
    • getRemoteException

      public static org.apache.hadoop.yarn.exceptions.YarnException getRemoteException(String message)
      Returns an instance of YarnException.
      Parameters:
      message - yarn exception message.
      Returns:
      instance of YarnException.
    • unwrapAndThrowException

      public static Void unwrapAndThrowException(org.apache.hadoop.thirdparty.protobuf.ServiceException se) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
      Utility method that unwraps and returns appropriate exceptions.
      Parameters:
      se - ServiceException
      Returns:
      An instance of the actual exception, which will be a subclass of YarnException or IOException
      Throws:
      IOException - io error occur.
      org.apache.hadoop.yarn.exceptions.YarnException - exceptions from yarn servers.