new ProtoSpecificRequestWritable(rpcRequest), remoteId);
} catch (Exception e) {
throw new ServiceException(e);
}
ProtoSpecificRpcResponse response = val.message;
if (LOG.isDebugEnabled()) {
long callTime = System.currentTimeMillis() - startTime;
LOG.debug("Call: " + method.getName() + " " + callTime);
}
if (response.hasIsError() && response.getIsError() == true) {
YarnRemoteExceptionPBImpl exception = new YarnRemoteExceptionPBImpl(response.getException());
exception.fillInStackTrace();
ServiceException se = new ServiceException(exception);
throw se;
}
Message prototype = null;
try {
prototype = getReturnProtoType(method);
} catch (Exception e) {
throw new ServiceException(e);
}
Message actualReturnMessage = prototype.newBuilderForType()
.mergeFrom(response.getResponseProto()).build();
return actualReturnMessage;
}