DRILL-1585: C++ Client - Update RPC version and protobuf definitions for RPC version 3
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/1d7f6211 Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/1d7f6211 Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/1d7f6211 Branch: refs/heads/master Commit: 1d7f6211c19712f2db12a913ea5cb990d4963ec3 Parents: 76df2ff Author: Parth Chandra <[email protected]> Authored: Thu Nov 6 18:20:17 2014 -0800 Committer: Jinfeng Ni <[email protected]> Committed: Fri Nov 7 10:50:56 2014 -0800 ---------------------------------------------------------------------- .../native/client/src/include/drill/common.hpp | 2 +- .../native/client/src/protobuf/BitControl.pb.cc | 287 ++++- .../native/client/src/protobuf/BitControl.pb.h | 117 +- .../native/client/src/protobuf/GeneralRPC.pb.cc | 399 +------ .../native/client/src/protobuf/GeneralRPC.pb.h | 311 ----- .../client/src/protobuf/UserBitShared.pb.cc | 1106 ++++++++++++++++-- .../client/src/protobuf/UserBitShared.pb.h | 795 ++++++++++++- 7 files changed, 2169 insertions(+), 848 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/1d7f6211/contrib/native/client/src/include/drill/common.hpp ---------------------------------------------------------------------- diff --git a/contrib/native/client/src/include/drill/common.hpp b/contrib/native/client/src/include/drill/common.hpp index c49240e..59537f1 100644 --- a/contrib/native/client/src/include/drill/common.hpp +++ b/contrib/native/client/src/include/drill/common.hpp @@ -33,7 +33,7 @@ #include <vector> #include <boost/shared_ptr.hpp> -#define DRILL_RPC_VERSION 2 +#define DRILL_RPC_VERSION 3 #define LENGTH_PREFIX_MAX_LENGTH 5 #define LEN_PREFIX_BUFLEN LENGTH_PREFIX_MAX_LENGTH http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/1d7f6211/contrib/native/client/src/protobuf/BitControl.pb.cc ---------------------------------------------------------------------- diff --git a/contrib/native/client/src/protobuf/BitControl.pb.cc b/contrib/native/client/src/protobuf/BitControl.pb.cc index a762386..64ab783 100644 --- a/contrib/native/client/src/protobuf/BitControl.pb.cc +++ b/contrib/native/client/src/protobuf/BitControl.pb.cc @@ -31,6 +31,9 @@ const ::google::protobuf::internal::GeneratedMessageReflection* const ::google::protobuf::Descriptor* FragmentStatus_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* FragmentStatus_reflection_ = NULL; +const ::google::protobuf::Descriptor* InitializeFragments_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + InitializeFragments_reflection_ = NULL; const ::google::protobuf::Descriptor* PlanFragment_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* PlanFragment_reflection_ = NULL; @@ -99,7 +102,22 @@ void protobuf_AssignDesc_BitControl_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(FragmentStatus)); - PlanFragment_descriptor_ = file->message_type(3); + InitializeFragments_descriptor_ = file->message_type(3); + static const int InitializeFragments_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InitializeFragments, fragment_), + }; + InitializeFragments_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + InitializeFragments_descriptor_, + InitializeFragments::default_instance_, + InitializeFragments_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InitializeFragments, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InitializeFragments, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(InitializeFragments)); + PlanFragment_descriptor_ = file->message_type(4); static const int PlanFragment_offsets_[15] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, handle_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlanFragment, network_cost_), @@ -128,7 +146,7 @@ void protobuf_AssignDesc_BitControl_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(PlanFragment)); - WorkQueueStatus_descriptor_ = file->message_type(4); + WorkQueueStatus_descriptor_ = file->message_type(5); static const int WorkQueueStatus_offsets_[3] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WorkQueueStatus, endpoint_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WorkQueueStatus, queue_length_), @@ -145,7 +163,7 @@ void protobuf_AssignDesc_BitControl_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(WorkQueueStatus)); - FinishedReceiver_descriptor_ = file->message_type(5); + FinishedReceiver_descriptor_ = file->message_type(6); static const int FinishedReceiver_offsets_[2] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FinishedReceiver, receiver_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FinishedReceiver, sender_), @@ -181,6 +199,8 @@ void protobuf_RegisterTypes(const ::std::string&) { ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( FragmentStatus_descriptor_, &FragmentStatus::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + InitializeFragments_descriptor_, &InitializeFragments::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( PlanFragment_descriptor_, &PlanFragment::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( WorkQueueStatus_descriptor_, &WorkQueueStatus::default_instance()); @@ -197,6 +217,8 @@ void protobuf_ShutdownFile_BitControl_2eproto() { delete BitStatus_reflection_; delete FragmentStatus::default_instance_; delete FragmentStatus_reflection_; + delete InitializeFragments::default_instance_; + delete InitializeFragments_reflection_; delete PlanFragment::default_instance_; delete PlanFragment_reflection_; delete WorkQueueStatus::default_instance_; @@ -225,43 +247,47 @@ void protobuf_AddDesc_BitControl_2eproto() { "2 .exec.bit.control.FragmentStatus\"n\n\016Fr" "agmentStatus\0222\n\007profile\030\001 \001(\0132!.exec.sha" "red.MinorFragmentProfile\022(\n\006handle\030\002 \001(\013" - "2\030.exec.bit.FragmentHandle\"\275\003\n\014PlanFragm" - "ent\022(\n\006handle\030\001 \001(\0132\030.exec.bit.FragmentH" - "andle\022\024\n\014network_cost\030\004 \001(\002\022\020\n\010cpu_cost\030" - "\005 \001(\002\022\021\n\tdisk_cost\030\006 \001(\002\022\023\n\013memory_cost\030" - "\007 \001(\002\022\025\n\rfragment_json\030\010 \001(\t\022*\n\nassignme" - "nt\030\n \001(\0132\026.exec.DrillbitEndpoint\022\025\n\rleaf" - "_fragment\030\t \001(\010\022\'\n\007foreman\030\013 \001(\0132\026.exec." - "DrillbitEndpoint\022\035\n\013mem_initial\030\014 \001(\003:\0102" - "0000000\022\033\n\007mem_max\030\r \001(\003:\n2000000000\022\030\n\020" - "query_start_time\030\016 \001(\003\0221\n\013credentials\030\017 " - "\001(\0132\034.exec.shared.UserCredentials\022\021\n\ttim" - "e_zone\030\020 \001(\005\022\024\n\014options_json\030\021 \001(\t\"f\n\017Wo" - "rkQueueStatus\022(\n\010endpoint\030\001 \001(\0132\026.exec.D" - "rillbitEndpoint\022\024\n\014queue_length\030\002 \001(\005\022\023\n" - "\013report_time\030\003 \001(\003\"h\n\020FinishedReceiver\022*" - "\n\010receiver\030\001 \001(\0132\030.exec.bit.FragmentHand" - "le\022(\n\006sender\030\002 \001(\0132\030.exec.bit.FragmentHa" - "ndle*\242\002\n\007RpcType\022\r\n\tHANDSHAKE\020\000\022\007\n\003ACK\020\001" - "\022\013\n\007GOODBYE\020\002\022\033\n\027REQ_INIATILIZE_FRAGMENT" - "\020\003\022\027\n\023REQ_CANCEL_FRAGMENT\020\006\022\031\n\025REQ_RECEI" - "VER_FINISHED\020\007\022\027\n\023REQ_FRAGMENT_STATUS\020\010\022" - "\022\n\016REQ_BIT_STATUS\020\t\022\024\n\020REQ_QUERY_STATUS\020" - "\n\022\030\n\024RESP_FRAGMENT_HANDLE\020\013\022\030\n\024RESP_FRAG" - "MENT_STATUS\020\014\022\023\n\017RESP_BIT_STATUS\020\r\022\025\n\021RE" - "SP_QUERY_STATUS\020\016B+\n\033org.apache.drill.ex" - "ec.protoB\nBitControlH\001", 1422); + "2\030.exec.bit.FragmentHandle\"G\n\023Initialize" + "Fragments\0220\n\010fragment\030\001 \003(\0132\036.exec.bit.c" + "ontrol.PlanFragment\"\275\003\n\014PlanFragment\022(\n\006" + "handle\030\001 \001(\0132\030.exec.bit.FragmentHandle\022\024" + "\n\014network_cost\030\004 \001(\002\022\020\n\010cpu_cost\030\005 \001(\002\022\021" + "\n\tdisk_cost\030\006 \001(\002\022\023\n\013memory_cost\030\007 \001(\002\022\025" + "\n\rfragment_json\030\010 \001(\t\022*\n\nassignment\030\n \001(" + "\0132\026.exec.DrillbitEndpoint\022\025\n\rleaf_fragme" + "nt\030\t \001(\010\022\'\n\007foreman\030\013 \001(\0132\026.exec.Drillbi" + "tEndpoint\022\035\n\013mem_initial\030\014 \001(\003:\01020000000" + "\022\033\n\007mem_max\030\r \001(\003:\n2000000000\022\030\n\020query_s" + "tart_time\030\016 \001(\003\0221\n\013credentials\030\017 \001(\0132\034.e" + "xec.shared.UserCredentials\022\021\n\ttime_zone\030" + "\020 \001(\005\022\024\n\014options_json\030\021 \001(\t\"f\n\017WorkQueue" + "Status\022(\n\010endpoint\030\001 \001(\0132\026.exec.Drillbit" + "Endpoint\022\024\n\014queue_length\030\002 \001(\005\022\023\n\013report" + "_time\030\003 \001(\003\"h\n\020FinishedReceiver\022*\n\010recei" + "ver\030\001 \001(\0132\030.exec.bit.FragmentHandle\022(\n\006s" + "ender\030\002 \001(\0132\030.exec.bit.FragmentHandle*\243\002" + "\n\007RpcType\022\r\n\tHANDSHAKE\020\000\022\007\n\003ACK\020\001\022\013\n\007GOO" + "DBYE\020\002\022\034\n\030REQ_INIATILIZE_FRAGMENTS\020\003\022\027\n\023" + "REQ_CANCEL_FRAGMENT\020\006\022\031\n\025REQ_RECEIVER_FI" + "NISHED\020\007\022\027\n\023REQ_FRAGMENT_STATUS\020\010\022\022\n\016REQ" + "_BIT_STATUS\020\t\022\024\n\020REQ_QUERY_STATUS\020\n\022\030\n\024R" + "ESP_FRAGMENT_HANDLE\020\013\022\030\n\024RESP_FRAGMENT_S" + "TATUS\020\014\022\023\n\017RESP_BIT_STATUS\020\r\022\025\n\021RESP_QUE" + "RY_STATUS\020\016B+\n\033org.apache.drill.exec.pro" + "toB\nBitControlH\001", 1496); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "BitControl.proto", &protobuf_RegisterTypes); BitControlHandshake::default_instance_ = new BitControlHandshake(); BitStatus::default_instance_ = new BitStatus(); FragmentStatus::default_instance_ = new FragmentStatus(); + InitializeFragments::default_instance_ = new InitializeFragments(); PlanFragment::default_instance_ = new PlanFragment(); WorkQueueStatus::default_instance_ = new WorkQueueStatus(); FinishedReceiver::default_instance_ = new FinishedReceiver(); BitControlHandshake::default_instance_->InitAsDefaultInstance(); BitStatus::default_instance_->InitAsDefaultInstance(); FragmentStatus::default_instance_->InitAsDefaultInstance(); + InitializeFragments::default_instance_->InitAsDefaultInstance(); PlanFragment::default_instance_->InitAsDefaultInstance(); WorkQueueStatus::default_instance_->InitAsDefaultInstance(); FinishedReceiver::default_instance_->InitAsDefaultInstance(); @@ -1063,6 +1089,209 @@ void FragmentStatus::Swap(FragmentStatus* other) { // =================================================================== #ifndef _MSC_VER +const int InitializeFragments::kFragmentFieldNumber; +#endif // !_MSC_VER + +InitializeFragments::InitializeFragments() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void InitializeFragments::InitAsDefaultInstance() { +} + +InitializeFragments::InitializeFragments(const InitializeFragments& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void InitializeFragments::SharedCtor() { + _cached_size_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +InitializeFragments::~InitializeFragments() { + SharedDtor(); +} + +void InitializeFragments::SharedDtor() { + if (this != default_instance_) { + } +} + +void InitializeFragments::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* InitializeFragments::descriptor() { + protobuf_AssignDescriptorsOnce(); + return InitializeFragments_descriptor_; +} + +const InitializeFragments& InitializeFragments::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_BitControl_2eproto(); + return *default_instance_; +} + +InitializeFragments* InitializeFragments::default_instance_ = NULL; + +InitializeFragments* InitializeFragments::New() const { + return new InitializeFragments; +} + +void InitializeFragments::Clear() { + fragment_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool InitializeFragments::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .exec.bit.control.PlanFragment fragment = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_fragment: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_fragment())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(10)) goto parse_fragment; + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void InitializeFragments::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // repeated .exec.bit.control.PlanFragment fragment = 1; + for (int i = 0; i < this->fragment_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->fragment(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* InitializeFragments::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // repeated .exec.bit.control.PlanFragment fragment = 1; + for (int i = 0; i < this->fragment_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->fragment(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int InitializeFragments::ByteSize() const { + int total_size = 0; + + // repeated .exec.bit.control.PlanFragment fragment = 1; + total_size += 1 * this->fragment_size(); + for (int i = 0; i < this->fragment_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->fragment(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void InitializeFragments::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const InitializeFragments* source = + ::google::protobuf::internal::dynamic_cast_if_available<const InitializeFragments*>( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void InitializeFragments::MergeFrom(const InitializeFragments& from) { + GOOGLE_CHECK_NE(&from, this); + fragment_.MergeFrom(from.fragment_); + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void InitializeFragments::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void InitializeFragments::CopyFrom(const InitializeFragments& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool InitializeFragments::IsInitialized() const { + + return true; +} + +void InitializeFragments::Swap(InitializeFragments* other) { + if (other != this) { + fragment_.Swap(&other->fragment_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata InitializeFragments::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = InitializeFragments_descriptor_; + metadata.reflection = InitializeFragments_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER const int PlanFragment::kHandleFieldNumber; const int PlanFragment::kNetworkCostFieldNumber; const int PlanFragment::kCpuCostFieldNumber; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/1d7f6211/contrib/native/client/src/protobuf/BitControl.pb.h ---------------------------------------------------------------------- diff --git a/contrib/native/client/src/protobuf/BitControl.pb.h b/contrib/native/client/src/protobuf/BitControl.pb.h index 011f8a8..798da33 100644 --- a/contrib/native/client/src/protobuf/BitControl.pb.h +++ b/contrib/native/client/src/protobuf/BitControl.pb.h @@ -42,6 +42,7 @@ void protobuf_ShutdownFile_BitControl_2eproto(); class BitControlHandshake; class BitStatus; class FragmentStatus; +class InitializeFragments; class PlanFragment; class WorkQueueStatus; class FinishedReceiver; @@ -50,7 +51,7 @@ enum RpcType { HANDSHAKE = 0, ACK = 1, GOODBYE = 2, - REQ_INIATILIZE_FRAGMENT = 3, + REQ_INIATILIZE_FRAGMENTS = 3, REQ_CANCEL_FRAGMENT = 6, REQ_RECEIVER_FINISHED = 7, REQ_FRAGMENT_STATUS = 8, @@ -363,6 +364,91 @@ class FragmentStatus : public ::google::protobuf::Message { }; // ------------------------------------------------------------------- +class InitializeFragments : public ::google::protobuf::Message { + public: + InitializeFragments(); + virtual ~InitializeFragments(); + + InitializeFragments(const InitializeFragments& from); + + inline InitializeFragments& operator=(const InitializeFragments& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const InitializeFragments& default_instance(); + + void Swap(InitializeFragments* other); + + // implements Message ---------------------------------------------- + + InitializeFragments* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const InitializeFragments& from); + void MergeFrom(const InitializeFragments& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .exec.bit.control.PlanFragment fragment = 1; + inline int fragment_size() const; + inline void clear_fragment(); + static const int kFragmentFieldNumber = 1; + inline const ::exec::bit::control::PlanFragment& fragment(int index) const; + inline ::exec::bit::control::PlanFragment* mutable_fragment(int index); + inline ::exec::bit::control::PlanFragment* add_fragment(); + inline const ::google::protobuf::RepeatedPtrField< ::exec::bit::control::PlanFragment >& + fragment() const; + inline ::google::protobuf::RepeatedPtrField< ::exec::bit::control::PlanFragment >* + mutable_fragment(); + + // @@protoc_insertion_point(class_scope:exec.bit.control.InitializeFragments) + private: + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::RepeatedPtrField< ::exec::bit::control::PlanFragment > fragment_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_BitControl_2eproto(); + friend void protobuf_AssignDesc_BitControl_2eproto(); + friend void protobuf_ShutdownFile_BitControl_2eproto(); + + void InitAsDefaultInstance(); + static InitializeFragments* default_instance_; +}; +// ------------------------------------------------------------------- + class PlanFragment : public ::google::protobuf::Message { public: PlanFragment(); @@ -1002,6 +1088,35 @@ inline void FragmentStatus::set_allocated_handle(::exec::bit::FragmentHandle* ha // ------------------------------------------------------------------- +// InitializeFragments + +// repeated .exec.bit.control.PlanFragment fragment = 1; +inline int InitializeFragments::fragment_size() const { + return fragment_.size(); +} +inline void InitializeFragments::clear_fragment() { + fragment_.Clear(); +} +inline const ::exec::bit::control::PlanFragment& InitializeFragments::fragment(int index) const { + return fragment_.Get(index); +} +inline ::exec::bit::control::PlanFragment* InitializeFragments::mutable_fragment(int index) { + return fragment_.Mutable(index); +} +inline ::exec::bit::control::PlanFragment* InitializeFragments::add_fragment() { + return fragment_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::exec::bit::control::PlanFragment >& +InitializeFragments::fragment() const { + return fragment_; +} +inline ::google::protobuf::RepeatedPtrField< ::exec::bit::control::PlanFragment >* +InitializeFragments::mutable_fragment() { + return &fragment_; +} + +// ------------------------------------------------------------------- + // PlanFragment // optional .exec.bit.FragmentHandle handle = 1; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/1d7f6211/contrib/native/client/src/protobuf/GeneralRPC.pb.cc ---------------------------------------------------------------------- diff --git a/contrib/native/client/src/protobuf/GeneralRPC.pb.cc b/contrib/native/client/src/protobuf/GeneralRPC.pb.cc index 68929cc..0ebb3a9 100644 --- a/contrib/native/client/src/protobuf/GeneralRPC.pb.cc +++ b/contrib/native/client/src/protobuf/GeneralRPC.pb.cc @@ -30,9 +30,6 @@ const ::google::protobuf::internal::GeneratedMessageReflection* const ::google::protobuf::Descriptor* CompleteRpcMessage_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* CompleteRpcMessage_reflection_ = NULL; -const ::google::protobuf::Descriptor* RpcFailure_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - RpcFailure_reflection_ = NULL; const ::google::protobuf::EnumDescriptor* RpcMode_descriptor_ = NULL; } // namespace @@ -93,24 +90,6 @@ void protobuf_AssignDesc_GeneralRPC_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(CompleteRpcMessage)); - RpcFailure_descriptor_ = file->message_type(3); - static const int RpcFailure_offsets_[4] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, error_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, error_code_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, short_error_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, long_error_), - }; - RpcFailure_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - RpcFailure_descriptor_, - RpcFailure::default_instance_, - RpcFailure_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RpcFailure, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(RpcFailure)); RpcMode_descriptor_ = file->enum_type(0); } @@ -130,8 +109,6 @@ void protobuf_RegisterTypes(const ::std::string&) { RpcHeader_descriptor_, &RpcHeader::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( CompleteRpcMessage_descriptor_, &CompleteRpcMessage::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - RpcFailure_descriptor_, &RpcFailure::default_instance()); } } // namespace @@ -143,8 +120,6 @@ void protobuf_ShutdownFile_GeneralRPC_2eproto() { delete RpcHeader_reflection_; delete CompleteRpcMessage::default_instance_; delete CompleteRpcMessage_reflection_; - delete RpcFailure::default_instance_; - delete RpcFailure_reflection_; } void protobuf_AddDesc_GeneralRPC_2eproto() { @@ -161,22 +136,18 @@ void protobuf_AddDesc_GeneralRPC_2eproto() { "rdination_id\030\002 \001(\005\022\020\n\010rpc_type\030\003 \001(\005\"b\n\022" "CompleteRpcMessage\022#\n\006header\030\001 \001(\0132\023.exe" "c.rpc.RpcHeader\022\025\n\rprotobuf_body\030\002 \001(\014\022\020" - "\n\010raw_body\030\003 \001(\014\"[\n\nRpcFailure\022\020\n\010error_" - "id\030\001 \001(\003\022\022\n\nerror_code\030\002 \001(\005\022\023\n\013short_er" - "ror\030\003 \001(\t\022\022\n\nlong_error\030\004 \001(\t*:\n\007RpcMode" - "\022\013\n\007REQUEST\020\000\022\014\n\010RESPONSE\020\001\022\024\n\020RESPONSE_" - "FAILURE\020\002B1\n\033org.apache.drill.exec.proto" - "B\020GeneralRPCProtosH\001", 460); + "\n\010raw_body\030\003 \001(\014*:\n\007RpcMode\022\013\n\007REQUEST\020\000" + "\022\014\n\010RESPONSE\020\001\022\024\n\020RESPONSE_FAILURE\020\002B1\n\033" + "org.apache.drill.exec.protoB\020GeneralRPCP" + "rotosH\001", 367); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "GeneralRPC.proto", &protobuf_RegisterTypes); Ack::default_instance_ = new Ack(); RpcHeader::default_instance_ = new RpcHeader(); CompleteRpcMessage::default_instance_ = new CompleteRpcMessage(); - RpcFailure::default_instance_ = new RpcFailure(); Ack::default_instance_->InitAsDefaultInstance(); RpcHeader::default_instance_->InitAsDefaultInstance(); CompleteRpcMessage::default_instance_->InitAsDefaultInstance(); - RpcFailure::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_GeneralRPC_2eproto); } @@ -1011,368 +982,6 @@ void CompleteRpcMessage::Swap(CompleteRpcMessage* other) { } -// =================================================================== - -#ifndef _MSC_VER -const int RpcFailure::kErrorIdFieldNumber; -const int RpcFailure::kErrorCodeFieldNumber; -const int RpcFailure::kShortErrorFieldNumber; -const int RpcFailure::kLongErrorFieldNumber; -#endif // !_MSC_VER - -RpcFailure::RpcFailure() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void RpcFailure::InitAsDefaultInstance() { -} - -RpcFailure::RpcFailure(const RpcFailure& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void RpcFailure::SharedCtor() { - _cached_size_ = 0; - error_id_ = GOOGLE_LONGLONG(0); - error_code_ = 0; - short_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - long_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -RpcFailure::~RpcFailure() { - SharedDtor(); -} - -void RpcFailure::SharedDtor() { - if (short_error_ != &::google::protobuf::internal::kEmptyString) { - delete short_error_; - } - if (long_error_ != &::google::protobuf::internal::kEmptyString) { - delete long_error_; - } - if (this != default_instance_) { - } -} - -void RpcFailure::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* RpcFailure::descriptor() { - protobuf_AssignDescriptorsOnce(); - return RpcFailure_descriptor_; -} - -const RpcFailure& RpcFailure::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_GeneralRPC_2eproto(); - return *default_instance_; -} - -RpcFailure* RpcFailure::default_instance_ = NULL; - -RpcFailure* RpcFailure::New() const { - return new RpcFailure; -} - -void RpcFailure::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - error_id_ = GOOGLE_LONGLONG(0); - error_code_ = 0; - if (has_short_error()) { - if (short_error_ != &::google::protobuf::internal::kEmptyString) { - short_error_->clear(); - } - } - if (has_long_error()) { - if (long_error_ != &::google::protobuf::internal::kEmptyString) { - long_error_->clear(); - } - } - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool RpcFailure::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional int64 error_id = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( - input, &error_id_))); - set_has_error_id(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(16)) goto parse_error_code; - break; - } - - // optional int32 error_code = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_error_code: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &error_code_))); - set_has_error_code(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(26)) goto parse_short_error; - break; - } - - // optional string short_error = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_short_error: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_short_error())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->short_error().data(), this->short_error().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(34)) goto parse_long_error; - break; - } - - // optional string long_error = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_long_error: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_long_error())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->long_error().data(), this->long_error().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void RpcFailure::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional int64 error_id = 1; - if (has_error_id()) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->error_id(), output); - } - - // optional int32 error_code = 2; - if (has_error_code()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->error_code(), output); - } - - // optional string short_error = 3; - if (has_short_error()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->short_error().data(), this->short_error().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 3, this->short_error(), output); - } - - // optional string long_error = 4; - if (has_long_error()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->long_error().data(), this->long_error().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 4, this->long_error(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* RpcFailure::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional int64 error_id = 1; - if (has_error_id()) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->error_id(), target); - } - - // optional int32 error_code = 2; - if (has_error_code()) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->error_code(), target); - } - - // optional string short_error = 3; - if (has_short_error()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->short_error().data(), this->short_error().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 3, this->short_error(), target); - } - - // optional string long_error = 4; - if (has_long_error()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->long_error().data(), this->long_error().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 4, this->long_error(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int RpcFailure::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional int64 error_id = 1; - if (has_error_id()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->error_id()); - } - - // optional int32 error_code = 2; - if (has_error_code()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->error_code()); - } - - // optional string short_error = 3; - if (has_short_error()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->short_error()); - } - - // optional string long_error = 4; - if (has_long_error()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->long_error()); - } - - } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void RpcFailure::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const RpcFailure* source = - ::google::protobuf::internal::dynamic_cast_if_available<const RpcFailure*>( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void RpcFailure::MergeFrom(const RpcFailure& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_error_id()) { - set_error_id(from.error_id()); - } - if (from.has_error_code()) { - set_error_code(from.error_code()); - } - if (from.has_short_error()) { - set_short_error(from.short_error()); - } - if (from.has_long_error()) { - set_long_error(from.long_error()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void RpcFailure::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void RpcFailure::CopyFrom(const RpcFailure& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool RpcFailure::IsInitialized() const { - - return true; -} - -void RpcFailure::Swap(RpcFailure* other) { - if (other != this) { - std::swap(error_id_, other->error_id_); - std::swap(error_code_, other->error_code_); - std::swap(short_error_, other->short_error_); - std::swap(long_error_, other->long_error_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata RpcFailure::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = RpcFailure_descriptor_; - metadata.reflection = RpcFailure_reflection_; - return metadata; -} - - // @@protoc_insertion_point(namespace_scope) } // namespace rpc http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/1d7f6211/contrib/native/client/src/protobuf/GeneralRPC.pb.h ---------------------------------------------------------------------- diff --git a/contrib/native/client/src/protobuf/GeneralRPC.pb.h b/contrib/native/client/src/protobuf/GeneralRPC.pb.h index cfafd65..49f4bf7 100644 --- a/contrib/native/client/src/protobuf/GeneralRPC.pb.h +++ b/contrib/native/client/src/protobuf/GeneralRPC.pb.h @@ -39,7 +39,6 @@ void protobuf_ShutdownFile_GeneralRPC_2eproto(); class Ack; class RpcHeader; class CompleteRpcMessage; -class RpcFailure; enum RpcMode { REQUEST = 0, @@ -359,128 +358,6 @@ class CompleteRpcMessage : public ::google::protobuf::Message { void InitAsDefaultInstance(); static CompleteRpcMessage* default_instance_; }; -// ------------------------------------------------------------------- - -class RpcFailure : public ::google::protobuf::Message { - public: - RpcFailure(); - virtual ~RpcFailure(); - - RpcFailure(const RpcFailure& from); - - inline RpcFailure& operator=(const RpcFailure& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const RpcFailure& default_instance(); - - void Swap(RpcFailure* other); - - // implements Message ---------------------------------------------- - - RpcFailure* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const RpcFailure& from); - void MergeFrom(const RpcFailure& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional int64 error_id = 1; - inline bool has_error_id() const; - inline void clear_error_id(); - static const int kErrorIdFieldNumber = 1; - inline ::google::protobuf::int64 error_id() const; - inline void set_error_id(::google::protobuf::int64 value); - - // optional int32 error_code = 2; - inline bool has_error_code() const; - inline void clear_error_code(); - static const int kErrorCodeFieldNumber = 2; - inline ::google::protobuf::int32 error_code() const; - inline void set_error_code(::google::protobuf::int32 value); - - // optional string short_error = 3; - inline bool has_short_error() const; - inline void clear_short_error(); - static const int kShortErrorFieldNumber = 3; - inline const ::std::string& short_error() const; - inline void set_short_error(const ::std::string& value); - inline void set_short_error(const char* value); - inline void set_short_error(const char* value, size_t size); - inline ::std::string* mutable_short_error(); - inline ::std::string* release_short_error(); - inline void set_allocated_short_error(::std::string* short_error); - - // optional string long_error = 4; - inline bool has_long_error() const; - inline void clear_long_error(); - static const int kLongErrorFieldNumber = 4; - inline const ::std::string& long_error() const; - inline void set_long_error(const ::std::string& value); - inline void set_long_error(const char* value); - inline void set_long_error(const char* value, size_t size); - inline ::std::string* mutable_long_error(); - inline ::std::string* release_long_error(); - inline void set_allocated_long_error(::std::string* long_error); - - // @@protoc_insertion_point(class_scope:exec.rpc.RpcFailure) - private: - inline void set_has_error_id(); - inline void clear_has_error_id(); - inline void set_has_error_code(); - inline void clear_has_error_code(); - inline void set_has_short_error(); - inline void clear_has_short_error(); - inline void set_has_long_error(); - inline void clear_has_long_error(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::int64 error_id_; - ::std::string* short_error_; - ::std::string* long_error_; - ::google::protobuf::int32 error_code_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; - - friend void protobuf_AddDesc_GeneralRPC_2eproto(); - friend void protobuf_AssignDesc_GeneralRPC_2eproto(); - friend void protobuf_ShutdownFile_GeneralRPC_2eproto(); - - void InitAsDefaultInstance(); - static RpcFailure* default_instance_; -}; // =================================================================== @@ -763,194 +640,6 @@ inline void CompleteRpcMessage::set_allocated_raw_body(::std::string* raw_body) } } -// ------------------------------------------------------------------- - -// RpcFailure - -// optional int64 error_id = 1; -inline bool RpcFailure::has_error_id() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void RpcFailure::set_has_error_id() { - _has_bits_[0] |= 0x00000001u; -} -inline void RpcFailure::clear_has_error_id() { - _has_bits_[0] &= ~0x00000001u; -} -inline void RpcFailure::clear_error_id() { - error_id_ = GOOGLE_LONGLONG(0); - clear_has_error_id(); -} -inline ::google::protobuf::int64 RpcFailure::error_id() const { - return error_id_; -} -inline void RpcFailure::set_error_id(::google::protobuf::int64 value) { - set_has_error_id(); - error_id_ = value; -} - -// optional int32 error_code = 2; -inline bool RpcFailure::has_error_code() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void RpcFailure::set_has_error_code() { - _has_bits_[0] |= 0x00000002u; -} -inline void RpcFailure::clear_has_error_code() { - _has_bits_[0] &= ~0x00000002u; -} -inline void RpcFailure::clear_error_code() { - error_code_ = 0; - clear_has_error_code(); -} -inline ::google::protobuf::int32 RpcFailure::error_code() const { - return error_code_; -} -inline void RpcFailure::set_error_code(::google::protobuf::int32 value) { - set_has_error_code(); - error_code_ = value; -} - -// optional string short_error = 3; -inline bool RpcFailure::has_short_error() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void RpcFailure::set_has_short_error() { - _has_bits_[0] |= 0x00000004u; -} -inline void RpcFailure::clear_has_short_error() { - _has_bits_[0] &= ~0x00000004u; -} -inline void RpcFailure::clear_short_error() { - if (short_error_ != &::google::protobuf::internal::kEmptyString) { - short_error_->clear(); - } - clear_has_short_error(); -} -inline const ::std::string& RpcFailure::short_error() const { - return *short_error_; -} -inline void RpcFailure::set_short_error(const ::std::string& value) { - set_has_short_error(); - if (short_error_ == &::google::protobuf::internal::kEmptyString) { - short_error_ = new ::std::string; - } - short_error_->assign(value); -} -inline void RpcFailure::set_short_error(const char* value) { - set_has_short_error(); - if (short_error_ == &::google::protobuf::internal::kEmptyString) { - short_error_ = new ::std::string; - } - short_error_->assign(value); -} -inline void RpcFailure::set_short_error(const char* value, size_t size) { - set_has_short_error(); - if (short_error_ == &::google::protobuf::internal::kEmptyString) { - short_error_ = new ::std::string; - } - short_error_->assign(reinterpret_cast<const char*>(value), size); -} -inline ::std::string* RpcFailure::mutable_short_error() { - set_has_short_error(); - if (short_error_ == &::google::protobuf::internal::kEmptyString) { - short_error_ = new ::std::string; - } - return short_error_; -} -inline ::std::string* RpcFailure::release_short_error() { - clear_has_short_error(); - if (short_error_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = short_error_; - short_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} -inline void RpcFailure::set_allocated_short_error(::std::string* short_error) { - if (short_error_ != &::google::protobuf::internal::kEmptyString) { - delete short_error_; - } - if (short_error) { - set_has_short_error(); - short_error_ = short_error; - } else { - clear_has_short_error(); - short_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - } -} - -// optional string long_error = 4; -inline bool RpcFailure::has_long_error() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void RpcFailure::set_has_long_error() { - _has_bits_[0] |= 0x00000008u; -} -inline void RpcFailure::clear_has_long_error() { - _has_bits_[0] &= ~0x00000008u; -} -inline void RpcFailure::clear_long_error() { - if (long_error_ != &::google::protobuf::internal::kEmptyString) { - long_error_->clear(); - } - clear_has_long_error(); -} -inline const ::std::string& RpcFailure::long_error() const { - return *long_error_; -} -inline void RpcFailure::set_long_error(const ::std::string& value) { - set_has_long_error(); - if (long_error_ == &::google::protobuf::internal::kEmptyString) { - long_error_ = new ::std::string; - } - long_error_->assign(value); -} -inline void RpcFailure::set_long_error(const char* value) { - set_has_long_error(); - if (long_error_ == &::google::protobuf::internal::kEmptyString) { - long_error_ = new ::std::string; - } - long_error_->assign(value); -} -inline void RpcFailure::set_long_error(const char* value, size_t size) { - set_has_long_error(); - if (long_error_ == &::google::protobuf::internal::kEmptyString) { - long_error_ = new ::std::string; - } - long_error_->assign(reinterpret_cast<const char*>(value), size); -} -inline ::std::string* RpcFailure::mutable_long_error() { - set_has_long_error(); - if (long_error_ == &::google::protobuf::internal::kEmptyString) { - long_error_ = new ::std::string; - } - return long_error_; -} -inline ::std::string* RpcFailure::release_long_error() { - clear_has_long_error(); - if (long_error_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = long_error_; - long_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} -inline void RpcFailure::set_allocated_long_error(::std::string* long_error) { - if (long_error_ != &::google::protobuf::internal::kEmptyString) { - delete long_error_; - } - if (long_error) { - set_has_long_error(); - long_error_ = long_error; - } else { - clear_has_long_error(); - long_error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - } -} - // @@protoc_insertion_point(namespace_scope)
