final RpcWritable.Buffer buffer = RpcWritable.Buffer.wrap(bb); final RpcRequestHeaderProto header = getMessage(RpcRequestHeaderProto.getDefaultInstance(), buffer); callId = header.getCallId(); retry = header.getRetryCount();
"Connection context already processed"); connectionContext = getMessage(IpcConnectionContextProto.getDefaultInstance(), buffer); protocolName = connectionContext.hasProtocol() ? connectionContext .getProtocol() : null;
private void saslReadAndProcess(RpcWritable.Buffer buffer) throws RpcServerException, IOException, InterruptedException { final RpcSaslProto saslMessage = getMessage(RpcSaslProto.getDefaultInstance(), buffer); switch (saslMessage.getState()) { case WRAP: { if (!saslContextEstablished || !useWrap) { throw new FatalRpcServerException( RpcErrorCodeProto.FATAL_INVALID_RPC_HEADER, new SaslException("Server is not wrapping data")); } // loops over decoded data and calls processOneRpc unwrapPacketAndProcessRpcs(saslMessage.getToken().toByteArray()); break; } default: saslProcess(saslMessage); } }
final RpcWritable.Buffer buffer = RpcWritable.Buffer.wrap(bb); final RpcRequestHeaderProto header = getMessage(RpcRequestHeaderProto.getDefaultInstance(), buffer); callId = header.getCallId(); retry = header.getRetryCount();
"Connection context already processed"); connectionContext = getMessage(IpcConnectionContextProto.getDefaultInstance(), buffer); protocolName = connectionContext.hasProtocol() ? connectionContext .getProtocol() : null;
private void saslReadAndProcess(RpcWritable.Buffer buffer) throws RpcServerException, IOException, InterruptedException { final RpcSaslProto saslMessage = getMessage(RpcSaslProto.getDefaultInstance(), buffer); switch (saslMessage.getState()) { case WRAP: { if (!saslContextEstablished || !useWrap) { throw new FatalRpcServerException( RpcErrorCodeProto.FATAL_INVALID_RPC_HEADER, new SaslException("Server is not wrapping data")); } // loops over decoded data and calls processOneRpc unwrapPacketAndProcessRpcs(saslMessage.getToken().toByteArray()); break; } default: saslProcess(saslMessage); } }