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 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 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(); }
/** * <code>repeated string authenticationMechanisms = 2;</code> */ public Builder addAuthenticationMechanisms( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAuthenticationMechanismsIsMutable(); authenticationMechanisms_.add(value); onChanged(); return this; } /**
private static Builder create() { return new Builder(); }
private Builder() { maybeForceBuilderInitialization(); }
public Builder clone() { return create().mergeFrom(buildPartial()); }
/** * <code>repeated string authenticationMechanisms = 2;</code> */ public Builder addAuthenticationMechanismsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureAuthenticationMechanismsIsMutable(); authenticationMechanisms_.add(value); onChanged(); return this; }
/** * <code>repeated string authenticationMechanisms = 2;</code> */ public Builder setAuthenticationMechanisms( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAuthenticationMechanismsIsMutable(); authenticationMechanisms_.set(index, value); onChanged(); return this; } /**
/** * <code>repeated string authenticationMechanisms = 2;</code> */ public Builder addAllAuthenticationMechanisms( java.lang.Iterable<java.lang.String> values) { ensureAuthenticationMechanismsIsMutable(); super.addAll(values, authenticationMechanisms_); onChanged(); return this; } /**
public boolean isInitialized(org.apache.drill.exec.proto.BitData.BitServerHandshake.Builder builder) { return builder.isInitialized(); } public org.apache.drill.exec.proto.BitData.BitServerHandshake.Builder newMessage()
private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() {
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
public org.apache.drill.exec.proto.BitData.BitServerHandshake build() { org.apache.drill.exec.proto.BitData.BitServerHandshake result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
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)
private Builder() { maybeForceBuilderInitialization(); }
private static Builder create() { return new Builder(); }
/** * <code>repeated string authenticationMechanisms = 2;</code> */ public Builder addAuthenticationMechanisms( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAuthenticationMechanismsIsMutable(); authenticationMechanisms_.add(value); onChanged(); return this; } /**
public Builder clone() { return create().mergeFrom(buildPartial()); }