setStatus(other.getStatus());
@Override protected void consumeHandshake(ChannelHandlerContext ctx, UserToBitHandshake inbound) throws Exception { BitToUserHandshake handshakeResp = getHandshakeResponse(inbound); OutboundRpcMessage msg = new OutboundRpcMessage(RpcMode.RESPONSE, this.handshakeType, coordinationId, handshakeResp); ctx.writeAndFlush(msg); if (handshakeResp.getStatus() != HandshakeStatus.SUCCESS && handshakeResp.getStatus() != HandshakeStatus.AUTH_REQUIRED) { // If handling handshake results in an error, throw an exception to terminate the connection. throw new RpcException("Handshake request failed: " + handshakeResp.getErrorMessage()); } }
setStatus(other.getStatus());
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserProtos.BitToUserHandshake message) throws java.io.IOException { if(message.hasRpcVersion()) output.writeInt32(2, message.getRpcVersion(), false); if(message.hasStatus()) output.writeEnum(3, message.getStatus().getNumber(), false); if(message.hasErrorId()) output.writeString(4, message.getErrorId(), false); if(message.hasErrorMessage()) output.writeString(5, message.getErrorMessage(), false); if(message.hasServerInfos()) output.writeObject(6, message.getServerInfos(), org.apache.drill.exec.proto.SchemaUserProtos.RpcEndpointInfos.WRITE, false); for(String authenticationMechanisms : message.getAuthenticationMechanismsList()) output.writeString(7, authenticationMechanisms, true); for(org.apache.drill.exec.proto.UserProtos.RpcType supportedMethods : message.getSupportedMethodsList()) output.writeEnum(8, supportedMethods.getNumber(), true); if(message.hasEncrypted()) output.writeBool(9, message.getEncrypted(), false); if(message.hasMaxWrappedSize()) output.writeInt32(10, message.getMaxWrappedSize(), false); } public boolean isInitialized(org.apache.drill.exec.proto.UserProtos.BitToUserHandshake message)
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserProtos.BitToUserHandshake message) throws java.io.IOException { if(message.hasRpcVersion()) output.writeInt32(2, message.getRpcVersion(), false); if(message.hasStatus()) output.writeEnum(3, message.getStatus().getNumber(), false); if(message.hasErrorId()) output.writeString(4, message.getErrorId(), false); if(message.hasErrorMessage()) output.writeString(5, message.getErrorMessage(), false); if(message.hasServerInfos()) output.writeObject(6, message.getServerInfos(), org.apache.drill.exec.proto.SchemaUserProtos.RpcEndpointInfos.WRITE, false); for(String authenticationMechanisms : message.getAuthenticationMechanismsList()) output.writeString(7, authenticationMechanisms, true); for(org.apache.drill.exec.proto.UserProtos.RpcType supportedMethods : message.getSupportedMethodsList()) output.writeEnum(8, supportedMethods.getNumber(), true); if(message.hasEncrypted()) output.writeBool(9, message.getEncrypted(), false); if(message.hasMaxWrappedSize()) output.writeInt32(10, message.getMaxWrappedSize(), false); } public boolean isInitialized(org.apache.drill.exec.proto.UserProtos.BitToUserHandshake message)