Example usage for org.apache.hadoop.ipc ProtobufHelper getRemoteException

List of usage examples for org.apache.hadoop.ipc ProtobufHelper getRemoteException

Introduction

In this page you can find the example usage for org.apache.hadoop.ipc ProtobufHelper getRemoteException.

Prototype

public static IOException getRemoteException(ServiceException se) 

Source Link

Document

Return the IOException thrown by the remote server wrapped in ServiceException as cause.

Usage

From source file:com.intel.hadoopRPCBenchmark.protocol.BenchmarkEngineProtocolClientSideTranslatorPB.java

License:Apache License

public void ping(byte[] payload) throws IOException {
    PingRequestProto.Builder builder = PingRequestProto.newBuilder().setPayload(ByteString.copyFrom(payload));
    try {/*from  www  .  ja va 2s.c o  m*/
        rpcProxy.ping(NULL_CONTROLLER, builder.build());
    } catch (ServiceException se) {
        throw ProtobufHelper.getRemoteException(se);
    }
}

From source file:org.apache.hoya.yarn.appmaster.rpc.HoyaClusterProtocolProxy.java

License:Apache License

private IOException convert(ServiceException se) {
    return ProtobufHelper.getRemoteException(se);
}

From source file:org.apache.slider.server.appmaster.rpc.SliderClusterProtocolProxy.java

License:Apache License

private IOException convert(ServiceException se) {
    IOException ioe = ProtobufHelper.getRemoteException(se);
    if (ioe instanceof RemoteException) {
        RemoteException remoteException = (RemoteException) ioe;
        return new RemoteException(remoteException.getClassName(),
                address.toString() + ": " + remoteException.getMessage());
    }//from w  w  w  .j  av  a 2  s  . c  o  m
    return ioe;
}