You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ve...@apache.org on 2016/08/07 19:51:12 UTC
[3/5] drill git commit: DRILL-4728: Add support for new metadata
fetch APIs
http://git-wip-us.apache.org/repos/asf/drill/blob/ef6e522c/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java b/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
index 60ddc77..1bd4641 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
@@ -83,33 +83,97 @@ public final class UserProtos {
*/
GET_QUERY_PLAN_FRAGMENTS(7, 12),
/**
+ * <code>GET_CATALOGS = 14;</code>
+ *
+ * <pre>
+ * user is requesting metadata of catalog(s).
+ * </pre>
+ */
+ GET_CATALOGS(8, 14),
+ /**
+ * <code>GET_SCHEMAS = 15;</code>
+ *
+ * <pre>
+ * user is requesting metadata of schema(s)
+ * </pre>
+ */
+ GET_SCHEMAS(9, 15),
+ /**
+ * <code>GET_TABLES = 16;</code>
+ *
+ * <pre>
+ * user is requesting metadata of table(s)
+ * </pre>
+ */
+ GET_TABLES(10, 16),
+ /**
+ * <code>GET_COLUMNS = 17;</code>
+ *
+ * <pre>
+ * user is requesting metadata of column(s)
+ * </pre>
+ */
+ GET_COLUMNS(11, 17),
+ /**
* <code>QUERY_DATA = 6;</code>
*
* <pre>
* bit to user
* </pre>
*/
- QUERY_DATA(8, 6),
+ QUERY_DATA(12, 6),
/**
* <code>QUERY_HANDLE = 7;</code>
*/
- QUERY_HANDLE(9, 7),
+ QUERY_HANDLE(13, 7),
/**
* <code>QUERY_PLAN_FRAGMENTS = 13;</code>
*
* <pre>
- * return plan fragments
+ * return plan fragments
+ * </pre>
+ */
+ QUERY_PLAN_FRAGMENTS(14, 13),
+ /**
+ * <code>CATALOGS = 18;</code>
+ *
+ * <pre>
+ * return catalogs metadata in response to GET_CATALOGS
+ * </pre>
+ */
+ CATALOGS(15, 18),
+ /**
+ * <code>SCHEMAS = 19;</code>
+ *
+ * <pre>
+ * return schema metadata in response to GET_SCHEMAS
+ * </pre>
+ */
+ SCHEMAS(16, 19),
+ /**
+ * <code>TABLES = 20;</code>
+ *
+ * <pre>
+ * return table metadata in response to GET_TABLES
+ * </pre>
+ */
+ TABLES(17, 20),
+ /**
+ * <code>COLUMNS = 21;</code>
+ *
+ * <pre>
+ * return column metadata in response to GET_COLUMNS
* </pre>
*/
- QUERY_PLAN_FRAGMENTS(10, 13),
+ COLUMNS(18, 21),
/**
* <code>REQ_META_FUNCTIONS = 8;</code>
*/
- REQ_META_FUNCTIONS(11, 8),
+ REQ_META_FUNCTIONS(19, 8),
/**
* <code>RESP_FUNCTION_LIST = 9;</code>
*/
- RESP_FUNCTION_LIST(12, 9),
+ RESP_FUNCTION_LIST(20, 9),
/**
* <code>QUERY_RESULT = 10;</code>
*
@@ -117,7 +181,7 @@ public final class UserProtos {
* drillbit is reporting a query status change, most likely a terminal message, to the user
* </pre>
*/
- QUERY_RESULT(13, 10),
+ QUERY_RESULT(21, 10),
;
/**
@@ -169,6 +233,38 @@ public final class UserProtos {
*/
public static final int GET_QUERY_PLAN_FRAGMENTS_VALUE = 12;
/**
+ * <code>GET_CATALOGS = 14;</code>
+ *
+ * <pre>
+ * user is requesting metadata of catalog(s).
+ * </pre>
+ */
+ public static final int GET_CATALOGS_VALUE = 14;
+ /**
+ * <code>GET_SCHEMAS = 15;</code>
+ *
+ * <pre>
+ * user is requesting metadata of schema(s)
+ * </pre>
+ */
+ public static final int GET_SCHEMAS_VALUE = 15;
+ /**
+ * <code>GET_TABLES = 16;</code>
+ *
+ * <pre>
+ * user is requesting metadata of table(s)
+ * </pre>
+ */
+ public static final int GET_TABLES_VALUE = 16;
+ /**
+ * <code>GET_COLUMNS = 17;</code>
+ *
+ * <pre>
+ * user is requesting metadata of column(s)
+ * </pre>
+ */
+ public static final int GET_COLUMNS_VALUE = 17;
+ /**
* <code>QUERY_DATA = 6;</code>
*
* <pre>
@@ -184,11 +280,43 @@ public final class UserProtos {
* <code>QUERY_PLAN_FRAGMENTS = 13;</code>
*
* <pre>
- * return plan fragments
+ * return plan fragments
* </pre>
*/
public static final int QUERY_PLAN_FRAGMENTS_VALUE = 13;
/**
+ * <code>CATALOGS = 18;</code>
+ *
+ * <pre>
+ * return catalogs metadata in response to GET_CATALOGS
+ * </pre>
+ */
+ public static final int CATALOGS_VALUE = 18;
+ /**
+ * <code>SCHEMAS = 19;</code>
+ *
+ * <pre>
+ * return schema metadata in response to GET_SCHEMAS
+ * </pre>
+ */
+ public static final int SCHEMAS_VALUE = 19;
+ /**
+ * <code>TABLES = 20;</code>
+ *
+ * <pre>
+ * return table metadata in response to GET_TABLES
+ * </pre>
+ */
+ public static final int TABLES_VALUE = 20;
+ /**
+ * <code>COLUMNS = 21;</code>
+ *
+ * <pre>
+ * return column metadata in response to GET_COLUMNS
+ * </pre>
+ */
+ public static final int COLUMNS_VALUE = 21;
+ /**
* <code>REQ_META_FUNCTIONS = 8;</code>
*/
public static final int REQ_META_FUNCTIONS_VALUE = 8;
@@ -218,9 +346,17 @@ public final class UserProtos {
case 5: return REQUEST_RESULTS;
case 11: return RESUME_PAUSED_QUERY;
case 12: return GET_QUERY_PLAN_FRAGMENTS;
+ case 14: return GET_CATALOGS;
+ case 15: return GET_SCHEMAS;
+ case 16: return GET_TABLES;
+ case 17: return GET_COLUMNS;
case 6: return QUERY_DATA;
case 7: return QUERY_HANDLE;
case 13: return QUERY_PLAN_FRAGMENTS;
+ case 18: return CATALOGS;
+ case 19: return SCHEMAS;
+ case 20: return TABLES;
+ case 21: return COLUMNS;
case 8: return REQ_META_FUNCTIONS;
case 9: return RESP_FUNCTION_LIST;
case 10: return QUERY_RESULT;
@@ -488,6 +624,102 @@ public final class UserProtos {
// @@protoc_insertion_point(enum_scope:exec.user.HandshakeStatus)
}
+ /**
+ * Protobuf enum {@code exec.user.RequestStatus}
+ *
+ * <pre>
+ *
+ * Enum indicating the request status.
+ * </pre>
+ */
+ public enum RequestStatus
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * <code>UNKNOWN = 0;</code>
+ */
+ UNKNOWN(0, 0),
+ /**
+ * <code>OK = 1;</code>
+ */
+ OK(1, 1),
+ /**
+ * <code>FAILED = 2;</code>
+ */
+ FAILED(2, 2),
+ ;
+
+ /**
+ * <code>UNKNOWN = 0;</code>
+ */
+ public static final int UNKNOWN_VALUE = 0;
+ /**
+ * <code>OK = 1;</code>
+ */
+ public static final int OK_VALUE = 1;
+ /**
+ * <code>FAILED = 2;</code>
+ */
+ public static final int FAILED_VALUE = 2;
+
+
+ public final int getNumber() { return value; }
+
+ public static RequestStatus valueOf(int value) {
+ switch (value) {
+ case 0: return UNKNOWN;
+ case 1: return OK;
+ case 2: return FAILED;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap<RequestStatus>
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static com.google.protobuf.Internal.EnumLiteMap<RequestStatus>
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap<RequestStatus>() {
+ public RequestStatus findValueByNumber(int number) {
+ return RequestStatus.valueOf(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor
+ getValueDescriptor() {
+ return getDescriptor().getValues().get(index);
+ }
+ public final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptorForType() {
+ return getDescriptor();
+ }
+ public static final com.google.protobuf.Descriptors.EnumDescriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.UserProtos.getDescriptor().getEnumTypes().get(3);
+ }
+
+ private static final RequestStatus[] VALUES = values();
+
+ public static RequestStatus valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int index;
+ private final int value;
+
+ private RequestStatus(int index, int value) {
+ this.index = index;
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:exec.user.RequestStatus)
+ }
+
public interface PropertyOrBuilder
extends com.google.protobuf.MessageOrBuilder {
@@ -7150,97 +7382,13132 @@ public final class UserProtos {
// @@protoc_insertion_point(class_scope:exec.user.BitToUserHandshake)
}
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_exec_user_Property_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_exec_user_Property_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_exec_user_UserProperties_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_exec_user_UserProperties_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_exec_user_UserToBitHandshake_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_exec_user_UserToBitHandshake_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_exec_user_RequestResults_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_exec_user_RequestResults_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_exec_user_RunQuery_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_exec_user_RunQuery_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_exec_user_GetQueryPlanFragments_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_exec_user_GetQueryPlanFragments_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_exec_user_QueryPlanFragments_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_exec_user_QueryPlanFragments_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_exec_user_BitToUserHandshake_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_exec_user_BitToUserHandshake_fieldAccessorTable;
+ public interface LikeFilterOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
+ // optional string regex = 1;
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ boolean hasRegex();
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ java.lang.String getRegex();
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ com.google.protobuf.ByteString
+ getRegexBytes();
+
+ // optional string escape = 2;
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ boolean hasEscape();
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ java.lang.String getEscape();
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ com.google.protobuf.ByteString
+ getEscapeBytes();
}
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\nUser.proto\022\texec.user\032\017SchemaDef.proto" +
- "\032\023UserBitShared.proto\032\rBitData.proto\032\020Bi" +
- "tControl.proto\032\025ExecutionProtos.proto\"&\n" +
- "\010Property\022\013\n\003key\030\001 \002(\t\022\r\n\005value\030\002 \002(\t\"9\n" +
- "\016UserProperties\022\'\n\nproperties\030\001 \003(\0132\023.ex" +
- "ec.user.Property\"\234\002\n\022UserToBitHandshake\022" +
- ".\n\007channel\030\001 \001(\0162\027.exec.shared.RpcChanne" +
- "l:\004USER\022\031\n\021support_listening\030\002 \001(\010\022\023\n\013rp" +
- "c_version\030\003 \001(\005\0221\n\013credentials\030\004 \001(\0132\034.e" +
- "xec.shared.UserCredentials\022-\n\nproperties",
- "\030\005 \001(\0132\031.exec.user.UserProperties\022$\n\025sup" +
- "port_complex_types\030\006 \001(\010:\005false\022\036\n\017suppo" +
- "rt_timeout\030\007 \001(\010:\005false\"S\n\016RequestResult" +
- "s\022&\n\010query_id\030\001 \001(\0132\024.exec.shared.QueryI" +
- "d\022\031\n\021maximum_responses\030\002 \001(\005\"\244\001\n\010RunQuer" +
- "y\0221\n\014results_mode\030\001 \001(\0162\033.exec.user.Quer" +
- "yResultsMode\022$\n\004type\030\002 \001(\0162\026.exec.shared" +
- ".QueryType\022\014\n\004plan\030\003 \001(\t\0221\n\tfragments\030\004 " +
- "\003(\0132\036.exec.bit.control.PlanFragment\"g\n\025G" +
- "etQueryPlanFragments\022\r\n\005query\030\001 \002(\t\022$\n\004t",
- "ype\030\002 \001(\0162\026.exec.shared.QueryType\022\031\n\nspl" +
- "it_plan\030\003 \001(\010:\005false\"\316\001\n\022QueryPlanFragme" +
- "nts\0223\n\006status\030\001 \002(\0162#.exec.shared.QueryR" +
- "esult.QueryState\022&\n\010query_id\030\002 \001(\0132\024.exe" +
- "c.shared.QueryId\0221\n\tfragments\030\003 \003(\0132\036.ex" +
- "ec.bit.control.PlanFragment\022(\n\005error\030\004 \001" +
- "(\0132\031.exec.shared.DrillPBError\"|\n\022BitToUs" +
- "erHandshake\022\023\n\013rpc_version\030\002 \001(\005\022*\n\006stat" +
+ /**
+ * Protobuf type {@code exec.user.LikeFilter}
+ *
+ * <pre>
+ *
+ * Simple filter which encapsulates the SQL LIKE ... ESCAPE function
+ * </pre>
+ */
+ public static final class LikeFilter extends
+ com.google.protobuf.GeneratedMessage
+ implements LikeFilterOrBuilder {
+ // Use LikeFilter.newBuilder() to construct.
+ private LikeFilter(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private LikeFilter(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final LikeFilter defaultInstance;
+ public static LikeFilter getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public LikeFilter getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private LikeFilter(
+ 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;
+ regex_ = input.readBytes();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ escape_ = input.readBytes();
+ 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.UserProtos.internal_static_exec_user_LikeFilter_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_LikeFilter_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.UserProtos.LikeFilter.class, org.apache.drill.exec.proto.UserProtos.LikeFilter.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<LikeFilter> PARSER =
+ new com.google.protobuf.AbstractParser<LikeFilter>() {
+ public LikeFilter parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new LikeFilter(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<LikeFilter> getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ // optional string regex = 1;
+ public static final int REGEX_FIELD_NUMBER = 1;
+ private java.lang.Object regex_;
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ public boolean hasRegex() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ public java.lang.String getRegex() {
+ java.lang.Object ref = regex_;
+ 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()) {
+ regex_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ public com.google.protobuf.ByteString
+ getRegexBytes() {
+ java.lang.Object ref = regex_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ regex_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ // optional string escape = 2;
+ public static final int ESCAPE_FIELD_NUMBER = 2;
+ private java.lang.Object escape_;
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ public boolean hasEscape() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ public java.lang.String getEscape() {
+ java.lang.Object ref = escape_;
+ 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()) {
+ escape_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ public com.google.protobuf.ByteString
+ getEscapeBytes() {
+ java.lang.Object ref = escape_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ escape_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private void initFields() {
+ regex_ = "";
+ escape_ = "";
+ }
+ 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, getRegexBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getEscapeBytes());
+ }
+ 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, getRegexBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getEscapeBytes());
+ }
+ 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.UserProtos.LikeFilter parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.LikeFilter 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.UserProtos.LikeFilter parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.LikeFilter 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.UserProtos.LikeFilter parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.LikeFilter 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.UserProtos.LikeFilter parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.LikeFilter 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.UserProtos.LikeFilter parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.LikeFilter 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.UserProtos.LikeFilter 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.user.LikeFilter}
+ *
+ * <pre>
+ *
+ * Simple filter which encapsulates the SQL LIKE ... ESCAPE function
+ * </pre>
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.apache.drill.exec.proto.UserProtos.LikeFilterOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_LikeFilter_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_LikeFilter_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.UserProtos.LikeFilter.class, org.apache.drill.exec.proto.UserProtos.LikeFilter.Builder.class);
+ }
+
+ // Construct using org.apache.drill.exec.proto.UserProtos.LikeFilter.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();
+ regex_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ escape_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_LikeFilter_descriptor;
+ }
+
+ public org.apache.drill.exec.proto.UserProtos.LikeFilter getDefaultInstanceForType() {
+ return org.apache.drill.exec.proto.UserProtos.LikeFilter.getDefaultInstance();
+ }
+
+ public org.apache.drill.exec.proto.UserProtos.LikeFilter build() {
+ org.apache.drill.exec.proto.UserProtos.LikeFilter result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.apache.drill.exec.proto.UserProtos.LikeFilter buildPartial() {
+ org.apache.drill.exec.proto.UserProtos.LikeFilter result = new org.apache.drill.exec.proto.UserProtos.LikeFilter(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.regex_ = regex_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.escape_ = escape_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.apache.drill.exec.proto.UserProtos.LikeFilter) {
+ return mergeFrom((org.apache.drill.exec.proto.UserProtos.LikeFilter)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.apache.drill.exec.proto.UserProtos.LikeFilter other) {
+ if (other == org.apache.drill.exec.proto.UserProtos.LikeFilter.getDefaultInstance()) return this;
+ if (other.hasRegex()) {
+ bitField0_ |= 0x00000001;
+ regex_ = other.regex_;
+ onChanged();
+ }
+ if (other.hasEscape()) {
+ bitField0_ |= 0x00000002;
+ escape_ = other.escape_;
+ onChanged();
+ }
+ 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.UserProtos.LikeFilter parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.apache.drill.exec.proto.UserProtos.LikeFilter) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ // optional string regex = 1;
+ private java.lang.Object regex_ = "";
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ public boolean hasRegex() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ public java.lang.String getRegex() {
+ java.lang.Object ref = regex_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ regex_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ public com.google.protobuf.ByteString
+ getRegexBytes() {
+ java.lang.Object ref = regex_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ regex_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ public Builder setRegex(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ regex_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ public Builder clearRegex() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ regex_ = getDefaultInstance().getRegex();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string regex = 1;</code>
+ *
+ * <pre>
+ * pattern to match
+ * </pre>
+ */
+ public Builder setRegexBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ regex_ = value;
+ onChanged();
+ return this;
+ }
+
+ // optional string escape = 2;
+ private java.lang.Object escape_ = "";
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ public boolean hasEscape() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ public java.lang.String getEscape() {
+ java.lang.Object ref = escape_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ escape_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ public com.google.protobuf.ByteString
+ getEscapeBytes() {
+ java.lang.Object ref = escape_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ escape_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ public Builder setEscape(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ escape_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ public Builder clearEscape() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ escape_ = getDefaultInstance().getEscape();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string escape = 2;</code>
+ *
+ * <pre>
+ * escape character (if any) present in the pattern
+ * </pre>
+ */
+ public Builder setEscapeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ escape_ = value;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:exec.user.LikeFilter)
+ }
+
+ static {
+ defaultInstance = new LikeFilter(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:exec.user.LikeFilter)
+ }
+
+ public interface GetCatalogsReqOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional .exec.user.LikeFilter catalog_name_filter = 1;
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ boolean hasCatalogNameFilter();
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ org.apache.drill.exec.proto.UserProtos.LikeFilter getCatalogNameFilter();
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ org.apache.drill.exec.proto.UserProtos.LikeFilterOrBuilder getCatalogNameFilterOrBuilder();
+ }
+ /**
+ * Protobuf type {@code exec.user.GetCatalogsReq}
+ *
+ * <pre>
+ *
+ * Request message for getting the metadata for catalogs satisfying the given optional filter.
+ * </pre>
+ */
+ public static final class GetCatalogsReq extends
+ com.google.protobuf.GeneratedMessage
+ implements GetCatalogsReqOrBuilder {
+ // Use GetCatalogsReq.newBuilder() to construct.
+ private GetCatalogsReq(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private GetCatalogsReq(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final GetCatalogsReq defaultInstance;
+ public static GetCatalogsReq getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public GetCatalogsReq getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private GetCatalogsReq(
+ 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: {
+ org.apache.drill.exec.proto.UserProtos.LikeFilter.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = catalogNameFilter_.toBuilder();
+ }
+ catalogNameFilter_ = input.readMessage(org.apache.drill.exec.proto.UserProtos.LikeFilter.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(catalogNameFilter_);
+ catalogNameFilter_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ 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.UserProtos.internal_static_exec_user_GetCatalogsReq_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_GetCatalogsReq_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.UserProtos.GetCatalogsReq.class, org.apache.drill.exec.proto.UserProtos.GetCatalogsReq.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<GetCatalogsReq> PARSER =
+ new com.google.protobuf.AbstractParser<GetCatalogsReq>() {
+ public GetCatalogsReq parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new GetCatalogsReq(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<GetCatalogsReq> getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ // optional .exec.user.LikeFilter catalog_name_filter = 1;
+ public static final int CATALOG_NAME_FILTER_FIELD_NUMBER = 1;
+ private org.apache.drill.exec.proto.UserProtos.LikeFilter catalogNameFilter_;
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ public boolean hasCatalogNameFilter() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ public org.apache.drill.exec.proto.UserProtos.LikeFilter getCatalogNameFilter() {
+ return catalogNameFilter_;
+ }
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ public org.apache.drill.exec.proto.UserProtos.LikeFilterOrBuilder getCatalogNameFilterOrBuilder() {
+ return catalogNameFilter_;
+ }
+
+ private void initFields() {
+ catalogNameFilter_ = org.apache.drill.exec.proto.UserProtos.LikeFilter.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.writeMessage(1, catalogNameFilter_);
+ }
+ 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
+ .computeMessageSize(1, catalogNameFilter_);
+ }
+ 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.UserProtos.GetCatalogsReq parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.GetCatalogsReq 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.UserProtos.GetCatalogsReq parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.GetCatalogsReq 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.UserProtos.GetCatalogsReq parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.GetCatalogsReq 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.UserProtos.GetCatalogsReq parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.GetCatalogsReq 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.UserProtos.GetCatalogsReq parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.GetCatalogsReq 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.UserProtos.GetCatalogsReq 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.user.GetCatalogsReq}
+ *
+ * <pre>
+ *
+ * Request message for getting the metadata for catalogs satisfying the given optional filter.
+ * </pre>
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.apache.drill.exec.proto.UserProtos.GetCatalogsReqOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_GetCatalogsReq_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_GetCatalogsReq_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.UserProtos.GetCatalogsReq.class, org.apache.drill.exec.proto.UserProtos.GetCatalogsReq.Builder.class);
+ }
+
+ // Construct using org.apache.drill.exec.proto.UserProtos.GetCatalogsReq.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getCatalogNameFilterFieldBuilder();
+ }
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ if (catalogNameFilterBuilder_ == null) {
+ catalogNameFilter_ = org.apache.drill.exec.proto.UserProtos.LikeFilter.getDefaultInstance();
+ } else {
+ catalogNameFilterBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_GetCatalogsReq_descriptor;
+ }
+
+ public org.apache.drill.exec.proto.UserProtos.GetCatalogsReq getDefaultInstanceForType() {
+ return org.apache.drill.exec.proto.UserProtos.GetCatalogsReq.getDefaultInstance();
+ }
+
+ public org.apache.drill.exec.proto.UserProtos.GetCatalogsReq build() {
+ org.apache.drill.exec.proto.UserProtos.GetCatalogsReq result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.apache.drill.exec.proto.UserProtos.GetCatalogsReq buildPartial() {
+ org.apache.drill.exec.proto.UserProtos.GetCatalogsReq result = new org.apache.drill.exec.proto.UserProtos.GetCatalogsReq(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ if (catalogNameFilterBuilder_ == null) {
+ result.catalogNameFilter_ = catalogNameFilter_;
+ } else {
+ result.catalogNameFilter_ = catalogNameFilterBuilder_.build();
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.apache.drill.exec.proto.UserProtos.GetCatalogsReq) {
+ return mergeFrom((org.apache.drill.exec.proto.UserProtos.GetCatalogsReq)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.apache.drill.exec.proto.UserProtos.GetCatalogsReq other) {
+ if (other == org.apache.drill.exec.proto.UserProtos.GetCatalogsReq.getDefaultInstance()) return this;
+ if (other.hasCatalogNameFilter()) {
+ mergeCatalogNameFilter(other.getCatalogNameFilter());
+ }
+ 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.UserProtos.GetCatalogsReq parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.apache.drill.exec.proto.UserProtos.GetCatalogsReq) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ // optional .exec.user.LikeFilter catalog_name_filter = 1;
+ private org.apache.drill.exec.proto.UserProtos.LikeFilter catalogNameFilter_ = org.apache.drill.exec.proto.UserProtos.LikeFilter.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.exec.proto.UserProtos.LikeFilter, org.apache.drill.exec.proto.UserProtos.LikeFilter.Builder, org.apache.drill.exec.proto.UserProtos.LikeFilterOrBuilder> catalogNameFilterBuilder_;
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ public boolean hasCatalogNameFilter() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ public org.apache.drill.exec.proto.UserProtos.LikeFilter getCatalogNameFilter() {
+ if (catalogNameFilterBuilder_ == null) {
+ return catalogNameFilter_;
+ } else {
+ return catalogNameFilterBuilder_.getMessage();
+ }
+ }
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ public Builder setCatalogNameFilter(org.apache.drill.exec.proto.UserProtos.LikeFilter value) {
+ if (catalogNameFilterBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ catalogNameFilter_ = value;
+ onChanged();
+ } else {
+ catalogNameFilterBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ public Builder setCatalogNameFilter(
+ org.apache.drill.exec.proto.UserProtos.LikeFilter.Builder builderForValue) {
+ if (catalogNameFilterBuilder_ == null) {
+ catalogNameFilter_ = builderForValue.build();
+ onChanged();
+ } else {
+ catalogNameFilterBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ public Builder mergeCatalogNameFilter(org.apache.drill.exec.proto.UserProtos.LikeFilter value) {
+ if (catalogNameFilterBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001) &&
+ catalogNameFilter_ != org.apache.drill.exec.proto.UserProtos.LikeFilter.getDefaultInstance()) {
+ catalogNameFilter_ =
+ org.apache.drill.exec.proto.UserProtos.LikeFilter.newBuilder(catalogNameFilter_).mergeFrom(value).buildPartial();
+ } else {
+ catalogNameFilter_ = value;
+ }
+ onChanged();
+ } else {
+ catalogNameFilterBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ public Builder clearCatalogNameFilter() {
+ if (catalogNameFilterBuilder_ == null) {
+ catalogNameFilter_ = org.apache.drill.exec.proto.UserProtos.LikeFilter.getDefaultInstance();
+ onChanged();
+ } else {
+ catalogNameFilterBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ public org.apache.drill.exec.proto.UserProtos.LikeFilter.Builder getCatalogNameFilterBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getCatalogNameFilterFieldBuilder().getBuilder();
+ }
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ public org.apache.drill.exec.proto.UserProtos.LikeFilterOrBuilder getCatalogNameFilterOrBuilder() {
+ if (catalogNameFilterBuilder_ != null) {
+ return catalogNameFilterBuilder_.getMessageOrBuilder();
+ } else {
+ return catalogNameFilter_;
+ }
+ }
+ /**
+ * <code>optional .exec.user.LikeFilter catalog_name_filter = 1;</code>
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.exec.proto.UserProtos.LikeFilter, org.apache.drill.exec.proto.UserProtos.LikeFilter.Builder, org.apache.drill.exec.proto.UserProtos.LikeFilterOrBuilder>
+ getCatalogNameFilterFieldBuilder() {
+ if (catalogNameFilterBuilder_ == null) {
+ catalogNameFilterBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.exec.proto.UserProtos.LikeFilter, org.apache.drill.exec.proto.UserProtos.LikeFilter.Builder, org.apache.drill.exec.proto.UserProtos.LikeFilterOrBuilder>(
+ catalogNameFilter_,
+ getParentForChildren(),
+ isClean());
+ catalogNameFilter_ = null;
+ }
+ return catalogNameFilterBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:exec.user.GetCatalogsReq)
+ }
+
+ static {
+ defaultInstance = new GetCatalogsReq(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:exec.user.GetCatalogsReq)
+ }
+
+ public interface CatalogMetadataOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional string catalog_name = 1;
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ boolean hasCatalogName();
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ java.lang.String getCatalogName();
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ com.google.protobuf.ByteString
+ getCatalogNameBytes();
+
+ // optional string description = 2;
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ boolean hasDescription();
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ java.lang.String getDescription();
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getDescriptionBytes();
+
+ // optional string connect = 3;
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ boolean hasConnect();
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ java.lang.String getConnect();
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ com.google.protobuf.ByteString
+ getConnectBytes();
+ }
+ /**
+ * Protobuf type {@code exec.user.CatalogMetadata}
+ *
+ * <pre>
+ *
+ * Message encapsulating metadata for a Catalog.
+ * </pre>
+ */
+ public static final class CatalogMetadata extends
+ com.google.protobuf.GeneratedMessage
+ implements CatalogMetadataOrBuilder {
+ // Use CatalogMetadata.newBuilder() to construct.
+ private CatalogMetadata(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private CatalogMetadata(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final CatalogMetadata defaultInstance;
+ public static CatalogMetadata getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public CatalogMetadata getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private CatalogMetadata(
+ 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;
+ catalogName_ = input.readBytes();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ description_ = input.readBytes();
+ break;
+ }
+ case 26: {
+ bitField0_ |= 0x00000004;
+ connect_ = input.readBytes();
+ 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.UserProtos.internal_static_exec_user_CatalogMetadata_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_CatalogMetadata_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.UserProtos.CatalogMetadata.class, org.apache.drill.exec.proto.UserProtos.CatalogMetadata.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<CatalogMetadata> PARSER =
+ new com.google.protobuf.AbstractParser<CatalogMetadata>() {
+ public CatalogMetadata parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new CatalogMetadata(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<CatalogMetadata> getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ // optional string catalog_name = 1;
+ public static final int CATALOG_NAME_FIELD_NUMBER = 1;
+ private java.lang.Object catalogName_;
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ public boolean hasCatalogName() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ public java.lang.String getCatalogName() {
+ java.lang.Object ref = catalogName_;
+ 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()) {
+ catalogName_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getCatalogNameBytes() {
+ java.lang.Object ref = catalogName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ catalogName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ // optional string description = 2;
+ public static final int DESCRIPTION_FIELD_NUMBER = 2;
+ private java.lang.Object description_;
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ public boolean hasDescription() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ 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()) {
+ description_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ // optional string connect = 3;
+ public static final int CONNECT_FIELD_NUMBER = 3;
+ private java.lang.Object connect_;
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ public boolean hasConnect() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ public java.lang.String getConnect() {
+ java.lang.Object ref = connect_;
+ 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()) {
+ connect_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getConnectBytes() {
+ java.lang.Object ref = connect_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ connect_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private void initFields() {
+ catalogName_ = "";
+ description_ = "";
+ connect_ = "";
+ }
+ 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, getCatalogNameBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getDescriptionBytes());
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(3, getConnectBytes());
+ }
+ 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, getCatalogNameBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getDescriptionBytes());
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, getConnectBytes());
+ }
+ 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.UserProtos.CatalogMetadata parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.CatalogMetadata 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.UserProtos.CatalogMetadata parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.CatalogMetadata 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.UserProtos.CatalogMetadata parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.CatalogMetadata 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.UserProtos.CatalogMetadata parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.CatalogMetadata 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.UserProtos.CatalogMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserProtos.CatalogMetadata 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.UserProtos.CatalogMetadata 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.user.CatalogMetadata}
+ *
+ * <pre>
+ *
+ * Message encapsulating metadata for a Catalog.
+ * </pre>
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.apache.drill.exec.proto.UserProtos.CatalogMetadataOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_CatalogMetadata_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_CatalogMetadata_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.UserProtos.CatalogMetadata.class, org.apache.drill.exec.proto.UserProtos.CatalogMetadata.Builder.class);
+ }
+
+ // Construct using org.apache.drill.exec.proto.UserProtos.CatalogMetadata.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();
+ catalogName_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ description_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ connect_ = "";
+ 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.UserProtos.internal_static_exec_user_CatalogMetadata_descriptor;
+ }
+
+ public org.apache.drill.exec.proto.UserProtos.CatalogMetadata getDefaultInstanceForType() {
+ return org.apache.drill.exec.proto.UserProtos.CatalogMetadata.getDefaultInstance();
+ }
+
+ public org.apache.drill.exec.proto.UserProtos.CatalogMetadata build() {
+ org.apache.drill.exec.proto.UserProtos.CatalogMetadata result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.apache.drill.exec.proto.UserProtos.CatalogMetadata buildPartial() {
+ org.apache.drill.exec.proto.UserProtos.CatalogMetadata result = new org.apache.drill.exec.proto.UserProtos.CatalogMetadata(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.catalogName_ = catalogName_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.description_ = description_;
+ if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ result.connect_ = connect_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.apache.drill.exec.proto.UserProtos.CatalogMetadata) {
+ return mergeFrom((org.apache.drill.exec.proto.UserProtos.CatalogMetadata)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.apache.drill.exec.proto.UserProtos.CatalogMetadata other) {
+ if (other == org.apache.drill.exec.proto.UserProtos.CatalogMetadata.getDefaultInstance()) return this;
+ if (other.hasCatalogName()) {
+ bitField0_ |= 0x00000001;
+ catalogName_ = other.catalogName_;
+ onChanged();
+ }
+ if (other.hasDescription()) {
+ bitField0_ |= 0x00000002;
+ description_ = other.description_;
+ onChanged();
+ }
+ if (other.hasConnect()) {
+ bitField0_ |= 0x00000004;
+ connect_ = other.connect_;
+ onChanged();
+ }
+ 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.UserProtos.CatalogMetadata parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.apache.drill.exec.proto.UserProtos.CatalogMetadata) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ // optional string catalog_name = 1;
+ private java.lang.Object catalogName_ = "";
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ public boolean hasCatalogName() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ public java.lang.String getCatalogName() {
+ java.lang.Object ref = catalogName_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ catalogName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getCatalogNameBytes() {
+ java.lang.Object ref = catalogName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ catalogName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ public Builder setCatalogName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ catalogName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ public Builder clearCatalogName() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ catalogName_ = getDefaultInstance().getCatalogName();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string catalog_name = 1;</code>
+ */
+ public Builder setCatalogNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ catalogName_ = value;
+ onChanged();
+ return this;
+ }
+
+ // optional string description = 2;
+ private java.lang.Object description_ = "";
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ public boolean hasDescription() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ description_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ public Builder setDescription(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ description_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ public Builder clearDescription() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ description_ = getDefaultInstance().getDescription();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string description = 2;</code>
+ */
+ public Builder setDescriptionBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ description_ = value;
+ onChanged();
+ return this;
+ }
+
+ // optional string connect = 3;
+ private java.lang.Object connect_ = "";
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ public boolean hasConnect() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ public java.lang.String getConnect() {
+ java.lang.Object ref = connect_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ connect_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ public com.google.protobuf.ByteString
+ getConnectBytes() {
+ java.lang.Object ref = connect_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ connect_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ public Builder setConnect(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ connect_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ public Builder clearConnect() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ connect_ = getDefaultInstance().getConnect();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string connect = 3;</code>
+ */
+ public Builder setConnectBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ connect_ = value;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:exec.user.CatalogMetadata)
+ }
+
+ static {
+ defaultInstance = new CatalogMetadata(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:exec.user.CatalogMetadata)
+ }
+
+ public interface GetCatalogsRespOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional .exec.user.RequestStatus status = 1;
+ /**
+ * <code>optional .exec.user.RequestStatus status = 1;</code>
+ */
+ boolean hasStatus();
+ /**
+ * <code>optional .exec.user.RequestStatus status = 1;</code>
+ */
+ org.apache.drill.exec.proto.UserProtos.RequestStatus getStatus();
+
+ // repeated .exec.user.CatalogMetadata catalogs = 2;
+ /**
+ * <code>repeated .exec.user.CatalogMetadata catalogs = 2;</code>
+ */
+ java.util.List<org.apache.drill.exec.proto.UserProtos.CatalogMetadata>
+ getCatalogsList();
+ /**
+ * <code>repeated .exec.user.CatalogMetadata catalogs = 2;</code>
+ */
+ org.apache.drill.exec.proto.UserProtos.CatalogMetadata getCatalogs(int index);
+ /**
+ * <code>repeated .exec.user.CatalogMetadata catalogs = 2;</code>
+ */
+ int getCatalogsCount();
+ /**
+ * <code>repeated .exec.user.CatalogMetadata catalogs = 2;</code>
+ */
+ java.util.List<? extends org.apache.drill.exec.proto.UserProtos.CatalogMetadataOrBuilder>
+ getCatalogsOrBuilderList();
+ /**
+ * <code>repeated .exec.user.CatalogMetadata catalogs = 2;</code>
+ */
+ org.apache.drill.exec.proto.UserProtos.CatalogMetadataOrBuilder getCatalogsOrBuilder(
+ int index);
+
+ // optional .exec.shared.DrillPBError error = 3;
+ /**
+ * <code>optional .exec.shared.DrillPBError error = 3;</code>
+ */
+ boolean hasError();
+ /**
+ * <code>optional .exec.shared.DrillPBError error = 3;</code>
+ */
+ org.apache.drill.exec.proto.UserBitShared.DrillPBError getError();
+ /**
+ * <code>optional .exec.shared.DrillPBError error = 3;</code>
+ */
+ org.apache.drill.exec.proto.UserBitShared.DrillPBErrorOrBuilder getErrorOrBuilder();
+ }
+ /**
+ * Protobuf type {@code exec.user.GetCatalogsResp}
+ *
+ * <pre>
+ *
+ * Response message for GetCatalogReq.
+ * </pre>
+ */
+ public static final class GetCatalogsResp extends
+ com.google.protobuf.GeneratedMessage
+ implements GetCatalogsRespOrBuilder {
+ // Use GetCatalogsResp.newBuilder() to construct.
+ private GetCatalogsResp(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private GetCatalogsResp(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final GetCatalogsResp defaultInstance;
+ public static GetCatalogsResp getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public GetCatalogsResp getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private GetCatalogsResp(
+ 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: {
+ int rawValue = input.readEnum();
+ org.apache.drill.exec.proto.UserProtos.RequestStatus value = org.apache.drill.exec.proto.UserProtos.Requ
<TRUNCATED>