Example usage for org.apache.hadoop.yarn.ipc RPCUtil unwrapAndThrowException

List of usage examples for org.apache.hadoop.yarn.ipc RPCUtil unwrapAndThrowException

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.ipc RPCUtil unwrapAndThrowException.

Prototype

public static Void unwrapAndThrowException(ServiceException se) throws IOException, YarnException 

Source Link

Document

Utility method that unwraps and returns appropriate exceptions.

Usage

From source file:com.github.hdl.tensorflow.yarn.app.api.impl.pb.client.TensorFlowClusterPBClientImpl.java

License:Apache License

@Override
public GetClusterSpecResponse getClusterSpec(GetClusterSpecRequest request) throws YarnException, IOException {
    GetClusterSpecRequestProto requestProto = ((GetClusterSpecRequestPBImpl) request).getProto();
    try {/*from ww  w  . j a  v  a 2s . c o m*/
        return new GetClusterSpecResponsePBImpl(proxy.getClusterSpec(null, requestProto));
    } catch (ServiceException e) {
        RPCUtil.unwrapAndThrowException(e);
        return null;
    }
}

From source file:io.hops.util.impl.pb.client.GroupMembershipPBClientImpl.java

License:Apache License

@Override
public LiveRMsResponse getLiveRMList() throws IOException, YarnException {
    ActiveRMListRequestProto requestProto = ActiveRMListRequestProto.getDefaultInstance();
    try {/*from www . jav a 2 s .co  m*/
        return new LiveRMsResponsePBImpl(proxy.getLiveRMList(null, requestProto));
    } catch (ServiceException e) {
        RPCUtil.unwrapAndThrowException(e);
        return null;
    }
}