.computeBytesSize(4, getErrorIdBytes()); .computeBytesSize(5, getErrorMessageBytes()); size += 1 * getAuthenticationMechanismsList().size(); .computeInt32Size(10, maxWrappedSize_); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size;
public Builder mergeFrom(org.apache.drill.exec.proto.UserProtos.BitToUserHandshake other) { if (other == org.apache.drill.exec.proto.UserProtos.BitToUserHandshake.getDefaultInstance()) return this; if (other.hasRpcVersion()) { setRpcVersion(other.getRpcVersion()); if (other.hasStatus()) { setStatus(other.getStatus()); if (other.hasErrorId()) { bitField0_ |= 0x00000004; errorId_ = other.errorId_; onChanged(); if (other.hasErrorMessage()) { bitField0_ |= 0x00000008; errorMessage_ = other.errorMessage_; onChanged(); if (other.hasServerInfos()) { mergeServerInfos(other.getServerInfos()); if (other.hasEncrypted()) { setEncrypted(other.getEncrypted()); if (other.hasMaxWrappedSize()) { setMaxWrappedSize(other.getMaxWrappedSize()); this.mergeUnknownFields(other.getUnknownFields()); return this;
.computeBytesSize(4, getErrorIdBytes()); .computeBytesSize(5, getErrorMessageBytes()); size += 1 * getAuthenticationMechanismsList().size(); .computeInt32Size(10, maxWrappedSize_); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size;
public Builder mergeFrom(org.apache.drill.exec.proto.UserProtos.BitToUserHandshake other) { if (other == org.apache.drill.exec.proto.UserProtos.BitToUserHandshake.getDefaultInstance()) return this; if (other.hasRpcVersion()) { setRpcVersion(other.getRpcVersion()); if (other.hasStatus()) { setStatus(other.getStatus()); if (other.hasErrorId()) { bitField0_ |= 0x00000004; errorId_ = other.errorId_; onChanged(); if (other.hasErrorMessage()) { bitField0_ |= 0x00000008; errorMessage_ = other.errorMessage_; onChanged(); if (other.hasServerInfos()) { mergeServerInfos(other.getServerInfos()); if (other.hasEncrypted()) { setEncrypted(other.getEncrypted()); if (other.hasMaxWrappedSize()) { setMaxWrappedSize(other.getMaxWrappedSize()); this.mergeUnknownFields(other.getUnknownFields()); return this;
return Ack.getDefaultInstance(); case RpcType.HANDSHAKE_VALUE: return BitToUserHandshake.getDefaultInstance(); case RpcType.QUERY_HANDLE_VALUE: return QueryId.getDefaultInstance();
if (inbound.hasServerInfos()) { serverInfos = inbound.getServerInfos(); supportedMethods = Sets.immutableEnumSet(inbound.getSupportedMethodsList()); switch (inbound.getStatus()) { case SUCCESS: break; case AUTH_REQUIRED: serverAuthMechanisms = ImmutableList.copyOf(inbound.getAuthenticationMechanismsList()); setAuthComplete(false); connection.setEncryption(inbound.hasEncrypted() && inbound.getEncrypted()); if (inbound.hasMaxWrappedSize()) { connection.setMaxWrappedSize(inbound.getMaxWrappedSize()); case UNKNOWN_FAILURE: final String errMsg = String .format("Status: %s, Error Id: %s, Error message: %s", inbound.getStatus(), inbound.getErrorId(), inbound.getErrorMessage()); logger.error(errMsg); throw new NonTransientRpcException(errMsg);
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 org.apache.drill.exec.proto.UserProtos.BitToUserHandshake getDefaultInstanceForType() { return org.apache.drill.exec.proto.UserProtos.BitToUserHandshake.getDefaultInstance(); }
/** * <code>optional string errorMessage = 5;</code> */ public Builder clearErrorMessage() { bitField0_ = (bitField0_ & ~0x00000008); errorMessage_ = getDefaultInstance().getErrorMessage(); onChanged(); return this; } /**
/** * <code>optional string errorId = 4;</code> */ public Builder clearErrorId() { bitField0_ = (bitField0_ & ~0x00000004); errorId_ = getDefaultInstance().getErrorId(); onChanged(); return this; } /**
@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()); } }
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 org.apache.drill.exec.proto.UserProtos.BitToUserHandshake getDefaultInstanceForType() { return org.apache.drill.exec.proto.UserProtos.BitToUserHandshake.getDefaultInstance(); }
/** * <code>optional string errorMessage = 5;</code> */ public Builder clearErrorMessage() { bitField0_ = (bitField0_ & ~0x00000008); errorMessage_ = getDefaultInstance().getErrorMessage(); onChanged(); return this; } /**
/** * <code>optional string errorId = 4;</code> */ public Builder clearErrorId() { bitField0_ = (bitField0_ & ~0x00000004); errorId_ = getDefaultInstance().getErrorId(); onChanged(); return this; } /**