All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.drill.exec.proto.CoordinationProtos Maven / Gradle / Ivy

The newest version!
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: Coordination.proto

package org.apache.drill.exec.proto;

public final class CoordinationProtos {
  private CoordinationProtos() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface DrillbitEndpointOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // optional string address = 1;
    /**
     * optional string address = 1;
     */
    boolean hasAddress();
    /**
     * optional string address = 1;
     */
    java.lang.String getAddress();
    /**
     * optional string address = 1;
     */
    com.google.protobuf.ByteString
        getAddressBytes();

    // optional int32 user_port = 2;
    /**
     * optional int32 user_port = 2;
     */
    boolean hasUserPort();
    /**
     * optional int32 user_port = 2;
     */
    int getUserPort();

    // optional int32 control_port = 3;
    /**
     * optional int32 control_port = 3;
     */
    boolean hasControlPort();
    /**
     * optional int32 control_port = 3;
     */
    int getControlPort();

    // optional int32 data_port = 4;
    /**
     * optional int32 data_port = 4;
     */
    boolean hasDataPort();
    /**
     * optional int32 data_port = 4;
     */
    int getDataPort();

    // optional .exec.Roles roles = 5;
    /**
     * optional .exec.Roles roles = 5;
     */
    boolean hasRoles();
    /**
     * optional .exec.Roles roles = 5;
     */
    org.apache.drill.exec.proto.CoordinationProtos.Roles getRoles();
    /**
     * optional .exec.Roles roles = 5;
     */
    org.apache.drill.exec.proto.CoordinationProtos.RolesOrBuilder getRolesOrBuilder();
  }
  /**
   * Protobuf type {@code exec.DrillbitEndpoint}
   */
  public static final class DrillbitEndpoint extends
      com.google.protobuf.GeneratedMessage
      implements DrillbitEndpointOrBuilder {
    // Use DrillbitEndpoint.newBuilder() to construct.
    private DrillbitEndpoint(com.google.protobuf.GeneratedMessage.Builder builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private DrillbitEndpoint(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final DrillbitEndpoint defaultInstance;
    public static DrillbitEndpoint getDefaultInstance() {
      return defaultInstance;
    }

    public DrillbitEndpoint getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private DrillbitEndpoint(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              address_ = input.readBytes();
              break;
            }
            case 16: {
              bitField0_ |= 0x00000002;
              userPort_ = input.readInt32();
              break;
            }
            case 24: {
              bitField0_ |= 0x00000004;
              controlPort_ = input.readInt32();
              break;
            }
            case 32: {
              bitField0_ |= 0x00000008;
              dataPort_ = input.readInt32();
              break;
            }
            case 42: {
              org.apache.drill.exec.proto.CoordinationProtos.Roles.Builder subBuilder = null;
              if (((bitField0_ & 0x00000010) == 0x00000010)) {
                subBuilder = roles_.toBuilder();
              }
              roles_ = input.readMessage(org.apache.drill.exec.proto.CoordinationProtos.Roles.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(roles_);
                roles_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000010;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_DrillbitEndpoint_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_DrillbitEndpoint_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.class, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder.class);
    }

    public static com.google.protobuf.Parser PARSER =
        new com.google.protobuf.AbstractParser() {
      public DrillbitEndpoint parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new DrillbitEndpoint(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    // optional string address = 1;
    public static final int ADDRESS_FIELD_NUMBER = 1;
    private java.lang.Object address_;
    /**
     * optional string address = 1;
     */
    public boolean hasAddress() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * optional string address = 1;
     */
    public java.lang.String getAddress() {
      java.lang.Object ref = address_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (bs.isValidUtf8()) {
          address_ = s;
        }
        return s;
      }
    }
    /**
     * optional string address = 1;
     */
    public com.google.protobuf.ByteString
        getAddressBytes() {
      java.lang.Object ref = address_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        address_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    // optional int32 user_port = 2;
    public static final int USER_PORT_FIELD_NUMBER = 2;
    private int userPort_;
    /**
     * optional int32 user_port = 2;
     */
    public boolean hasUserPort() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * optional int32 user_port = 2;
     */
    public int getUserPort() {
      return userPort_;
    }

    // optional int32 control_port = 3;
    public static final int CONTROL_PORT_FIELD_NUMBER = 3;
    private int controlPort_;
    /**
     * optional int32 control_port = 3;
     */
    public boolean hasControlPort() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * optional int32 control_port = 3;
     */
    public int getControlPort() {
      return controlPort_;
    }

    // optional int32 data_port = 4;
    public static final int DATA_PORT_FIELD_NUMBER = 4;
    private int dataPort_;
    /**
     * optional int32 data_port = 4;
     */
    public boolean hasDataPort() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    /**
     * optional int32 data_port = 4;
     */
    public int getDataPort() {
      return dataPort_;
    }

    // optional .exec.Roles roles = 5;
    public static final int ROLES_FIELD_NUMBER = 5;
    private org.apache.drill.exec.proto.CoordinationProtos.Roles roles_;
    /**
     * optional .exec.Roles roles = 5;
     */
    public boolean hasRoles() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    /**
     * optional .exec.Roles roles = 5;
     */
    public org.apache.drill.exec.proto.CoordinationProtos.Roles getRoles() {
      return roles_;
    }
    /**
     * optional .exec.Roles roles = 5;
     */
    public org.apache.drill.exec.proto.CoordinationProtos.RolesOrBuilder getRolesOrBuilder() {
      return roles_;
    }

    private void initFields() {
      address_ = "";
      userPort_ = 0;
      controlPort_ = 0;
      dataPort_ = 0;
      roles_ = org.apache.drill.exec.proto.CoordinationProtos.Roles.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, getAddressBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeInt32(2, userPort_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeInt32(3, controlPort_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeInt32(4, dataPort_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeMessage(5, roles_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, getAddressBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(2, userPort_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(3, controlPort_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(4, dataPort_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, roles_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code exec.DrillbitEndpoint}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder
       implements org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_DrillbitEndpoint_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_DrillbitEndpoint_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.class, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder.class);
      }

      // Construct using org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getRolesFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        address_ = "";
        bitField0_ = (bitField0_ & ~0x00000001);
        userPort_ = 0;
        bitField0_ = (bitField0_ & ~0x00000002);
        controlPort_ = 0;
        bitField0_ = (bitField0_ & ~0x00000004);
        dataPort_ = 0;
        bitField0_ = (bitField0_ & ~0x00000008);
        if (rolesBuilder_ == null) {
          roles_ = org.apache.drill.exec.proto.CoordinationProtos.Roles.getDefaultInstance();
        } else {
          rolesBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000010);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_DrillbitEndpoint_descriptor;
      }

      public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint getDefaultInstanceForType() {
        return org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance();
      }

      public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint build() {
        org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint buildPartial() {
        org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint result = new org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.address_ = address_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.userPort_ = userPort_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.controlPort_ = controlPort_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.dataPort_ = dataPort_;
        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
          to_bitField0_ |= 0x00000010;
        }
        if (rolesBuilder_ == null) {
          result.roles_ = roles_;
        } else {
          result.roles_ = rolesBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint) {
          return mergeFrom((org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint other) {
        if (other == org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance()) return this;
        if (other.hasAddress()) {
          bitField0_ |= 0x00000001;
          address_ = other.address_;
          onChanged();
        }
        if (other.hasUserPort()) {
          setUserPort(other.getUserPort());
        }
        if (other.hasControlPort()) {
          setControlPort(other.getControlPort());
        }
        if (other.hasDataPort()) {
          setDataPort(other.getDataPort());
        }
        if (other.hasRoles()) {
          mergeRoles(other.getRoles());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      // optional string address = 1;
      private java.lang.Object address_ = "";
      /**
       * optional string address = 1;
       */
      public boolean hasAddress() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * optional string address = 1;
       */
      public java.lang.String getAddress() {
        java.lang.Object ref = address_;
        if (!(ref instanceof java.lang.String)) {
          java.lang.String s = ((com.google.protobuf.ByteString) ref)
              .toStringUtf8();
          address_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * optional string address = 1;
       */
      public com.google.protobuf.ByteString
          getAddressBytes() {
        java.lang.Object ref = address_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          address_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * optional string address = 1;
       */
      public Builder setAddress(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        address_ = value;
        onChanged();
        return this;
      }
      /**
       * optional string address = 1;
       */
      public Builder clearAddress() {
        bitField0_ = (bitField0_ & ~0x00000001);
        address_ = getDefaultInstance().getAddress();
        onChanged();
        return this;
      }
      /**
       * optional string address = 1;
       */
      public Builder setAddressBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        address_ = value;
        onChanged();
        return this;
      }

      // optional int32 user_port = 2;
      private int userPort_ ;
      /**
       * optional int32 user_port = 2;
       */
      public boolean hasUserPort() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * optional int32 user_port = 2;
       */
      public int getUserPort() {
        return userPort_;
      }
      /**
       * optional int32 user_port = 2;
       */
      public Builder setUserPort(int value) {
        bitField0_ |= 0x00000002;
        userPort_ = value;
        onChanged();
        return this;
      }
      /**
       * optional int32 user_port = 2;
       */
      public Builder clearUserPort() {
        bitField0_ = (bitField0_ & ~0x00000002);
        userPort_ = 0;
        onChanged();
        return this;
      }

      // optional int32 control_port = 3;
      private int controlPort_ ;
      /**
       * optional int32 control_port = 3;
       */
      public boolean hasControlPort() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * optional int32 control_port = 3;
       */
      public int getControlPort() {
        return controlPort_;
      }
      /**
       * optional int32 control_port = 3;
       */
      public Builder setControlPort(int value) {
        bitField0_ |= 0x00000004;
        controlPort_ = value;
        onChanged();
        return this;
      }
      /**
       * optional int32 control_port = 3;
       */
      public Builder clearControlPort() {
        bitField0_ = (bitField0_ & ~0x00000004);
        controlPort_ = 0;
        onChanged();
        return this;
      }

      // optional int32 data_port = 4;
      private int dataPort_ ;
      /**
       * optional int32 data_port = 4;
       */
      public boolean hasDataPort() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      /**
       * optional int32 data_port = 4;
       */
      public int getDataPort() {
        return dataPort_;
      }
      /**
       * optional int32 data_port = 4;
       */
      public Builder setDataPort(int value) {
        bitField0_ |= 0x00000008;
        dataPort_ = value;
        onChanged();
        return this;
      }
      /**
       * optional int32 data_port = 4;
       */
      public Builder clearDataPort() {
        bitField0_ = (bitField0_ & ~0x00000008);
        dataPort_ = 0;
        onChanged();
        return this;
      }

      // optional .exec.Roles roles = 5;
      private org.apache.drill.exec.proto.CoordinationProtos.Roles roles_ = org.apache.drill.exec.proto.CoordinationProtos.Roles.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.drill.exec.proto.CoordinationProtos.Roles, org.apache.drill.exec.proto.CoordinationProtos.Roles.Builder, org.apache.drill.exec.proto.CoordinationProtos.RolesOrBuilder> rolesBuilder_;
      /**
       * optional .exec.Roles roles = 5;
       */
      public boolean hasRoles() {
        return ((bitField0_ & 0x00000010) == 0x00000010);
      }
      /**
       * optional .exec.Roles roles = 5;
       */
      public org.apache.drill.exec.proto.CoordinationProtos.Roles getRoles() {
        if (rolesBuilder_ == null) {
          return roles_;
        } else {
          return rolesBuilder_.getMessage();
        }
      }
      /**
       * optional .exec.Roles roles = 5;
       */
      public Builder setRoles(org.apache.drill.exec.proto.CoordinationProtos.Roles value) {
        if (rolesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          roles_ = value;
          onChanged();
        } else {
          rolesBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000010;
        return this;
      }
      /**
       * optional .exec.Roles roles = 5;
       */
      public Builder setRoles(
          org.apache.drill.exec.proto.CoordinationProtos.Roles.Builder builderForValue) {
        if (rolesBuilder_ == null) {
          roles_ = builderForValue.build();
          onChanged();
        } else {
          rolesBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000010;
        return this;
      }
      /**
       * optional .exec.Roles roles = 5;
       */
      public Builder mergeRoles(org.apache.drill.exec.proto.CoordinationProtos.Roles value) {
        if (rolesBuilder_ == null) {
          if (((bitField0_ & 0x00000010) == 0x00000010) &&
              roles_ != org.apache.drill.exec.proto.CoordinationProtos.Roles.getDefaultInstance()) {
            roles_ =
              org.apache.drill.exec.proto.CoordinationProtos.Roles.newBuilder(roles_).mergeFrom(value).buildPartial();
          } else {
            roles_ = value;
          }
          onChanged();
        } else {
          rolesBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000010;
        return this;
      }
      /**
       * optional .exec.Roles roles = 5;
       */
      public Builder clearRoles() {
        if (rolesBuilder_ == null) {
          roles_ = org.apache.drill.exec.proto.CoordinationProtos.Roles.getDefaultInstance();
          onChanged();
        } else {
          rolesBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000010);
        return this;
      }
      /**
       * optional .exec.Roles roles = 5;
       */
      public org.apache.drill.exec.proto.CoordinationProtos.Roles.Builder getRolesBuilder() {
        bitField0_ |= 0x00000010;
        onChanged();
        return getRolesFieldBuilder().getBuilder();
      }
      /**
       * optional .exec.Roles roles = 5;
       */
      public org.apache.drill.exec.proto.CoordinationProtos.RolesOrBuilder getRolesOrBuilder() {
        if (rolesBuilder_ != null) {
          return rolesBuilder_.getMessageOrBuilder();
        } else {
          return roles_;
        }
      }
      /**
       * optional .exec.Roles roles = 5;
       */
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.drill.exec.proto.CoordinationProtos.Roles, org.apache.drill.exec.proto.CoordinationProtos.Roles.Builder, org.apache.drill.exec.proto.CoordinationProtos.RolesOrBuilder> 
          getRolesFieldBuilder() {
        if (rolesBuilder_ == null) {
          rolesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.drill.exec.proto.CoordinationProtos.Roles, org.apache.drill.exec.proto.CoordinationProtos.Roles.Builder, org.apache.drill.exec.proto.CoordinationProtos.RolesOrBuilder>(
                  roles_,
                  getParentForChildren(),
                  isClean());
          roles_ = null;
        }
        return rolesBuilder_;
      }

      // @@protoc_insertion_point(builder_scope:exec.DrillbitEndpoint)
    }

    static {
      defaultInstance = new DrillbitEndpoint(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:exec.DrillbitEndpoint)
  }

  public interface DrillServiceInstanceOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // optional string id = 1;
    /**
     * optional string id = 1;
     */
    boolean hasId();
    /**
     * optional string id = 1;
     */
    java.lang.String getId();
    /**
     * optional string id = 1;
     */
    com.google.protobuf.ByteString
        getIdBytes();

    // optional int64 registrationTimeUTC = 2;
    /**
     * optional int64 registrationTimeUTC = 2;
     */
    boolean hasRegistrationTimeUTC();
    /**
     * optional int64 registrationTimeUTC = 2;
     */
    long getRegistrationTimeUTC();

    // optional .exec.DrillbitEndpoint endpoint = 3;
    /**
     * optional .exec.DrillbitEndpoint endpoint = 3;
     */
    boolean hasEndpoint();
    /**
     * optional .exec.DrillbitEndpoint endpoint = 3;
     */
    org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint getEndpoint();
    /**
     * optional .exec.DrillbitEndpoint endpoint = 3;
     */
    org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder getEndpointOrBuilder();
  }
  /**
   * Protobuf type {@code exec.DrillServiceInstance}
   */
  public static final class DrillServiceInstance extends
      com.google.protobuf.GeneratedMessage
      implements DrillServiceInstanceOrBuilder {
    // Use DrillServiceInstance.newBuilder() to construct.
    private DrillServiceInstance(com.google.protobuf.GeneratedMessage.Builder builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private DrillServiceInstance(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final DrillServiceInstance defaultInstance;
    public static DrillServiceInstance getDefaultInstance() {
      return defaultInstance;
    }

    public DrillServiceInstance getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private DrillServiceInstance(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              id_ = input.readBytes();
              break;
            }
            case 16: {
              bitField0_ |= 0x00000002;
              registrationTimeUTC_ = input.readInt64();
              break;
            }
            case 26: {
              org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder subBuilder = null;
              if (((bitField0_ & 0x00000004) == 0x00000004)) {
                subBuilder = endpoint_.toBuilder();
              }
              endpoint_ = input.readMessage(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(endpoint_);
                endpoint_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000004;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_DrillServiceInstance_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_DrillServiceInstance_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance.class, org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance.Builder.class);
    }

    public static com.google.protobuf.Parser PARSER =
        new com.google.protobuf.AbstractParser() {
      public DrillServiceInstance parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new DrillServiceInstance(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    // optional string id = 1;
    public static final int ID_FIELD_NUMBER = 1;
    private java.lang.Object id_;
    /**
     * optional string id = 1;
     */
    public boolean hasId() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * optional string id = 1;
     */
    public java.lang.String getId() {
      java.lang.Object ref = id_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (bs.isValidUtf8()) {
          id_ = s;
        }
        return s;
      }
    }
    /**
     * optional string id = 1;
     */
    public com.google.protobuf.ByteString
        getIdBytes() {
      java.lang.Object ref = id_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        id_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    // optional int64 registrationTimeUTC = 2;
    public static final int REGISTRATIONTIMEUTC_FIELD_NUMBER = 2;
    private long registrationTimeUTC_;
    /**
     * optional int64 registrationTimeUTC = 2;
     */
    public boolean hasRegistrationTimeUTC() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * optional int64 registrationTimeUTC = 2;
     */
    public long getRegistrationTimeUTC() {
      return registrationTimeUTC_;
    }

    // optional .exec.DrillbitEndpoint endpoint = 3;
    public static final int ENDPOINT_FIELD_NUMBER = 3;
    private org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint endpoint_;
    /**
     * optional .exec.DrillbitEndpoint endpoint = 3;
     */
    public boolean hasEndpoint() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * optional .exec.DrillbitEndpoint endpoint = 3;
     */
    public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint getEndpoint() {
      return endpoint_;
    }
    /**
     * optional .exec.DrillbitEndpoint endpoint = 3;
     */
    public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder getEndpointOrBuilder() {
      return endpoint_;
    }

    private void initFields() {
      id_ = "";
      registrationTimeUTC_ = 0L;
      endpoint_ = org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, getIdBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeInt64(2, registrationTimeUTC_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeMessage(3, endpoint_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, getIdBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(2, registrationTimeUTC_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, endpoint_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code exec.DrillServiceInstance}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder
       implements org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstanceOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_DrillServiceInstance_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_DrillServiceInstance_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance.class, org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance.Builder.class);
      }

      // Construct using org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getEndpointFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        id_ = "";
        bitField0_ = (bitField0_ & ~0x00000001);
        registrationTimeUTC_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000002);
        if (endpointBuilder_ == null) {
          endpoint_ = org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance();
        } else {
          endpointBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_DrillServiceInstance_descriptor;
      }

      public org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance getDefaultInstanceForType() {
        return org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance.getDefaultInstance();
      }

      public org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance build() {
        org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance buildPartial() {
        org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance result = new org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.id_ = id_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.registrationTimeUTC_ = registrationTimeUTC_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        if (endpointBuilder_ == null) {
          result.endpoint_ = endpoint_;
        } else {
          result.endpoint_ = endpointBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance) {
          return mergeFrom((org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance other) {
        if (other == org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance.getDefaultInstance()) return this;
        if (other.hasId()) {
          bitField0_ |= 0x00000001;
          id_ = other.id_;
          onChanged();
        }
        if (other.hasRegistrationTimeUTC()) {
          setRegistrationTimeUTC(other.getRegistrationTimeUTC());
        }
        if (other.hasEndpoint()) {
          mergeEndpoint(other.getEndpoint());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (org.apache.drill.exec.proto.CoordinationProtos.DrillServiceInstance) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      // optional string id = 1;
      private java.lang.Object id_ = "";
      /**
       * optional string id = 1;
       */
      public boolean hasId() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * optional string id = 1;
       */
      public java.lang.String getId() {
        java.lang.Object ref = id_;
        if (!(ref instanceof java.lang.String)) {
          java.lang.String s = ((com.google.protobuf.ByteString) ref)
              .toStringUtf8();
          id_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * optional string id = 1;
       */
      public com.google.protobuf.ByteString
          getIdBytes() {
        java.lang.Object ref = id_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          id_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * optional string id = 1;
       */
      public Builder setId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        id_ = value;
        onChanged();
        return this;
      }
      /**
       * optional string id = 1;
       */
      public Builder clearId() {
        bitField0_ = (bitField0_ & ~0x00000001);
        id_ = getDefaultInstance().getId();
        onChanged();
        return this;
      }
      /**
       * optional string id = 1;
       */
      public Builder setIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        id_ = value;
        onChanged();
        return this;
      }

      // optional int64 registrationTimeUTC = 2;
      private long registrationTimeUTC_ ;
      /**
       * optional int64 registrationTimeUTC = 2;
       */
      public boolean hasRegistrationTimeUTC() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * optional int64 registrationTimeUTC = 2;
       */
      public long getRegistrationTimeUTC() {
        return registrationTimeUTC_;
      }
      /**
       * optional int64 registrationTimeUTC = 2;
       */
      public Builder setRegistrationTimeUTC(long value) {
        bitField0_ |= 0x00000002;
        registrationTimeUTC_ = value;
        onChanged();
        return this;
      }
      /**
       * optional int64 registrationTimeUTC = 2;
       */
      public Builder clearRegistrationTimeUTC() {
        bitField0_ = (bitField0_ & ~0x00000002);
        registrationTimeUTC_ = 0L;
        onChanged();
        return this;
      }

      // optional .exec.DrillbitEndpoint endpoint = 3;
      private org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint endpoint_ = org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder> endpointBuilder_;
      /**
       * optional .exec.DrillbitEndpoint endpoint = 3;
       */
      public boolean hasEndpoint() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * optional .exec.DrillbitEndpoint endpoint = 3;
       */
      public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint getEndpoint() {
        if (endpointBuilder_ == null) {
          return endpoint_;
        } else {
          return endpointBuilder_.getMessage();
        }
      }
      /**
       * optional .exec.DrillbitEndpoint endpoint = 3;
       */
      public Builder setEndpoint(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint value) {
        if (endpointBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          endpoint_ = value;
          onChanged();
        } else {
          endpointBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * optional .exec.DrillbitEndpoint endpoint = 3;
       */
      public Builder setEndpoint(
          org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder builderForValue) {
        if (endpointBuilder_ == null) {
          endpoint_ = builderForValue.build();
          onChanged();
        } else {
          endpointBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * optional .exec.DrillbitEndpoint endpoint = 3;
       */
      public Builder mergeEndpoint(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint value) {
        if (endpointBuilder_ == null) {
          if (((bitField0_ & 0x00000004) == 0x00000004) &&
              endpoint_ != org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance()) {
            endpoint_ =
              org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(endpoint_).mergeFrom(value).buildPartial();
          } else {
            endpoint_ = value;
          }
          onChanged();
        } else {
          endpointBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * optional .exec.DrillbitEndpoint endpoint = 3;
       */
      public Builder clearEndpoint() {
        if (endpointBuilder_ == null) {
          endpoint_ = org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance();
          onChanged();
        } else {
          endpointBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }
      /**
       * optional .exec.DrillbitEndpoint endpoint = 3;
       */
      public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder getEndpointBuilder() {
        bitField0_ |= 0x00000004;
        onChanged();
        return getEndpointFieldBuilder().getBuilder();
      }
      /**
       * optional .exec.DrillbitEndpoint endpoint = 3;
       */
      public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder getEndpointOrBuilder() {
        if (endpointBuilder_ != null) {
          return endpointBuilder_.getMessageOrBuilder();
        } else {
          return endpoint_;
        }
      }
      /**
       * optional .exec.DrillbitEndpoint endpoint = 3;
       */
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder> 
          getEndpointFieldBuilder() {
        if (endpointBuilder_ == null) {
          endpointBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder>(
                  endpoint_,
                  getParentForChildren(),
                  isClean());
          endpoint_ = null;
        }
        return endpointBuilder_;
      }

      // @@protoc_insertion_point(builder_scope:exec.DrillServiceInstance)
    }

    static {
      defaultInstance = new DrillServiceInstance(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:exec.DrillServiceInstance)
  }

  public interface RolesOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // optional bool sql_query = 1 [default = true];
    /**
     * optional bool sql_query = 1 [default = true];
     */
    boolean hasSqlQuery();
    /**
     * optional bool sql_query = 1 [default = true];
     */
    boolean getSqlQuery();

    // optional bool logical_plan = 2 [default = true];
    /**
     * optional bool logical_plan = 2 [default = true];
     */
    boolean hasLogicalPlan();
    /**
     * optional bool logical_plan = 2 [default = true];
     */
    boolean getLogicalPlan();

    // optional bool physical_plan = 3 [default = true];
    /**
     * optional bool physical_plan = 3 [default = true];
     */
    boolean hasPhysicalPlan();
    /**
     * optional bool physical_plan = 3 [default = true];
     */
    boolean getPhysicalPlan();

    // optional bool java_executor = 4 [default = true];
    /**
     * optional bool java_executor = 4 [default = true];
     */
    boolean hasJavaExecutor();
    /**
     * optional bool java_executor = 4 [default = true];
     */
    boolean getJavaExecutor();

    // optional bool distributed_cache = 5 [default = true];
    /**
     * optional bool distributed_cache = 5 [default = true];
     */
    boolean hasDistributedCache();
    /**
     * optional bool distributed_cache = 5 [default = true];
     */
    boolean getDistributedCache();
  }
  /**
   * Protobuf type {@code exec.Roles}
   */
  public static final class Roles extends
      com.google.protobuf.GeneratedMessage
      implements RolesOrBuilder {
    // Use Roles.newBuilder() to construct.
    private Roles(com.google.protobuf.GeneratedMessage.Builder builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private Roles(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final Roles defaultInstance;
    public static Roles getDefaultInstance() {
      return defaultInstance;
    }

    public Roles getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private Roles(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 8: {
              bitField0_ |= 0x00000001;
              sqlQuery_ = input.readBool();
              break;
            }
            case 16: {
              bitField0_ |= 0x00000002;
              logicalPlan_ = input.readBool();
              break;
            }
            case 24: {
              bitField0_ |= 0x00000004;
              physicalPlan_ = input.readBool();
              break;
            }
            case 32: {
              bitField0_ |= 0x00000008;
              javaExecutor_ = input.readBool();
              break;
            }
            case 40: {
              bitField0_ |= 0x00000010;
              distributedCache_ = input.readBool();
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_Roles_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_Roles_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.apache.drill.exec.proto.CoordinationProtos.Roles.class, org.apache.drill.exec.proto.CoordinationProtos.Roles.Builder.class);
    }

    public static com.google.protobuf.Parser PARSER =
        new com.google.protobuf.AbstractParser() {
      public Roles parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new Roles(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    // optional bool sql_query = 1 [default = true];
    public static final int SQL_QUERY_FIELD_NUMBER = 1;
    private boolean sqlQuery_;
    /**
     * optional bool sql_query = 1 [default = true];
     */
    public boolean hasSqlQuery() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * optional bool sql_query = 1 [default = true];
     */
    public boolean getSqlQuery() {
      return sqlQuery_;
    }

    // optional bool logical_plan = 2 [default = true];
    public static final int LOGICAL_PLAN_FIELD_NUMBER = 2;
    private boolean logicalPlan_;
    /**
     * optional bool logical_plan = 2 [default = true];
     */
    public boolean hasLogicalPlan() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * optional bool logical_plan = 2 [default = true];
     */
    public boolean getLogicalPlan() {
      return logicalPlan_;
    }

    // optional bool physical_plan = 3 [default = true];
    public static final int PHYSICAL_PLAN_FIELD_NUMBER = 3;
    private boolean physicalPlan_;
    /**
     * optional bool physical_plan = 3 [default = true];
     */
    public boolean hasPhysicalPlan() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * optional bool physical_plan = 3 [default = true];
     */
    public boolean getPhysicalPlan() {
      return physicalPlan_;
    }

    // optional bool java_executor = 4 [default = true];
    public static final int JAVA_EXECUTOR_FIELD_NUMBER = 4;
    private boolean javaExecutor_;
    /**
     * optional bool java_executor = 4 [default = true];
     */
    public boolean hasJavaExecutor() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    /**
     * optional bool java_executor = 4 [default = true];
     */
    public boolean getJavaExecutor() {
      return javaExecutor_;
    }

    // optional bool distributed_cache = 5 [default = true];
    public static final int DISTRIBUTED_CACHE_FIELD_NUMBER = 5;
    private boolean distributedCache_;
    /**
     * optional bool distributed_cache = 5 [default = true];
     */
    public boolean hasDistributedCache() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    /**
     * optional bool distributed_cache = 5 [default = true];
     */
    public boolean getDistributedCache() {
      return distributedCache_;
    }

    private void initFields() {
      sqlQuery_ = true;
      logicalPlan_ = true;
      physicalPlan_ = true;
      javaExecutor_ = true;
      distributedCache_ = true;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBool(1, sqlQuery_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeBool(2, logicalPlan_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeBool(3, physicalPlan_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeBool(4, javaExecutor_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeBool(5, distributedCache_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(1, sqlQuery_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(2, logicalPlan_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(3, physicalPlan_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(4, javaExecutor_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(5, distributedCache_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.apache.drill.exec.proto.CoordinationProtos.Roles parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.Roles parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.Roles parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.Roles parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.Roles parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.Roles parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.Roles parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.Roles parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.Roles parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.apache.drill.exec.proto.CoordinationProtos.Roles parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.drill.exec.proto.CoordinationProtos.Roles prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code exec.Roles}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder
       implements org.apache.drill.exec.proto.CoordinationProtos.RolesOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_Roles_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_Roles_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.apache.drill.exec.proto.CoordinationProtos.Roles.class, org.apache.drill.exec.proto.CoordinationProtos.Roles.Builder.class);
      }

      // Construct using org.apache.drill.exec.proto.CoordinationProtos.Roles.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        sqlQuery_ = true;
        bitField0_ = (bitField0_ & ~0x00000001);
        logicalPlan_ = true;
        bitField0_ = (bitField0_ & ~0x00000002);
        physicalPlan_ = true;
        bitField0_ = (bitField0_ & ~0x00000004);
        javaExecutor_ = true;
        bitField0_ = (bitField0_ & ~0x00000008);
        distributedCache_ = true;
        bitField0_ = (bitField0_ & ~0x00000010);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.drill.exec.proto.CoordinationProtos.internal_static_exec_Roles_descriptor;
      }

      public org.apache.drill.exec.proto.CoordinationProtos.Roles getDefaultInstanceForType() {
        return org.apache.drill.exec.proto.CoordinationProtos.Roles.getDefaultInstance();
      }

      public org.apache.drill.exec.proto.CoordinationProtos.Roles build() {
        org.apache.drill.exec.proto.CoordinationProtos.Roles result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public org.apache.drill.exec.proto.CoordinationProtos.Roles buildPartial() {
        org.apache.drill.exec.proto.CoordinationProtos.Roles result = new org.apache.drill.exec.proto.CoordinationProtos.Roles(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.sqlQuery_ = sqlQuery_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.logicalPlan_ = logicalPlan_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.physicalPlan_ = physicalPlan_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.javaExecutor_ = javaExecutor_;
        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
          to_bitField0_ |= 0x00000010;
        }
        result.distributedCache_ = distributedCache_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.drill.exec.proto.CoordinationProtos.Roles) {
          return mergeFrom((org.apache.drill.exec.proto.CoordinationProtos.Roles)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.apache.drill.exec.proto.CoordinationProtos.Roles other) {
        if (other == org.apache.drill.exec.proto.CoordinationProtos.Roles.getDefaultInstance()) return this;
        if (other.hasSqlQuery()) {
          setSqlQuery(other.getSqlQuery());
        }
        if (other.hasLogicalPlan()) {
          setLogicalPlan(other.getLogicalPlan());
        }
        if (other.hasPhysicalPlan()) {
          setPhysicalPlan(other.getPhysicalPlan());
        }
        if (other.hasJavaExecutor()) {
          setJavaExecutor(other.getJavaExecutor());
        }
        if (other.hasDistributedCache()) {
          setDistributedCache(other.getDistributedCache());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        org.apache.drill.exec.proto.CoordinationProtos.Roles parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (org.apache.drill.exec.proto.CoordinationProtos.Roles) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      // optional bool sql_query = 1 [default = true];
      private boolean sqlQuery_ = true;
      /**
       * optional bool sql_query = 1 [default = true];
       */
      public boolean hasSqlQuery() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * optional bool sql_query = 1 [default = true];
       */
      public boolean getSqlQuery() {
        return sqlQuery_;
      }
      /**
       * optional bool sql_query = 1 [default = true];
       */
      public Builder setSqlQuery(boolean value) {
        bitField0_ |= 0x00000001;
        sqlQuery_ = value;
        onChanged();
        return this;
      }
      /**
       * optional bool sql_query = 1 [default = true];
       */
      public Builder clearSqlQuery() {
        bitField0_ = (bitField0_ & ~0x00000001);
        sqlQuery_ = true;
        onChanged();
        return this;
      }

      // optional bool logical_plan = 2 [default = true];
      private boolean logicalPlan_ = true;
      /**
       * optional bool logical_plan = 2 [default = true];
       */
      public boolean hasLogicalPlan() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * optional bool logical_plan = 2 [default = true];
       */
      public boolean getLogicalPlan() {
        return logicalPlan_;
      }
      /**
       * optional bool logical_plan = 2 [default = true];
       */
      public Builder setLogicalPlan(boolean value) {
        bitField0_ |= 0x00000002;
        logicalPlan_ = value;
        onChanged();
        return this;
      }
      /**
       * optional bool logical_plan = 2 [default = true];
       */
      public Builder clearLogicalPlan() {
        bitField0_ = (bitField0_ & ~0x00000002);
        logicalPlan_ = true;
        onChanged();
        return this;
      }

      // optional bool physical_plan = 3 [default = true];
      private boolean physicalPlan_ = true;
      /**
       * optional bool physical_plan = 3 [default = true];
       */
      public boolean hasPhysicalPlan() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * optional bool physical_plan = 3 [default = true];
       */
      public boolean getPhysicalPlan() {
        return physicalPlan_;
      }
      /**
       * optional bool physical_plan = 3 [default = true];
       */
      public Builder setPhysicalPlan(boolean value) {
        bitField0_ |= 0x00000004;
        physicalPlan_ = value;
        onChanged();
        return this;
      }
      /**
       * optional bool physical_plan = 3 [default = true];
       */
      public Builder clearPhysicalPlan() {
        bitField0_ = (bitField0_ & ~0x00000004);
        physicalPlan_ = true;
        onChanged();
        return this;
      }

      // optional bool java_executor = 4 [default = true];
      private boolean javaExecutor_ = true;
      /**
       * optional bool java_executor = 4 [default = true];
       */
      public boolean hasJavaExecutor() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      /**
       * optional bool java_executor = 4 [default = true];
       */
      public boolean getJavaExecutor() {
        return javaExecutor_;
      }
      /**
       * optional bool java_executor = 4 [default = true];
       */
      public Builder setJavaExecutor(boolean value) {
        bitField0_ |= 0x00000008;
        javaExecutor_ = value;
        onChanged();
        return this;
      }
      /**
       * optional bool java_executor = 4 [default = true];
       */
      public Builder clearJavaExecutor() {
        bitField0_ = (bitField0_ & ~0x00000008);
        javaExecutor_ = true;
        onChanged();
        return this;
      }

      // optional bool distributed_cache = 5 [default = true];
      private boolean distributedCache_ = true;
      /**
       * optional bool distributed_cache = 5 [default = true];
       */
      public boolean hasDistributedCache() {
        return ((bitField0_ & 0x00000010) == 0x00000010);
      }
      /**
       * optional bool distributed_cache = 5 [default = true];
       */
      public boolean getDistributedCache() {
        return distributedCache_;
      }
      /**
       * optional bool distributed_cache = 5 [default = true];
       */
      public Builder setDistributedCache(boolean value) {
        bitField0_ |= 0x00000010;
        distributedCache_ = value;
        onChanged();
        return this;
      }
      /**
       * optional bool distributed_cache = 5 [default = true];
       */
      public Builder clearDistributedCache() {
        bitField0_ = (bitField0_ & ~0x00000010);
        distributedCache_ = true;
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:exec.Roles)
    }

    static {
      defaultInstance = new Roles(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:exec.Roles)
  }

  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_exec_DrillbitEndpoint_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_exec_DrillbitEndpoint_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_exec_DrillServiceInstance_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_exec_DrillServiceInstance_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_exec_Roles_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_exec_Roles_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\022Coordination.proto\022\004exec\"{\n\020DrillbitEn" +
      "dpoint\022\017\n\007address\030\001 \001(\t\022\021\n\tuser_port\030\002 \001" +
      "(\005\022\024\n\014control_port\030\003 \001(\005\022\021\n\tdata_port\030\004 " +
      "\001(\005\022\032\n\005roles\030\005 \001(\0132\013.exec.Roles\"i\n\024Drill" +
      "ServiceInstance\022\n\n\002id\030\001 \001(\t\022\033\n\023registrat" +
      "ionTimeUTC\030\002 \001(\003\022(\n\010endpoint\030\003 \001(\0132\026.exe" +
      "c.DrillbitEndpoint\"\227\001\n\005Roles\022\027\n\tsql_quer" +
      "y\030\001 \001(\010:\004true\022\032\n\014logical_plan\030\002 \001(\010:\004tru" +
      "e\022\033\n\rphysical_plan\030\003 \001(\010:\004true\022\033\n\rjava_e" +
      "xecutor\030\004 \001(\010:\004true\022\037\n\021distributed_cache",
      "\030\005 \001(\010:\004trueB3\n\033org.apache.drill.exec.pr" +
      "otoB\022CoordinationProtosH\001"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
        public com.google.protobuf.ExtensionRegistry assignDescriptors(
            com.google.protobuf.Descriptors.FileDescriptor root) {
          descriptor = root;
          internal_static_exec_DrillbitEndpoint_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_exec_DrillbitEndpoint_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_exec_DrillbitEndpoint_descriptor,
              new java.lang.String[] { "Address", "UserPort", "ControlPort", "DataPort", "Roles", });
          internal_static_exec_DrillServiceInstance_descriptor =
            getDescriptor().getMessageTypes().get(1);
          internal_static_exec_DrillServiceInstance_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_exec_DrillServiceInstance_descriptor,
              new java.lang.String[] { "Id", "RegistrationTimeUTC", "Endpoint", });
          internal_static_exec_Roles_descriptor =
            getDescriptor().getMessageTypes().get(2);
          internal_static_exec_Roles_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_exec_Roles_descriptor,
              new java.lang.String[] { "SqlQuery", "LogicalPlan", "PhysicalPlan", "JavaExecutor", "DistributedCache", });
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
  }

  // @@protoc_insertion_point(outer_class_scope)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy