(processingTime > threeSigma)) { if(LOG.isWarnEnabled()) { String client = CurCall.get().toString(); LOG.warn( "Slow RPC : " + methodName + " took " + processingTime +
@InterfaceStability.Unstable @InterfaceAudience.LimitedPrivate({"HDFS"}) public final void sendResponse() throws IOException { int count = responseWaitCount.decrementAndGet(); assert count >= 0 : "response has already been sent"; if (count == 0) { doResponse(null); } }
/** Returns the remote side ip address when invoked inside an RPC * Returns null incase of an error. */ public static InetAddress getRemoteIp() { Call call = CurCall.get(); return (call != null ) ? call.getHostInetAddress() : null; }
waitingCalls[0].sendResponse(); waitingCalls[1].sendResponse(); try { int val = future1.get(1, TimeUnit.SECONDS); waitingCalls[1].sendResponse(); try { int val = future2.get(1, TimeUnit.SECONDS);
+ call.toString()); buf = new ByteArrayOutputStream(INITIAL_RESP_BUF_SIZE);
+ call.toString()); buf = new ByteArrayOutputStream(INITIAL_RESP_BUF_SIZE); call.sendResponse();
+ call.toString()); buf = new ByteArrayOutputStream(INITIAL_RESP_BUF_SIZE); call.sendResponse();
header.writeDelimitedTo(out); call.setResponse(ByteBuffer.wrap(responseBuf.toByteArray()));
Call call = new Call(header.getCallId(), header.getRetryCount(), rpcRequest, this, ProtoUtil.convert(header.getRpcKind()), header.getClientId().toByteArray(), traceSpan);
wrapWithSasl(responseBuf, call); call.setResponse(ByteBuffer.wrap(responseBuf.toByteArray()));
Call call = new Call(header.getCallId(), header.getRetryCount(), rpcRequest, this, ProtoUtil.convert(header.getRpcKind()), header.getClientId().toByteArray(), traceSpan);
header.writeDelimitedTo(out); call.setResponse(ByteBuffer.wrap(responseBuf.toByteArray()));
WritableUtils.writeString(out, error); call.setResponse(ByteBuffer.wrap(buf.toByteArray())); responder.doRespond(call); } catch (InterruptedException e) {
Call call = new Call(header.getCallId(), header.getRetryCount(), rpcRequest, this, ProtoUtil.convert(header.getRpcKind()), header.getClientId().toByteArray(), traceSpan);
final Call call = new Call(callId, retry, null, this); setupResponse(authFailedResponse, call, RpcStatusProto.FATAL, wrse.getRpcErrorCodeProto(), null, ioe.getClass().getName(), ioe.getMessage()); call.sendResponse(); throw wrse;
Call fakeCall = new Call(-1, RpcConstants.INVALID_RETRY_COUNT, null, this); setupResponse(buffer, fakeCall, RpcStatusProto.FATAL, RpcErrorCodeProto.FATAL_VERSION_MISMATCH, null, VersionMismatch.class.getName(), errMsg); fakeCall.sendResponse(); } else if (clientVersion >= 3) { Call fakeCall = new Call(-1, RpcConstants.INVALID_RETRY_COUNT, null, this); null, VersionMismatch.class.getName(), errMsg); fakeCall.sendResponse(); } else if (clientVersion == 2) { // Hadoop 0.18.3 Call fakeCall = new Call(0, RpcConstants.INVALID_RETRY_COUNT, null, this); DataOutputStream out = new DataOutputStream(buffer); WritableUtils.writeString(out, VersionMismatch.class.getName()); WritableUtils.writeString(out, errMsg); fakeCall.setResponse(ByteBuffer.wrap(buffer.toByteArray())); fakeCall.sendResponse();
Call fakeCall = new Call(-1, RpcConstants.INVALID_RETRY_COUNT, null, this); setupResponse(buffer, fakeCall, RpcStatusProto.FATAL, RpcErrorCodeProto.FATAL_VERSION_MISMATCH, null, VersionMismatch.class.getName(), errMsg); fakeCall.sendResponse(); } else if (clientVersion >= 3) { Call fakeCall = new Call(-1, RpcConstants.INVALID_RETRY_COUNT, null, this); null, VersionMismatch.class.getName(), errMsg); fakeCall.sendResponse(); } else if (clientVersion == 2) { // Hadoop 0.18.3 Call fakeCall = new Call(0, RpcConstants.INVALID_RETRY_COUNT, null, this); DataOutputStream out = new DataOutputStream(buffer); WritableUtils.writeString(out, VersionMismatch.class.getName()); WritableUtils.writeString(out, errMsg); fakeCall.setResponse(ByteBuffer.wrap(buffer.toByteArray())); fakeCall.sendResponse();
final Call call = new Call(callId, retry, null, this); setupResponse(authFailedResponse, call, RpcStatusProto.FATAL, wrse.getRpcErrorCodeProto(), null,
final Call call = new Call(callId, retry, null, this); setupResponse(authFailedResponse, call, RpcStatusProto.FATAL, wrse.getRpcErrorCodeProto(), null, ioe.getClass().getName(), ioe.getMessage()); call.sendResponse(); throw wrse;