public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, rpcVersion_); } { int dataSize = 0; for (int i = 0; i < authenticationMechanisms_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(authenticationMechanisms_.getByteString(i)); } size += dataSize; size += 1 * getAuthenticationMechanismsList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
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 writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, rpcVersion_); } for (int i = 0; i < authenticationMechanisms_.size(); i++) { output.writeBytes(2, authenticationMechanisms_.getByteString(i)); } getUnknownFields().writeTo(output); }
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, rpcVersion_); } { int dataSize = 0; for (int i = 0; i < authenticationMechanisms_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(authenticationMechanisms_.getByteString(i)); } size += dataSize; size += 1 * getAuthenticationMechanismsList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
@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 org.apache.drill.exec.proto.BitData.BitServerHandshake buildPartial() { org.apache.drill.exec.proto.BitData.BitServerHandshake result = new org.apache.drill.exec.proto.BitData.BitServerHandshake(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.rpcVersion_ = rpcVersion_; if (((bitField0_ & 0x00000002) == 0x00000002)) { authenticationMechanisms_ = new com.google.protobuf.UnmodifiableLazyStringList( authenticationMechanisms_); bitField0_ = (bitField0_ & ~0x00000002); } result.authenticationMechanisms_ = authenticationMechanisms_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
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 newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.drill.exec.proto.BitData.BitServerHandshake prototype) {
public Builder toBuilder() { return newBuilder(this); }
public static Builder newBuilder(org.apache.drill.exec.proto.BitData.BitServerHandshake prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public org.apache.drill.exec.proto.BitData.BitServerHandshake getDefaultInstanceForType() { return org.apache.drill.exec.proto.BitData.BitServerHandshake.getDefaultInstance(); }
public boolean isInitialized(org.apache.drill.exec.proto.BitData.BitServerHandshake message) { return message.isInitialized(); } public java.lang.String getFieldName(int number)
public static MessageLite getResponseDefaultInstanceClient(int rpcType) throws RpcException { switch (rpcType) { case RpcType.ACK_VALUE: return Ack.getDefaultInstance(); case RpcType.HANDSHAKE_VALUE: return BitServerHandshake.getDefaultInstance(); case RpcType.SASL_MESSAGE_VALUE: return SaslMessage.getDefaultInstance(); default: throw new UnsupportedOperationException(); } }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, rpcVersion_); } for (int i = 0; i < authenticationMechanisms_.size(); i++) { output.writeBytes(2, authenticationMechanisms_.getByteString(i)); } getUnknownFields().writeTo(output); }
@Override protected List<String> validateHandshake(BitServerHandshake handshake) throws RpcException { return BitRpcUtility.validateHandshake(handshake.getRpcVersion(), handshake.getAuthenticationMechanismsList(), DataRpcConfig.RPC_VERSION, connection, config, this); }
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.BitData.BitServerHandshake message) throws java.io.IOException { if(message.hasRpcVersion()) output.writeInt32(1, message.getRpcVersion(), false); for(String authenticationMechanisms : message.getAuthenticationMechanismsList()) output.writeString(2, authenticationMechanisms, true); } public boolean isInitialized(org.apache.drill.exec.proto.BitData.BitServerHandshake message)
public org.apache.drill.exec.proto.BitData.BitServerHandshake.Builder newMessage() { return org.apache.drill.exec.proto.BitData.BitServerHandshake.newBuilder(); } public java.lang.String getFieldName(int number)
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; }
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();