public Builder mergeFrom(org.apache.drill.exec.proto.BitData.BitServerHandshake other) { if (other == org.apache.drill.exec.proto.BitData.BitServerHandshake.getDefaultInstance()) return this; if (other.hasRpcVersion()) { setRpcVersion(other.getRpcVersion()); } if (!other.authenticationMechanisms_.isEmpty()) { if (authenticationMechanisms_.isEmpty()) { authenticationMechanisms_ = other.authenticationMechanisms_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureAuthenticationMechanismsIsMutable(); authenticationMechanisms_.addAll(other.authenticationMechanisms_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.drill.exec.proto.BitData.BitServerHandshake other) { if (other == org.apache.drill.exec.proto.BitData.BitServerHandshake.getDefaultInstance()) return this; if (other.hasRpcVersion()) { setRpcVersion(other.getRpcVersion()); } if (!other.authenticationMechanisms_.isEmpty()) { if (authenticationMechanisms_.isEmpty()) { authenticationMechanisms_ = other.authenticationMechanisms_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureAuthenticationMechanismsIsMutable(); authenticationMechanisms_.addAll(other.authenticationMechanisms_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
@Override public MessageLite getHandshakeResponse(BitClientHandshake inbound) throws Exception { // logger.debug("Handling handshake from other bit. {}", inbound); if (inbound.getRpcVersion() != DataRpcConfig.RPC_VERSION) { throw new RpcException(String.format("Invalid rpc version. Expected %d, actual %d.", inbound.getRpcVersion(), DataRpcConfig.RPC_VERSION)); } if (inbound.getChannel() != RpcChannel.BIT_DATA) { throw new RpcException(String.format("Invalid NodeMode. Expected BIT_DATA but received %s.", inbound.getChannel())); } final BitServerHandshake.Builder builder = BitServerHandshake.newBuilder(); builder.setRpcVersion(DataRpcConfig.RPC_VERSION); if (config.getAuthMechanismToUse() != null) { builder.addAllAuthenticationMechanisms(config.getAuthProvider().getAllFactoryNames()); } return builder.build(); }
public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.BitData.BitServerHandshake.Builder builder) throws java.io.IOException { for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this)) { switch(number) { case 0: return; case 1: builder.setRpcVersion(input.readInt32()); break; case 2: builder.addAuthenticationMechanisms(input.readString()); break; default: input.handleUnknownField(number, this); } } } public boolean isInitialized(org.apache.drill.exec.proto.BitData.BitServerHandshake.Builder builder)
public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.BitData.BitServerHandshake.Builder builder) throws java.io.IOException { for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this)) { switch(number) { case 0: return; case 1: builder.setRpcVersion(input.readInt32()); break; case 2: builder.addAuthenticationMechanisms(input.readString()); break; default: input.handleUnknownField(number, this); } } } public boolean isInitialized(org.apache.drill.exec.proto.BitData.BitServerHandshake.Builder builder)