http://git-wip-us.apache.org/repos/asf/drill/blob/6bba69d4/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 afe8bfe..60ddc77 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 @@ -75,25 +75,41 @@ public final class UserProtos { */ RESUME_PAUSED_QUERY(6, 11), /** + * GET_QUERY_PLAN_FRAGMENTS = 12; + * + *
+     * to get plan fragments from query
+     * 
+ */ + GET_QUERY_PLAN_FRAGMENTS(7, 12), + /** * QUERY_DATA = 6; * *
      * bit to user
      * 
*/ - QUERY_DATA(7, 6), + QUERY_DATA(8, 6), /** * QUERY_HANDLE = 7; */ - QUERY_HANDLE(8, 7), + QUERY_HANDLE(9, 7), + /** + * QUERY_PLAN_FRAGMENTS = 13; + * + *
+     * return plan fragments 
+     * 
+ */ + QUERY_PLAN_FRAGMENTS(10, 13), /** * REQ_META_FUNCTIONS = 8; */ - REQ_META_FUNCTIONS(9, 8), + REQ_META_FUNCTIONS(11, 8), /** * RESP_FUNCTION_LIST = 9; */ - RESP_FUNCTION_LIST(10, 9), + RESP_FUNCTION_LIST(12, 9), /** * QUERY_RESULT = 10; * @@ -101,7 +117,7 @@ public final class UserProtos { * drillbit is reporting a query status change, most likely a terminal message, to the user * */ - QUERY_RESULT(11, 10), + QUERY_RESULT(13, 10), ; /** @@ -145,6 +161,14 @@ public final class UserProtos { */ public static final int RESUME_PAUSED_QUERY_VALUE = 11; /** + * GET_QUERY_PLAN_FRAGMENTS = 12; + * + *
+     * to get plan fragments from query
+     * 
+ */ + public static final int GET_QUERY_PLAN_FRAGMENTS_VALUE = 12; + /** * QUERY_DATA = 6; * *
@@ -157,6 +181,14 @@ public final class UserProtos {
      */
     public static final int QUERY_HANDLE_VALUE = 7;
     /**
+     * QUERY_PLAN_FRAGMENTS = 13;
+     *
+     * 
+     * return plan fragments 
+     * 
+ */ + public static final int QUERY_PLAN_FRAGMENTS_VALUE = 13; + /** * REQ_META_FUNCTIONS = 8; */ public static final int REQ_META_FUNCTIONS_VALUE = 8; @@ -185,8 +217,10 @@ public final class UserProtos { case 4: return CANCEL_QUERY; case 5: return REQUEST_RESULTS; case 11: return RESUME_PAUSED_QUERY; + case 12: return GET_QUERY_PLAN_FRAGMENTS; case 6: return QUERY_DATA; case 7: return QUERY_HANDLE; + case 13: return QUERY_PLAN_FRAGMENTS; case 8: return REQ_META_FUNCTIONS; case 9: return RESP_FUNCTION_LIST; case 10: return QUERY_RESULT; @@ -3533,6 +3567,31 @@ public final class UserProtos { */ com.google.protobuf.ByteString getPlanBytes(); + + // repeated .exec.bit.control.PlanFragment fragments = 4; + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + java.util.List + getFragmentsList(); + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + org.apache.drill.exec.proto.BitControl.PlanFragment getFragments(int index); + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + int getFragmentsCount(); + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + java.util.List + getFragmentsOrBuilderList(); + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder getFragmentsOrBuilder( + int index); } /** * Protobuf type {@code exec.user.RunQuery} @@ -3612,6 +3671,14 @@ public final class UserProtos { plan_ = input.readBytes(); break; } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + fragments_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + fragments_.add(input.readMessage(org.apache.drill.exec.proto.BitControl.PlanFragment.PARSER, extensionRegistry)); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -3620,6 +3687,9 @@ public final class UserProtos { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + fragments_ = java.util.Collections.unmodifiableList(fragments_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -3727,10 +3797,47 @@ public final class UserProtos { } } + // repeated .exec.bit.control.PlanFragment fragments = 4; + public static final int FRAGMENTS_FIELD_NUMBER = 4; + private java.util.List fragments_; + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public java.util.List getFragmentsList() { + return fragments_; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public java.util.List + getFragmentsOrBuilderList() { + return fragments_; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public int getFragmentsCount() { + return fragments_.size(); + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragment getFragments(int index) { + return fragments_.get(index); + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder getFragmentsOrBuilder( + int index) { + return fragments_.get(index); + } + private void initFields() { resultsMode_ = org.apache.drill.exec.proto.UserProtos.QueryResultsMode.STREAM_FULL; type_ = org.apache.drill.exec.proto.UserBitShared.QueryType.SQL; plan_ = ""; + fragments_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3753,6 +3860,9 @@ public final class UserProtos { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getPlanBytes()); } + for (int i = 0; i < fragments_.size(); i++) { + output.writeMessage(4, fragments_.get(i)); + } getUnknownFields().writeTo(output); } @@ -3774,6 +3884,10 @@ public final class UserProtos { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getPlanBytes()); } + for (int i = 0; i < fragments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, fragments_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -3882,6 +3996,7 @@ public final class UserProtos { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFragmentsFieldBuilder(); } } private static Builder create() { @@ -3896,6 +4011,12 @@ public final class UserProtos { bitField0_ = (bitField0_ & ~0x00000002); plan_ = ""; bitField0_ = (bitField0_ & ~0x00000004); + if (fragmentsBuilder_ == null) { + fragments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + fragmentsBuilder_.clear(); + } return this; } @@ -3936,6 +4057,15 @@ public final class UserProtos { to_bitField0_ |= 0x00000004; } result.plan_ = plan_; + if (fragmentsBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + fragments_ = java.util.Collections.unmodifiableList(fragments_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.fragments_ = fragments_; + } else { + result.fragments_ = fragmentsBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -3963,6 +4093,32 @@ public final class UserProtos { plan_ = other.plan_; onChanged(); } + if (fragmentsBuilder_ == null) { + if (!other.fragments_.isEmpty()) { + if (fragments_.isEmpty()) { + fragments_ = other.fragments_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureFragmentsIsMutable(); + fragments_.addAll(other.fragments_); + } + onChanged(); + } + } else { + if (!other.fragments_.isEmpty()) { + if (fragmentsBuilder_.isEmpty()) { + fragmentsBuilder_.dispose(); + fragmentsBuilder_ = null; + fragments_ = other.fragments_; + bitField0_ = (bitField0_ & ~0x00000008); + fragmentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFragmentsFieldBuilder() : null; + } else { + fragmentsBuilder_.addAllMessages(other.fragments_); + } + } + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -4136,6 +4292,246 @@ public final class UserProtos { return this; } + // repeated .exec.bit.control.PlanFragment fragments = 4; + private java.util.List fragments_ = + java.util.Collections.emptyList(); + private void ensureFragmentsIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + fragments_ = new java.util.ArrayList(fragments_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.drill.exec.proto.BitControl.PlanFragment, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder, org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder> fragmentsBuilder_; + + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public java.util.List getFragmentsList() { + if (fragmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fragments_); + } else { + return fragmentsBuilder_.getMessageList(); + } + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public int getFragmentsCount() { + if (fragmentsBuilder_ == null) { + return fragments_.size(); + } else { + return fragmentsBuilder_.getCount(); + } + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragment getFragments(int index) { + if (fragmentsBuilder_ == null) { + return fragments_.get(index); + } else { + return fragmentsBuilder_.getMessage(index); + } + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public Builder setFragments( + int index, org.apache.drill.exec.proto.BitControl.PlanFragment value) { + if (fragmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFragmentsIsMutable(); + fragments_.set(index, value); + onChanged(); + } else { + fragmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public Builder setFragments( + int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { + if (fragmentsBuilder_ == null) { + ensureFragmentsIsMutable(); + fragments_.set(index, builderForValue.build()); + onChanged(); + } else { + fragmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public Builder addFragments(org.apache.drill.exec.proto.BitControl.PlanFragment value) { + if (fragmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFragmentsIsMutable(); + fragments_.add(value); + onChanged(); + } else { + fragmentsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public Builder addFragments( + int index, org.apache.drill.exec.proto.BitControl.PlanFragment value) { + if (fragmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFragmentsIsMutable(); + fragments_.add(index, value); + onChanged(); + } else { + fragmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public Builder addFragments( + org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { + if (fragmentsBuilder_ == null) { + ensureFragmentsIsMutable(); + fragments_.add(builderForValue.build()); + onChanged(); + } else { + fragmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public Builder addFragments( + int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { + if (fragmentsBuilder_ == null) { + ensureFragmentsIsMutable(); + fragments_.add(index, builderForValue.build()); + onChanged(); + } else { + fragmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public Builder addAllFragments( + java.lang.Iterable values) { + if (fragmentsBuilder_ == null) { + ensureFragmentsIsMutable(); + super.addAll(values, fragments_); + onChanged(); + } else { + fragmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public Builder clearFragments() { + if (fragmentsBuilder_ == null) { + fragments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + fragmentsBuilder_.clear(); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public Builder removeFragments(int index) { + if (fragmentsBuilder_ == null) { + ensureFragmentsIsMutable(); + fragments_.remove(index); + onChanged(); + } else { + fragmentsBuilder_.remove(index); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragment.Builder getFragmentsBuilder( + int index) { + return getFragmentsFieldBuilder().getBuilder(index); + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder getFragmentsOrBuilder( + int index) { + if (fragmentsBuilder_ == null) { + return fragments_.get(index); } else { + return fragmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public java.util.List + getFragmentsOrBuilderList() { + if (fragmentsBuilder_ != null) { + return fragmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fragments_); + } + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragment.Builder addFragmentsBuilder() { + return getFragmentsFieldBuilder().addBuilder( + org.apache.drill.exec.proto.BitControl.PlanFragment.getDefaultInstance()); + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragment.Builder addFragmentsBuilder( + int index) { + return getFragmentsFieldBuilder().addBuilder( + index, org.apache.drill.exec.proto.BitControl.PlanFragment.getDefaultInstance()); + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 4; + */ + public java.util.List + getFragmentsBuilderList() { + return getFragmentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.drill.exec.proto.BitControl.PlanFragment, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder, org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder> + getFragmentsFieldBuilder() { + if (fragmentsBuilder_ == null) { + fragmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.drill.exec.proto.BitControl.PlanFragment, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder, org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder>( + fragments_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + fragments_ = null; + } + return fragmentsBuilder_; + } + // @@protoc_insertion_point(builder_scope:exec.user.RunQuery) } @@ -4147,78 +4543,63 @@ public final class UserProtos { // @@protoc_insertion_point(class_scope:exec.user.RunQuery) } - public interface BitToUserHandshakeOrBuilder + public interface GetQueryPlanFragmentsOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional int32 rpc_version = 2; - /** - * optional int32 rpc_version = 2; - */ - boolean hasRpcVersion(); + // required string query = 1; /** - * optional int32 rpc_version = 2; + * required string query = 1; */ - int getRpcVersion(); - - // optional .exec.user.HandshakeStatus status = 3; + boolean hasQuery(); /** - * optional .exec.user.HandshakeStatus status = 3; + * required string query = 1; */ - boolean hasStatus(); + java.lang.String getQuery(); /** - * optional .exec.user.HandshakeStatus status = 3; + * required string query = 1; */ - org.apache.drill.exec.proto.UserProtos.HandshakeStatus getStatus(); + com.google.protobuf.ByteString + getQueryBytes(); - // optional string errorId = 4; - /** - * optional string errorId = 4; - */ - boolean hasErrorId(); + // optional .exec.shared.QueryType type = 2; /** - * optional string errorId = 4; + * optional .exec.shared.QueryType type = 2; */ - java.lang.String getErrorId(); + boolean hasType(); /** - * optional string errorId = 4; + * optional .exec.shared.QueryType type = 2; */ - com.google.protobuf.ByteString - getErrorIdBytes(); + org.apache.drill.exec.proto.UserBitShared.QueryType getType(); - // optional string errorMessage = 5; - /** - * optional string errorMessage = 5; - */ - boolean hasErrorMessage(); + // optional bool split_plan = 3 [default = false]; /** - * optional string errorMessage = 5; + * optional bool split_plan = 3 [default = false]; */ - java.lang.String getErrorMessage(); + boolean hasSplitPlan(); /** - * optional string errorMessage = 5; + * optional bool split_plan = 3 [default = false]; */ - com.google.protobuf.ByteString - getErrorMessageBytes(); + boolean getSplitPlan(); } /** - * Protobuf type {@code exec.user.BitToUserHandshake} + * Protobuf type {@code exec.user.GetQueryPlanFragments} */ - public static final class BitToUserHandshake extends + public static final class GetQueryPlanFragments extends com.google.protobuf.GeneratedMessage - implements BitToUserHandshakeOrBuilder { - // Use BitToUserHandshake.newBuilder() to construct. - private BitToUserHandshake(com.google.protobuf.GeneratedMessage.Builder builder) { + implements GetQueryPlanFragmentsOrBuilder { + // Use GetQueryPlanFragments.newBuilder() to construct. + private GetQueryPlanFragments(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private BitToUserHandshake(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private GetQueryPlanFragments(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final BitToUserHandshake defaultInstance; - public static BitToUserHandshake getDefaultInstance() { + private static final GetQueryPlanFragments defaultInstance; + public static GetQueryPlanFragments getDefaultInstance() { return defaultInstance; } - public BitToUserHandshake getDefaultInstanceForType() { + public GetQueryPlanFragments getDefaultInstanceForType() { return defaultInstance; } @@ -4228,7 +4609,7 @@ public final class UserProtos { getUnknownFields() { return this.unknownFields; } - private BitToUserHandshake( + private GetQueryPlanFragments( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4251,19 +4632,1843 @@ public final class UserProtos { } break; } - case 16: { + case 10: { bitField0_ |= 0x00000001; - rpcVersion_ = input.readInt32(); + query_ = input.readBytes(); break; } - case 24: { + case 16: { int rawValue = input.readEnum(); - org.apache.drill.exec.proto.UserProtos.HandshakeStatus value = org.apache.drill.exec.proto.UserProtos.HandshakeStatus.valueOf(rawValue); + org.apache.drill.exec.proto.UserBitShared.QueryType value = org.apache.drill.exec.proto.UserBitShared.QueryType.valueOf(rawValue); if (value == null) { - unknownFields.mergeVarintField(3, rawValue); + unknownFields.mergeVarintField(2, rawValue); } else { bitField0_ |= 0x00000002; - status_ = value; + type_ = value; + } + break; + } + case 24: { + bitField0_ |= 0x00000004; + splitPlan_ = 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.UserProtos.internal_static_exec_user_GetQueryPlanFragments_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_GetQueryPlanFragments_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments.class, org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetQueryPlanFragments parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetQueryPlanFragments(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string query = 1; + public static final int QUERY_FIELD_NUMBER = 1; + private java.lang.Object query_; + /** + * required string query = 1; + */ + public boolean hasQuery() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string query = 1; + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + 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()) { + query_ = s; + } + return s; + } + } + /** + * required string query = 1; + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .exec.shared.QueryType type = 2; + public static final int TYPE_FIELD_NUMBER = 2; + private org.apache.drill.exec.proto.UserBitShared.QueryType type_; + /** + * optional .exec.shared.QueryType type = 2; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .exec.shared.QueryType type = 2; + */ + public org.apache.drill.exec.proto.UserBitShared.QueryType getType() { + return type_; + } + + // optional bool split_plan = 3 [default = false]; + public static final int SPLIT_PLAN_FIELD_NUMBER = 3; + private boolean splitPlan_; + /** + * optional bool split_plan = 3 [default = false]; + */ + public boolean hasSplitPlan() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool split_plan = 3 [default = false]; + */ + public boolean getSplitPlan() { + return splitPlan_; + } + + private void initFields() { + query_ = ""; + type_ = org.apache.drill.exec.proto.UserBitShared.QueryType.SQL; + splitPlan_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasQuery()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getQueryBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(3, splitPlan_); + } + 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, getQueryBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, splitPlan_); + } + 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.GetQueryPlanFragments parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments 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.GetQueryPlanFragments parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments 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.GetQueryPlanFragments parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments 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.GetQueryPlanFragments parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments 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.GetQueryPlanFragments parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments 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.GetQueryPlanFragments 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.GetQueryPlanFragments} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragmentsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_GetQueryPlanFragments_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_GetQueryPlanFragments_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments.class, org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments.Builder.class); + } + + // Construct using org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments.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(); + query_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + type_ = org.apache.drill.exec.proto.UserBitShared.QueryType.SQL; + bitField0_ = (bitField0_ & ~0x00000002); + splitPlan_ = false; + 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_GetQueryPlanFragments_descriptor; + } + + public org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments getDefaultInstanceForType() { + return org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments.getDefaultInstance(); + } + + public org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments build() { + org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments buildPartial() { + org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments result = new org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.query_ = query_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.splitPlan_ = splitPlan_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments) { + return mergeFrom((org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments other) { + if (other == org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments.getDefaultInstance()) return this; + if (other.hasQuery()) { + bitField0_ |= 0x00000001; + query_ = other.query_; + onChanged(); + } + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasSplitPlan()) { + setSplitPlan(other.getSplitPlan()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasQuery()) { + + return false; + } + 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.GetQueryPlanFragments parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.drill.exec.proto.UserProtos.GetQueryPlanFragments) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string query = 1; + private java.lang.Object query_ = ""; + /** + * required string query = 1; + */ + public boolean hasQuery() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string query = 1; + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string query = 1; + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string query = 1; + */ + public Builder setQuery( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + query_ = value; + onChanged(); + return this; + } + /** + * required string query = 1; + */ + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000001); + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + /** + * required string query = 1; + */ + public Builder setQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + query_ = value; + onChanged(); + return this; + } + + // optional .exec.shared.QueryType type = 2; + private org.apache.drill.exec.proto.UserBitShared.QueryType type_ = org.apache.drill.exec.proto.UserBitShared.QueryType.SQL; + /** + * optional .exec.shared.QueryType type = 2; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .exec.shared.QueryType type = 2; + */ + public org.apache.drill.exec.proto.UserBitShared.QueryType getType() { + return type_; + } + /** + * optional .exec.shared.QueryType type = 2; + */ + public Builder setType(org.apache.drill.exec.proto.UserBitShared.QueryType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value; + onChanged(); + return this; + } + /** + * optional .exec.shared.QueryType type = 2; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = org.apache.drill.exec.proto.UserBitShared.QueryType.SQL; + onChanged(); + return this; + } + + // optional bool split_plan = 3 [default = false]; + private boolean splitPlan_ ; + /** + * optional bool split_plan = 3 [default = false]; + */ + public boolean hasSplitPlan() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool split_plan = 3 [default = false]; + */ + public boolean getSplitPlan() { + return splitPlan_; + } + /** + * optional bool split_plan = 3 [default = false]; + */ + public Builder setSplitPlan(boolean value) { + bitField0_ |= 0x00000004; + splitPlan_ = value; + onChanged(); + return this; + } + /** + * optional bool split_plan = 3 [default = false]; + */ + public Builder clearSplitPlan() { + bitField0_ = (bitField0_ & ~0x00000004); + splitPlan_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:exec.user.GetQueryPlanFragments) + } + + static { + defaultInstance = new GetQueryPlanFragments(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:exec.user.GetQueryPlanFragments) + } + + public interface QueryPlanFragmentsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .exec.shared.QueryResult.QueryState status = 1; + /** + * required .exec.shared.QueryResult.QueryState status = 1; + */ + boolean hasStatus(); + /** + * required .exec.shared.QueryResult.QueryState status = 1; + */ + org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState getStatus(); + + // optional .exec.shared.QueryId query_id = 2; + /** + * optional .exec.shared.QueryId query_id = 2; + */ + boolean hasQueryId(); + /** + * optional .exec.shared.QueryId query_id = 2; + */ + org.apache.drill.exec.proto.UserBitShared.QueryId getQueryId(); + /** + * optional .exec.shared.QueryId query_id = 2; + */ + org.apache.drill.exec.proto.UserBitShared.QueryIdOrBuilder getQueryIdOrBuilder(); + + // repeated .exec.bit.control.PlanFragment fragments = 3; + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + java.util.List + getFragmentsList(); + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + org.apache.drill.exec.proto.BitControl.PlanFragment getFragments(int index); + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + int getFragmentsCount(); + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + java.util.List + getFragmentsOrBuilderList(); + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder getFragmentsOrBuilder( + int index); + + // optional .exec.shared.DrillPBError error = 4; + /** + * optional .exec.shared.DrillPBError error = 4; + */ + boolean hasError(); + /** + * optional .exec.shared.DrillPBError error = 4; + */ + org.apache.drill.exec.proto.UserBitShared.DrillPBError getError(); + /** + * optional .exec.shared.DrillPBError error = 4; + */ + org.apache.drill.exec.proto.UserBitShared.DrillPBErrorOrBuilder getErrorOrBuilder(); + } + /** + * Protobuf type {@code exec.user.QueryPlanFragments} + */ + public static final class QueryPlanFragments extends + com.google.protobuf.GeneratedMessage + implements QueryPlanFragmentsOrBuilder { + // Use QueryPlanFragments.newBuilder() to construct. + private QueryPlanFragments(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private QueryPlanFragments(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final QueryPlanFragments defaultInstance; + public static QueryPlanFragments getDefaultInstance() { + return defaultInstance; + } + + public QueryPlanFragments getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QueryPlanFragments( + 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.UserBitShared.QueryResult.QueryState value = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + status_ = value; + } + break; + } + case 18: { + org.apache.drill.exec.proto.UserBitShared.QueryId.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = queryId_.toBuilder(); + } + queryId_ = input.readMessage(org.apache.drill.exec.proto.UserBitShared.QueryId.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(queryId_); + queryId_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000002; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + fragments_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + fragments_.add(input.readMessage(org.apache.drill.exec.proto.BitControl.PlanFragment.PARSER, extensionRegistry)); + break; + } + case 34: { + org.apache.drill.exec.proto.UserBitShared.DrillPBError.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(org.apache.drill.exec.proto.UserBitShared.DrillPBError.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = 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 { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + fragments_ = java.util.Collections.unmodifiableList(fragments_); + } + 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_QueryPlanFragments_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_QueryPlanFragments_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.drill.exec.proto.UserProtos.QueryPlanFragments.class, org.apache.drill.exec.proto.UserProtos.QueryPlanFragments.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public QueryPlanFragments parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueryPlanFragments(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required .exec.shared.QueryResult.QueryState status = 1; + public static final int STATUS_FIELD_NUMBER = 1; + private org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState status_; + /** + * required .exec.shared.QueryResult.QueryState status = 1; + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .exec.shared.QueryResult.QueryState status = 1; + */ + public org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState getStatus() { + return status_; + } + + // optional .exec.shared.QueryId query_id = 2; + public static final int QUERY_ID_FIELD_NUMBER = 2; + private org.apache.drill.exec.proto.UserBitShared.QueryId queryId_; + /** + * optional .exec.shared.QueryId query_id = 2; + */ + public boolean hasQueryId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .exec.shared.QueryId query_id = 2; + */ + public org.apache.drill.exec.proto.UserBitShared.QueryId getQueryId() { + return queryId_; + } + /** + * optional .exec.shared.QueryId query_id = 2; + */ + public org.apache.drill.exec.proto.UserBitShared.QueryIdOrBuilder getQueryIdOrBuilder() { + return queryId_; + } + + // repeated .exec.bit.control.PlanFragment fragments = 3; + public static final int FRAGMENTS_FIELD_NUMBER = 3; + private java.util.List fragments_; + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public java.util.List getFragmentsList() { + return fragments_; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public java.util.List + getFragmentsOrBuilderList() { + return fragments_; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public int getFragmentsCount() { + return fragments_.size(); + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragment getFragments(int index) { + return fragments_.get(index); + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder getFragmentsOrBuilder( + int index) { + return fragments_.get(index); + } + + // optional .exec.shared.DrillPBError error = 4; + public static final int ERROR_FIELD_NUMBER = 4; + private org.apache.drill.exec.proto.UserBitShared.DrillPBError error_; + /** + * optional .exec.shared.DrillPBError error = 4; + */ + public boolean hasError() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .exec.shared.DrillPBError error = 4; + */ + public org.apache.drill.exec.proto.UserBitShared.DrillPBError getError() { + return error_; + } + /** + * optional .exec.shared.DrillPBError error = 4; + */ + public org.apache.drill.exec.proto.UserBitShared.DrillPBErrorOrBuilder getErrorOrBuilder() { + return error_; + } + + private void initFields() { + status_ = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.STARTING; + queryId_ = org.apache.drill.exec.proto.UserBitShared.QueryId.getDefaultInstance(); + fragments_ = java.util.Collections.emptyList(); + error_ = org.apache.drill.exec.proto.UserBitShared.DrillPBError.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasStatus()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, status_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, queryId_); + } + for (int i = 0; i < fragments_.size(); i++) { + output.writeMessage(3, fragments_.get(i)); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(4, error_); + } + 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 + .computeEnumSize(1, status_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, queryId_); + } + for (int i = 0; i < fragments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, fragments_.get(i)); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, error_); + } + 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.QueryPlanFragments parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.drill.exec.proto.UserProtos.QueryPlanFragments 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.QueryPlanFragments parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.drill.exec.proto.UserProtos.QueryPlanFragments 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.QueryPlanFragments parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.drill.exec.proto.UserProtos.QueryPlanFragments 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.QueryPlanFragments parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.drill.exec.proto.UserProtos.QueryPlanFragments 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.QueryPlanFragments parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.drill.exec.proto.UserProtos.QueryPlanFragments 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.QueryPlanFragments 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.QueryPlanFragments} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.drill.exec.proto.UserProtos.QueryPlanFragmentsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_QueryPlanFragments_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.drill.exec.proto.UserProtos.internal_static_exec_user_QueryPlanFragments_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.drill.exec.proto.UserProtos.QueryPlanFragments.class, org.apache.drill.exec.proto.UserProtos.QueryPlanFragments.Builder.class); + } + + // Construct using org.apache.drill.exec.proto.UserProtos.QueryPlanFragments.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getQueryIdFieldBuilder(); + getFragmentsFieldBuilder(); + getErrorFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + status_ = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.STARTING; + bitField0_ = (bitField0_ & ~0x00000001); + if (queryIdBuilder_ == null) { + queryId_ = org.apache.drill.exec.proto.UserBitShared.QueryId.getDefaultInstance(); + } else { + queryIdBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (fragmentsBuilder_ == null) { + fragments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + fragmentsBuilder_.clear(); + } + if (errorBuilder_ == null) { + error_ = org.apache.drill.exec.proto.UserBitShared.DrillPBError.getDefaultInstance(); + } else { + errorBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + 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_QueryPlanFragments_descriptor; + } + + public org.apache.drill.exec.proto.UserProtos.QueryPlanFragments getDefaultInstanceForType() { + return org.apache.drill.exec.proto.UserProtos.QueryPlanFragments.getDefaultInstance(); + } + + public org.apache.drill.exec.proto.UserProtos.QueryPlanFragments build() { + org.apache.drill.exec.proto.UserProtos.QueryPlanFragments result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.drill.exec.proto.UserProtos.QueryPlanFragments buildPartial() { + org.apache.drill.exec.proto.UserProtos.QueryPlanFragments result = new org.apache.drill.exec.proto.UserProtos.QueryPlanFragments(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.status_ = status_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (queryIdBuilder_ == null) { + result.queryId_ = queryId_; + } else { + result.queryId_ = queryIdBuilder_.build(); + } + if (fragmentsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + fragments_ = java.util.Collections.unmodifiableList(fragments_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.fragments_ = fragments_; + } else { + result.fragments_ = fragmentsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.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.QueryPlanFragments) { + return mergeFrom((org.apache.drill.exec.proto.UserProtos.QueryPlanFragments)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.drill.exec.proto.UserProtos.QueryPlanFragments other) { + if (other == org.apache.drill.exec.proto.UserProtos.QueryPlanFragments.getDefaultInstance()) return this; + if (other.hasStatus()) { + setStatus(other.getStatus()); + } + if (other.hasQueryId()) { + mergeQueryId(other.getQueryId()); + } + if (fragmentsBuilder_ == null) { + if (!other.fragments_.isEmpty()) { + if (fragments_.isEmpty()) { + fragments_ = other.fragments_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureFragmentsIsMutable(); + fragments_.addAll(other.fragments_); + } + onChanged(); + } + } else { + if (!other.fragments_.isEmpty()) { + if (fragmentsBuilder_.isEmpty()) { + fragmentsBuilder_.dispose(); + fragmentsBuilder_ = null; + fragments_ = other.fragments_; + bitField0_ = (bitField0_ & ~0x00000004); + fragmentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFragmentsFieldBuilder() : null; + } else { + fragmentsBuilder_.addAllMessages(other.fragments_); + } + } + } + if (other.hasError()) { + mergeError(other.getError()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasStatus()) { + + return false; + } + 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.QueryPlanFragments parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.drill.exec.proto.UserProtos.QueryPlanFragments) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required .exec.shared.QueryResult.QueryState status = 1; + private org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState status_ = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.STARTING; + /** + * required .exec.shared.QueryResult.QueryState status = 1; + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .exec.shared.QueryResult.QueryState status = 1; + */ + public org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState getStatus() { + return status_; + } + /** + * required .exec.shared.QueryResult.QueryState status = 1; + */ + public Builder setStatus(org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + status_ = value; + onChanged(); + return this; + } + /** + * required .exec.shared.QueryResult.QueryState status = 1; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + status_ = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.STARTING; + onChanged(); + return this; + } + + // optional .exec.shared.QueryId query_id = 2; + private org.apache.drill.exec.proto.UserBitShared.QueryId queryId_ = org.apache.drill.exec.proto.UserBitShared.QueryId.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.drill.exec.proto.UserBitShared.QueryId, org.apache.drill.exec.proto.UserBitShared.QueryId.Builder, org.apache.drill.exec.proto.UserBitShared.QueryIdOrBuilder> queryIdBuilder_; + /** + * optional .exec.shared.QueryId query_id = 2; + */ + public boolean hasQueryId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .exec.shared.QueryId query_id = 2; + */ + public org.apache.drill.exec.proto.UserBitShared.QueryId getQueryId() { + if (queryIdBuilder_ == null) { + return queryId_; + } else { + return queryIdBuilder_.getMessage(); + } + } + /** + * optional .exec.shared.QueryId query_id = 2; + */ + public Builder setQueryId(org.apache.drill.exec.proto.UserBitShared.QueryId value) { + if (queryIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryId_ = value; + onChanged(); + } else { + queryIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .exec.shared.QueryId query_id = 2; + */ + public Builder setQueryId( + org.apache.drill.exec.proto.UserBitShared.QueryId.Builder builderForValue) { + if (queryIdBuilder_ == null) { + queryId_ = builderForValue.build(); + onChanged(); + } else { + queryIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .exec.shared.QueryId query_id = 2; + */ + public Builder mergeQueryId(org.apache.drill.exec.proto.UserBitShared.QueryId value) { + if (queryIdBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + queryId_ != org.apache.drill.exec.proto.UserBitShared.QueryId.getDefaultInstance()) { + queryId_ = + org.apache.drill.exec.proto.UserBitShared.QueryId.newBuilder(queryId_).mergeFrom(value).buildPartial(); + } else { + queryId_ = value; + } + onChanged(); + } else { + queryIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * optional .exec.shared.QueryId query_id = 2; + */ + public Builder clearQueryId() { + if (queryIdBuilder_ == null) { + queryId_ = org.apache.drill.exec.proto.UserBitShared.QueryId.getDefaultInstance(); + onChanged(); + } else { + queryIdBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + /** + * optional .exec.shared.QueryId query_id = 2; + */ + public org.apache.drill.exec.proto.UserBitShared.QueryId.Builder getQueryIdBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getQueryIdFieldBuilder().getBuilder(); + } + /** + * optional .exec.shared.QueryId query_id = 2; + */ + public org.apache.drill.exec.proto.UserBitShared.QueryIdOrBuilder getQueryIdOrBuilder() { + if (queryIdBuilder_ != null) { + return queryIdBuilder_.getMessageOrBuilder(); + } else { + return queryId_; + } + } + /** + * optional .exec.shared.QueryId query_id = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + org.apache.drill.exec.proto.UserBitShared.QueryId, org.apache.drill.exec.proto.UserBitShared.QueryId.Builder, org.apache.drill.exec.proto.UserBitShared.QueryIdOrBuilder> + getQueryIdFieldBuilder() { + if (queryIdBuilder_ == null) { + queryIdBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.drill.exec.proto.UserBitShared.QueryId, org.apache.drill.exec.proto.UserBitShared.QueryId.Builder, org.apache.drill.exec.proto.UserBitShared.QueryIdOrBuilder>( + queryId_, + getParentForChildren(), + isClean()); + queryId_ = null; + } + return queryIdBuilder_; + } + + // repeated .exec.bit.control.PlanFragment fragments = 3; + private java.util.List fragments_ = + java.util.Collections.emptyList(); + private void ensureFragmentsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + fragments_ = new java.util.ArrayList(fragments_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.drill.exec.proto.BitControl.PlanFragment, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder, org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder> fragmentsBuilder_; + + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public java.util.List getFragmentsList() { + if (fragmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fragments_); + } else { + return fragmentsBuilder_.getMessageList(); + } + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public int getFragmentsCount() { + if (fragmentsBuilder_ == null) { + return fragments_.size(); + } else { + return fragmentsBuilder_.getCount(); + } + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragment getFragments(int index) { + if (fragmentsBuilder_ == null) { + return fragments_.get(index); + } else { + return fragmentsBuilder_.getMessage(index); + } + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public Builder setFragments( + int index, org.apache.drill.exec.proto.BitControl.PlanFragment value) { + if (fragmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFragmentsIsMutable(); + fragments_.set(index, value); + onChanged(); + } else { + fragmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public Builder setFragments( + int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { + if (fragmentsBuilder_ == null) { + ensureFragmentsIsMutable(); + fragments_.set(index, builderForValue.build()); + onChanged(); + } else { + fragmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public Builder addFragments(org.apache.drill.exec.proto.BitControl.PlanFragment value) { + if (fragmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFragmentsIsMutable(); + fragments_.add(value); + onChanged(); + } else { + fragmentsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public Builder addFragments( + int index, org.apache.drill.exec.proto.BitControl.PlanFragment value) { + if (fragmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFragmentsIsMutable(); + fragments_.add(index, value); + onChanged(); + } else { + fragmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public Builder addFragments( + org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { + if (fragmentsBuilder_ == null) { + ensureFragmentsIsMutable(); + fragments_.add(builderForValue.build()); + onChanged(); + } else { + fragmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public Builder addFragments( + int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) { + if (fragmentsBuilder_ == null) { + ensureFragmentsIsMutable(); + fragments_.add(index, builderForValue.build()); + onChanged(); + } else { + fragmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public Builder addAllFragments( + java.lang.Iterable values) { + if (fragmentsBuilder_ == null) { + ensureFragmentsIsMutable(); + super.addAll(values, fragments_); + onChanged(); + } else { + fragmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public Builder clearFragments() { + if (fragmentsBuilder_ == null) { + fragments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + fragmentsBuilder_.clear(); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public Builder removeFragments(int index) { + if (fragmentsBuilder_ == null) { + ensureFragmentsIsMutable(); + fragments_.remove(index); + onChanged(); + } else { + fragmentsBuilder_.remove(index); + } + return this; + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragment.Builder getFragmentsBuilder( + int index) { + return getFragmentsFieldBuilder().getBuilder(index); + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder getFragmentsOrBuilder( + int index) { + if (fragmentsBuilder_ == null) { + return fragments_.get(index); } else { + return fragmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public java.util.List + getFragmentsOrBuilderList() { + if (fragmentsBuilder_ != null) { + return fragmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fragments_); + } + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragment.Builder addFragmentsBuilder() { + return getFragmentsFieldBuilder().addBuilder( + org.apache.drill.exec.proto.BitControl.PlanFragment.getDefaultInstance()); + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public org.apache.drill.exec.proto.BitControl.PlanFragment.Builder addFragmentsBuilder( + int index) { + return getFragmentsFieldBuilder().addBuilder( + index, org.apache.drill.exec.proto.BitControl.PlanFragment.getDefaultInstance()); + } + /** + * repeated .exec.bit.control.PlanFragment fragments = 3; + */ + public java.util.List + getFragmentsBuilderList() { + return getFragmentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.drill.exec.proto.BitControl.PlanFragment, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder, org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder> + getFragmentsFieldBuilder() { + if (fragmentsBuilder_ == null) { + fragmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.drill.exec.proto.BitControl.PlanFragment, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder, org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder>( + fragments_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + fragments_ = null; + } + return fragmentsBuilder_; + } + + // optional .exec.shared.DrillPBError error = 4; + private org.apache.drill.exec.proto.UserBitShared.DrillPBError error_ = org.apache.drill.exec.proto.UserBitShared.DrillPBError.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.drill.exec.proto.UserBitShared.DrillPBError, org.apache.drill.exec.proto.UserBitShared.DrillPBError.Builder, org.apache.drill.exec.proto.UserBitShared.DrillPBErrorOrBuilder> errorBuilder_; + /** + * optional .exec.shared.DrillPBError error = 4; + */ + public boolean hasError() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .exec.shared.DrillPBError error = 4; + */ + public org.apache.drill.exec.proto.UserBitShared.DrillPBError getError() { + if (errorBuilder_ == null) { + return error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * optional .exec.shared.DrillPBError error = 4; + */ + public Builder setError(org.apache.drill.exec.proto.UserBitShared.DrillPBError value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .exec.shared.DrillPBError error = 4; + */ + public Builder setError( + org.apache.drill.exec.proto.UserBitShared.DrillPBError.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .exec.shared.DrillPBError error = 4; + */ + public Builder mergeError(org.apache.drill.exec.proto.UserBitShared.DrillPBError value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + error_ != org.apache.drill.exec.proto.UserBitShared.DrillPBError.getDefaultInstance()) { + error_ = + org.apache.drill.exec.proto.UserBitShared.DrillPBError.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .exec.shared.DrillPBError error = 4; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = org.apache.drill.exec.proto.UserBitShared.DrillPBError.getDefaultInstance(); + onChanged(); + } else { + errorBuilder_.clear(); + } + bitField0_