From 157cfdb52709e489cf1f3ce8e3042ed4ee8a524a Mon Sep 17 00:00:00 2001 From: jeremyhi Date: Fri, 6 Sep 2024 16:09:14 +0800 Subject: [PATCH] feat: heartbeat extension field (#190) * feat: heartbeat extemsion field * feat: extension to extensions --- c++/greptime/v1/flow/server.pb.cc | 134 +++--- c++/greptime/v1/flow/server.pb.h | 80 ++-- c++/greptime/v1/meta/heartbeat.pb.cc | 206 ++++++--- c++/greptime/v1/meta/heartbeat.pb.h | 106 ++++- c++/greptime/v1/region/server.pb.cc | 202 ++++----- c++/greptime/v1/region/server.pb.h | 80 ++-- go/greptime/v1/meta/heartbeat.pb.go | 222 +++++----- .../greptime/v1/meta/HeartbeatOuterClass.java | 397 ++++++++++++++++-- .../main/java/io/greptime/v1/flow/Server.java | 266 ++++++------ .../java/io/greptime/v1/region/Server.java | 334 +++++++-------- proto/greptime/v1/flow/server.proto | 2 +- proto/greptime/v1/meta/heartbeat.proto | 1 + proto/greptime/v1/region/server.proto | 2 +- 13 files changed, 1296 insertions(+), 736 deletions(-) diff --git a/c++/greptime/v1/flow/server.pb.cc b/c++/greptime/v1/flow/server.pb.cc index 0b48e766..823973eb 100644 --- a/c++/greptime/v1/flow/server.pb.cc +++ b/c++/greptime/v1/flow/server.pb.cc @@ -90,21 +90,21 @@ struct FlowRequestDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowRequestDefaultTypeInternal _FlowRequest_default_instance_; -PROTOBUF_CONSTEXPR FlowResponse_ExtensionEntry_DoNotUse::FlowResponse_ExtensionEntry_DoNotUse( +PROTOBUF_CONSTEXPR FlowResponse_ExtensionsEntry_DoNotUse::FlowResponse_ExtensionsEntry_DoNotUse( ::_pbi::ConstantInitialized) {} -struct FlowResponse_ExtensionEntry_DoNotUseDefaultTypeInternal { - PROTOBUF_CONSTEXPR FlowResponse_ExtensionEntry_DoNotUseDefaultTypeInternal() +struct FlowResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR FlowResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~FlowResponse_ExtensionEntry_DoNotUseDefaultTypeInternal() {} + ~FlowResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal() {} union { - FlowResponse_ExtensionEntry_DoNotUse _instance; + FlowResponse_ExtensionsEntry_DoNotUse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowResponse_ExtensionEntry_DoNotUseDefaultTypeInternal _FlowResponse_ExtensionEntry_DoNotUse_default_instance_; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal _FlowResponse_ExtensionsEntry_DoNotUse_default_instance_; PROTOBUF_CONSTEXPR FlowResponse::FlowResponse( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.affected_flows_)*/{} - , /*decltype(_impl_.extension_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.extensions_)*/{::_pbi::ConstantInitialized()} , /*decltype(_impl_.header_)*/nullptr , /*decltype(_impl_.affected_rows_)*/uint64_t{0u} , /*decltype(_impl_._cached_size_)*/{}} {} @@ -226,14 +226,14 @@ const uint32_t TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets[] PROT ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowRequest, _impl_.body_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse_ExtensionsEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse_ExtensionsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse, value_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse_ExtensionsEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse_ExtensionsEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ @@ -245,7 +245,7 @@ const uint32_t TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets[] PROT PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse, _impl_.header_), PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse, _impl_.affected_rows_), PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse, _impl_.affected_flows_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse, _impl_.extension_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse, _impl_.extensions_), PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest_FlowOptionsEntry_DoNotUse, _has_bits_), PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest_FlowOptionsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ @@ -291,7 +291,7 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 18, -1, -1, sizeof(::greptime::v1::flow::InsertRequests)}, { 25, -1, -1, sizeof(::greptime::v1::flow::InsertRequest)}, { 33, -1, -1, sizeof(::greptime::v1::flow::FlowRequest)}, - { 44, 52, -1, sizeof(::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse)}, + { 44, 52, -1, sizeof(::greptime::v1::flow::FlowResponse_ExtensionsEntry_DoNotUse)}, { 54, -1, -1, sizeof(::greptime::v1::flow::FlowResponse)}, { 64, 72, -1, sizeof(::greptime::v1::flow::CreateRequest_FlowOptionsEntry_DoNotUse)}, { 74, -1, -1, sizeof(::greptime::v1::flow::CreateRequest)}, @@ -305,7 +305,7 @@ static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::flow::_InsertRequests_default_instance_._instance, &::greptime::v1::flow::_InsertRequest_default_instance_._instance, &::greptime::v1::flow::_FlowRequest_default_instance_._instance, - &::greptime::v1::flow::_FlowResponse_ExtensionEntry_DoNotUse_default_instance_._instance, + &::greptime::v1::flow::_FlowResponse_ExtensionsEntry_DoNotUse_default_instance_._instance, &::greptime::v1::flow::_FlowResponse_default_instance_._instance, &::greptime::v1::flow::_CreateRequest_FlowOptionsEntry_DoNotUse_default_instance_._instance, &::greptime::v1::flow::_CreateRequest_default_instance_._instance, @@ -331,32 +331,32 @@ const char descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto[] PRO "time.v1.flow.CreateRequestH\000\022-\n\004drop\030\002 \001" "(\0132\035.greptime.v1.flow.DropRequestH\000\022,\n\005f" "lush\030\003 \001(\0132\033.greptime.v1.flow.FlushFlowH" - "\000B\006\n\004body\"\363\001\n\014FlowResponse\022+\n\006header\030\001 \001" + "\000B\006\n\004body\"\366\001\n\014FlowResponse\022+\n\006header\030\001 \001" "(\0132\033.greptime.v1.ResponseHeader\022\025\n\raffec" "ted_rows\030\002 \001(\004\022+\n\016affected_flows\030\003 \003(\0132\023" - ".greptime.v1.FlowId\022@\n\textension\030\004 \003(\0132-" - ".greptime.v1.flow.FlowResponse.Extension" - "Entry\0320\n\016ExtensionEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" - "value\030\002 \001(\014:\0028\001\"\376\002\n\rCreateRequest\022$\n\007flo" - "w_id\030\001 \001(\0132\023.greptime.v1.FlowId\022.\n\020sourc" - "e_table_ids\030\002 \003(\0132\024.greptime.v1.TableId\022" - "/\n\017sink_table_name\030\003 \001(\0132\026.greptime.v1.T" - "ableName\022\034\n\024create_if_not_exists\030\004 \001(\010\022." - "\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Expir" - "eAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022F\n\014" - "flow_options\030\010 \003(\01320.greptime.v1.flow.Cr" - "eateRequest.FlowOptionsEntry\0322\n\020FlowOpti" - "onsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" - "\"3\n\013DropRequest\022$\n\007flow_id\030\001 \001(\0132\023.grept" - "ime.v1.FlowId\"1\n\tFlushFlow\022$\n\007flow_id\030\001 " - "\001(\0132\023.greptime.v1.FlowId2\264\001\n\004Flow\022S\n\022Han" - "dleCreateRemove\022\035.greptime.v1.flow.FlowR" - "equest\032\036.greptime.v1.flow.FlowResponse\022W" - "\n\023HandleMirrorRequest\022 .greptime.v1.flow" - ".InsertRequests\032\036.greptime.v1.flow.FlowR" - "esponseBY\n\023io.greptime.v1.flowB\006ServerZ:" - "github.com/GreptimeTeam/greptime-proto/g" - "o/greptime/v1/flowb\006proto3" + ".greptime.v1.FlowId\022B\n\nextensions\030\004 \003(\0132" + "..greptime.v1.flow.FlowResponse.Extensio" + "nsEntry\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022" + "\r\n\005value\030\002 \001(\014:\0028\001\"\376\002\n\rCreateRequest\022$\n\007" + "flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\022.\n\020so" + "urce_table_ids\030\002 \003(\0132\024.greptime.v1.Table" + "Id\022/\n\017sink_table_name\030\003 \001(\0132\026.greptime.v" + "1.TableName\022\034\n\024create_if_not_exists\030\004 \001(" + "\010\022.\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Ex" + "pireAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022" + "F\n\014flow_options\030\010 \003(\01320.greptime.v1.flow" + ".CreateRequest.FlowOptionsEntry\0322\n\020FlowO" + "ptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + "\0028\001\"3\n\013DropRequest\022$\n\007flow_id\030\001 \001(\0132\023.gr" + "eptime.v1.FlowId\"1\n\tFlushFlow\022$\n\007flow_id" + "\030\001 \001(\0132\023.greptime.v1.FlowId2\264\001\n\004Flow\022S\n\022" + "HandleCreateRemove\022\035.greptime.v1.flow.Fl" + "owRequest\032\036.greptime.v1.flow.FlowRespons" + "e\022W\n\023HandleMirrorRequest\022 .greptime.v1.f" + "low.InsertRequests\032\036.greptime.v1.flow.Fl" + "owResponseBY\n\023io.greptime.v1.flowB\006Serve" + "rZ:github.com/GreptimeTeam/greptime-prot" + "o/go/greptime/v1/flowb\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_deps[3] = { &::descriptor_table_greptime_2fv1_2fcommon_2eproto, @@ -365,7 +365,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fflo }; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto = { - false, false, 1706, descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto, + false, false, 1709, descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto, "greptime/v1/flow/server.proto", &descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_deps, 3, 11, schemas, file_default_instances, TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets, @@ -1485,13 +1485,13 @@ ::PROTOBUF_NAMESPACE_ID::Metadata FlowRequest::GetMetadata() const { // =================================================================== -FlowResponse_ExtensionEntry_DoNotUse::FlowResponse_ExtensionEntry_DoNotUse() {} -FlowResponse_ExtensionEntry_DoNotUse::FlowResponse_ExtensionEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) +FlowResponse_ExtensionsEntry_DoNotUse::FlowResponse_ExtensionsEntry_DoNotUse() {} +FlowResponse_ExtensionsEntry_DoNotUse::FlowResponse_ExtensionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) : SuperType(arena) {} -void FlowResponse_ExtensionEntry_DoNotUse::MergeFrom(const FlowResponse_ExtensionEntry_DoNotUse& other) { +void FlowResponse_ExtensionsEntry_DoNotUse::MergeFrom(const FlowResponse_ExtensionsEntry_DoNotUse& other) { MergeFromInternal(other); } -::PROTOBUF_NAMESPACE_ID::Metadata FlowResponse_ExtensionEntry_DoNotUse::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata FlowResponse_ExtensionsEntry_DoNotUse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once, file_level_metadata_greptime_2fv1_2fflow_2fserver_2eproto[5]); @@ -1531,13 +1531,13 @@ FlowResponse::FlowResponse(const FlowResponse& from) FlowResponse* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.affected_flows_){from._impl_.affected_flows_} - , /*decltype(_impl_.extension_)*/{} + , /*decltype(_impl_.extensions_)*/{} , decltype(_impl_.header_){nullptr} , decltype(_impl_.affected_rows_){} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.extension_.MergeFrom(from._impl_.extension_); + _this->_impl_.extensions_.MergeFrom(from._impl_.extensions_); if (from._internal_has_header()) { _this->_impl_.header_ = new ::greptime::v1::ResponseHeader(*from._impl_.header_); } @@ -1551,7 +1551,7 @@ inline void FlowResponse::SharedCtor( (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.affected_flows_){arena} - , /*decltype(_impl_.extension_)*/{::_pbi::ArenaInitialized(), arena} + , /*decltype(_impl_.extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_.header_){nullptr} , decltype(_impl_.affected_rows_){uint64_t{0u}} , /*decltype(_impl_._cached_size_)*/{} @@ -1571,14 +1571,14 @@ FlowResponse::~FlowResponse() { inline void FlowResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.affected_flows_.~RepeatedPtrField(); - _impl_.extension_.Destruct(); - _impl_.extension_.~MapField(); + _impl_.extensions_.Destruct(); + _impl_.extensions_.~MapField(); if (this != internal_default_instance()) delete _impl_.header_; } void FlowResponse::ArenaDtor(void* object) { FlowResponse* _this = reinterpret_cast< FlowResponse* >(object); - _this->_impl_.extension_.Destruct(); + _this->_impl_.extensions_.Destruct(); } void FlowResponse::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); @@ -1591,7 +1591,7 @@ void FlowResponse::Clear() { (void) cached_has_bits; _impl_.affected_flows_.Clear(); - _impl_.extension_.Clear(); + _impl_.extensions_.Clear(); if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { delete _impl_.header_; } @@ -1635,13 +1635,13 @@ const char* FlowResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; - // map extension = 4; + // map extensions = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(&_impl_.extension_, ptr); + ptr = ctx->ParseMessage(&_impl_.extensions_, ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); @@ -1698,17 +1698,17 @@ uint8_t* FlowResponse::_InternalSerialize( InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream); } - // map extension = 4; - if (!this->_internal_extension().empty()) { + // map extensions = 4; + if (!this->_internal_extensions().empty()) { using MapType = ::_pb::Map; - using WireHelper = FlowResponse_ExtensionEntry_DoNotUse::Funcs; - const auto& map_field = this->_internal_extension(); + using WireHelper = FlowResponse_ExtensionsEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_extensions(); auto check_utf8 = [](const MapType::value_type& entry) { (void)entry; ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( entry.first.data(), static_cast(entry.first.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "greptime.v1.flow.FlowResponse.ExtensionEntry.key"); + "greptime.v1.flow.FlowResponse.ExtensionsEntry.key"); }; if (stream->IsSerializationDeterministic() && map_field.size() > 1) { @@ -1747,13 +1747,13 @@ size_t FlowResponse::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // map extension = 4; + // map extensions = 4; total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_extension_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_extensions_size()); for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator - it = this->_internal_extension().begin(); - it != this->_internal_extension().end(); ++it) { - total_size += FlowResponse_ExtensionEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + it = this->_internal_extensions().begin(); + it != this->_internal_extensions().end(); ++it) { + total_size += FlowResponse_ExtensionsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); } // .greptime.v1.ResponseHeader header = 1; @@ -1787,7 +1787,7 @@ void FlowResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P (void) cached_has_bits; _this->_impl_.affected_flows_.MergeFrom(from._impl_.affected_flows_); - _this->_impl_.extension_.MergeFrom(from._impl_.extension_); + _this->_impl_.extensions_.MergeFrom(from._impl_.extensions_); if (from._internal_has_header()) { _this->_internal_mutable_header()->::greptime::v1::ResponseHeader::MergeFrom( from._internal_header()); @@ -1813,7 +1813,7 @@ void FlowResponse::InternalSwap(FlowResponse* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.affected_flows_.InternalSwap(&other->_impl_.affected_flows_); - _impl_.extension_.InternalSwap(&other->_impl_.extension_); + _impl_.extensions_.InternalSwap(&other->_impl_.extensions_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(FlowResponse, _impl_.affected_rows_) + sizeof(FlowResponse::_impl_.affected_rows_) @@ -2796,9 +2796,9 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::flow::FlowRequest* Arena::CreateMaybeMessage< ::greptime::v1::flow::FlowRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::flow::FlowRequest >(arena); } -template<> PROTOBUF_NOINLINE ::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse* -Arena::CreateMaybeMessage< ::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse >(arena); +template<> PROTOBUF_NOINLINE ::greptime::v1::flow::FlowResponse_ExtensionsEntry_DoNotUse* +Arena::CreateMaybeMessage< ::greptime::v1::flow::FlowResponse_ExtensionsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::flow::FlowResponse_ExtensionsEntry_DoNotUse >(arena); } template<> PROTOBUF_NOINLINE ::greptime::v1::flow::FlowResponse* Arena::CreateMaybeMessage< ::greptime::v1::flow::FlowResponse >(Arena* arena) { diff --git a/c++/greptime/v1/flow/server.pb.h b/c++/greptime/v1/flow/server.pb.h index 4aaab9e3..f41e186c 100644 --- a/c++/greptime/v1/flow/server.pb.h +++ b/c++/greptime/v1/flow/server.pb.h @@ -74,9 +74,9 @@ extern FlowRequestHeader_TracingContextEntry_DoNotUseDefaultTypeInternal _FlowRe class FlowResponse; struct FlowResponseDefaultTypeInternal; extern FlowResponseDefaultTypeInternal _FlowResponse_default_instance_; -class FlowResponse_ExtensionEntry_DoNotUse; -struct FlowResponse_ExtensionEntry_DoNotUseDefaultTypeInternal; -extern FlowResponse_ExtensionEntry_DoNotUseDefaultTypeInternal _FlowResponse_ExtensionEntry_DoNotUse_default_instance_; +class FlowResponse_ExtensionsEntry_DoNotUse; +struct FlowResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal; +extern FlowResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal _FlowResponse_ExtensionsEntry_DoNotUse_default_instance_; class FlushFlow; struct FlushFlowDefaultTypeInternal; extern FlushFlowDefaultTypeInternal _FlushFlow_default_instance_; @@ -97,7 +97,7 @@ template<> ::greptime::v1::flow::FlowRequest* Arena::CreateMaybeMessage<::grepti template<> ::greptime::v1::flow::FlowRequestHeader* Arena::CreateMaybeMessage<::greptime::v1::flow::FlowRequestHeader>(Arena*); template<> ::greptime::v1::flow::FlowRequestHeader_TracingContextEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::flow::FlowRequestHeader_TracingContextEntry_DoNotUse>(Arena*); template<> ::greptime::v1::flow::FlowResponse* Arena::CreateMaybeMessage<::greptime::v1::flow::FlowResponse>(Arena*); -template<> ::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse>(Arena*); +template<> ::greptime::v1::flow::FlowResponse_ExtensionsEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::flow::FlowResponse_ExtensionsEntry_DoNotUse>(Arena*); template<> ::greptime::v1::flow::FlushFlow* Arena::CreateMaybeMessage<::greptime::v1::flow::FlushFlow>(Arena*); template<> ::greptime::v1::flow::InsertRequest* Arena::CreateMaybeMessage<::greptime::v1::flow::InsertRequest>(Arena*); template<> ::greptime::v1::flow::InsertRequests* Arena::CreateMaybeMessage<::greptime::v1::flow::InsertRequests>(Arena*); @@ -882,23 +882,23 @@ class FlowRequest final : }; // ------------------------------------------------------------------- -class FlowResponse_ExtensionEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - FlowResponse_ExtensionEntry_DoNotUse(); - explicit PROTOBUF_CONSTEXPR FlowResponse_ExtensionEntry_DoNotUse( + FlowResponse_ExtensionsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR FlowResponse_ExtensionsEntry_DoNotUse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit FlowResponse_ExtensionEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const FlowResponse_ExtensionEntry_DoNotUse& other); - static const FlowResponse_ExtensionEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_FlowResponse_ExtensionEntry_DoNotUse_default_instance_); } + explicit FlowResponse_ExtensionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const FlowResponse_ExtensionsEntry_DoNotUse& other); + static const FlowResponse_ExtensionsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_FlowResponse_ExtensionsEntry_DoNotUse_default_instance_); } static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "greptime.v1.flow.FlowResponse.ExtensionEntry.key"); + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "greptime.v1.flow.FlowResponse.ExtensionsEntry.key"); } static bool ValidateValue(void*) { return true; } using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; @@ -1033,7 +1033,7 @@ class FlowResponse final : enum : int { kAffectedFlowsFieldNumber = 3, - kExtensionFieldNumber = 4, + kExtensionsFieldNumber = 4, kHeaderFieldNumber = 1, kAffectedRowsFieldNumber = 2, }; @@ -1055,22 +1055,22 @@ class FlowResponse final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::FlowId >& affected_flows() const; - // map extension = 4; - int extension_size() const; + // map extensions = 4; + int extensions_size() const; private: - int _internal_extension_size() const; + int _internal_extensions_size() const; public: - void clear_extension(); + void clear_extensions(); private: const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - _internal_extension() const; + _internal_extensions() const; ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - _internal_mutable_extension(); + _internal_mutable_extensions(); public: const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - extension() const; + extensions() const; ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - mutable_extension(); + mutable_extensions(); // .greptime.v1.ResponseHeader header = 1; bool has_header() const; @@ -1109,10 +1109,10 @@ class FlowResponse final : struct Impl_ { ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::FlowId > affected_flows_; ::PROTOBUF_NAMESPACE_ID::internal::MapField< - FlowResponse_ExtensionEntry_DoNotUse, + FlowResponse_ExtensionsEntry_DoNotUse, std::string, std::string, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BYTES> extension_; + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BYTES> extensions_; ::greptime::v1::ResponseHeader* header_; uint64_t affected_rows_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -2501,33 +2501,33 @@ FlowResponse::affected_flows() const { return _impl_.affected_flows_; } -// map extension = 4; -inline int FlowResponse::_internal_extension_size() const { - return _impl_.extension_.size(); +// map extensions = 4; +inline int FlowResponse::_internal_extensions_size() const { + return _impl_.extensions_.size(); } -inline int FlowResponse::extension_size() const { - return _internal_extension_size(); +inline int FlowResponse::extensions_size() const { + return _internal_extensions_size(); } -inline void FlowResponse::clear_extension() { - _impl_.extension_.Clear(); +inline void FlowResponse::clear_extensions() { + _impl_.extensions_.Clear(); } inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -FlowResponse::_internal_extension() const { - return _impl_.extension_.GetMap(); +FlowResponse::_internal_extensions() const { + return _impl_.extensions_.GetMap(); } inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -FlowResponse::extension() const { - // @@protoc_insertion_point(field_map:greptime.v1.flow.FlowResponse.extension) - return _internal_extension(); +FlowResponse::extensions() const { + // @@protoc_insertion_point(field_map:greptime.v1.flow.FlowResponse.extensions) + return _internal_extensions(); } inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -FlowResponse::_internal_mutable_extension() { - return _impl_.extension_.MutableMap(); +FlowResponse::_internal_mutable_extensions() { + return _impl_.extensions_.MutableMap(); } inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -FlowResponse::mutable_extension() { - // @@protoc_insertion_point(field_mutable_map:greptime.v1.flow.FlowResponse.extension) - return _internal_mutable_extension(); +FlowResponse::mutable_extensions() { + // @@protoc_insertion_point(field_mutable_map:greptime.v1.flow.FlowResponse.extensions) + return _internal_mutable_extensions(); } // ------------------------------------------------------------------- diff --git a/c++/greptime/v1/meta/heartbeat.pb.cc b/c++/greptime/v1/meta/heartbeat.pb.cc index 60aa1a1e..b7e6607e 100644 --- a/c++/greptime/v1/meta/heartbeat.pb.cc +++ b/c++/greptime/v1/meta/heartbeat.pb.cc @@ -58,9 +58,21 @@ struct NodeInfoDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NodeInfoDefaultTypeInternal _NodeInfo_default_instance_; +PROTOBUF_CONSTEXPR RegionStat_ExtensionsEntry_DoNotUse::RegionStat_ExtensionsEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct RegionStat_ExtensionsEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RegionStat_ExtensionsEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RegionStat_ExtensionsEntry_DoNotUseDefaultTypeInternal() {} + union { + RegionStat_ExtensionsEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionStat_ExtensionsEntry_DoNotUseDefaultTypeInternal _RegionStat_ExtensionsEntry_DoNotUse_default_instance_; PROTOBUF_CONSTEXPR RegionStat::RegionStat( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.engine_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + /*decltype(_impl_.extensions_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.engine_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.region_id_)*/uint64_t{0u} , /*decltype(_impl_.rcus_)*/int64_t{0} , /*decltype(_impl_.wcus_)*/int64_t{0} @@ -171,7 +183,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT } // namespace meta } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[9]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[10]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fmeta_2fheartbeat_2eproto[1]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fmeta_2fheartbeat_2eproto = nullptr; @@ -199,6 +211,16 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets[] P PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.version_), PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.git_commit_), PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.start_time_ms_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse, value_), + 0, + 1, ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat, _internal_metadata_), ~0u, // no _extensions_ @@ -211,6 +233,7 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets[] P PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat, _impl_.approximate_bytes_), PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat, _impl_.engine_), PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat, _impl_.role_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat, _impl_.extensions_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::HeartbeatResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -270,18 +293,20 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets[] P static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::greptime::v1::meta::HeartbeatRequest)}, { 14, -1, -1, sizeof(::greptime::v1::meta::NodeInfo)}, - { 23, -1, -1, sizeof(::greptime::v1::meta::RegionStat)}, - { 35, -1, -1, sizeof(::greptime::v1::meta::HeartbeatResponse)}, - { 44, -1, -1, sizeof(::greptime::v1::meta::GrantedRegion)}, - { 52, -1, -1, sizeof(::greptime::v1::meta::RegionLease)}, - { 62, -1, -1, sizeof(::greptime::v1::meta::AskLeaderRequest)}, - { 69, -1, -1, sizeof(::greptime::v1::meta::AskLeaderResponse)}, - { 77, -1, -1, sizeof(::greptime::v1::meta::MailboxMessage)}, + { 23, 31, -1, sizeof(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse)}, + { 33, -1, -1, sizeof(::greptime::v1::meta::RegionStat)}, + { 46, -1, -1, sizeof(::greptime::v1::meta::HeartbeatResponse)}, + { 55, -1, -1, sizeof(::greptime::v1::meta::GrantedRegion)}, + { 63, -1, -1, sizeof(::greptime::v1::meta::RegionLease)}, + { 73, -1, -1, sizeof(::greptime::v1::meta::AskLeaderRequest)}, + { 80, -1, -1, sizeof(::greptime::v1::meta::AskLeaderResponse)}, + { 88, -1, -1, sizeof(::greptime::v1::meta::MailboxMessage)}, }; static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::meta::_HeartbeatRequest_default_instance_._instance, &::greptime::v1::meta::_NodeInfo_default_instance_._instance, + &::greptime::v1::meta::_RegionStat_ExtensionsEntry_DoNotUse_default_instance_._instance, &::greptime::v1::meta::_RegionStat_default_instance_._instance, &::greptime::v1::meta::_HeartbeatResponse_default_instance_._instance, &::greptime::v1::meta::_GrantedRegion_default_instance_._instance, @@ -305,45 +330,48 @@ const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto[] "och\030\007 \001(\004\022(\n\004info\030\010 \001(\0132\032.greptime.v1.me" "ta.NodeInfo\"F\n\010NodeInfo\022\017\n\007version\030\001 \001(\t" "\022\022\n\ngit_commit\030\002 \001(\t\022\025\n\rstart_time_ms\030\003 " - "\001(\004\"\222\001\n\nRegionStat\022\021\n\tregion_id\030\001 \001(\004\022\014\n" + "\001(\004\"\207\002\n\nRegionStat\022\021\n\tregion_id\030\001 \001(\004\022\014\n" "\004rcus\030\002 \001(\003\022\014\n\004wcus\030\003 \001(\003\022\031\n\021approximate" "_bytes\030\004 \001(\003\022\016\n\006engine\030\006 \001(\t\022*\n\004role\030\007 \001" - "(\0162\034.greptime.v1.meta.RegionRole\"\265\001\n\021Hea" - "rtbeatResponse\0220\n\006header\030\001 \001(\0132 .greptim" - "e.v1.meta.ResponseHeader\0229\n\017mailbox_mess" - "age\030\002 \001(\0132 .greptime.v1.meta.MailboxMess" - "age\0223\n\014region_lease\030\003 \001(\0132\035.greptime.v1." - "meta.RegionLease\"N\n\rGrantedRegion\022\021\n\treg" - "ion_id\030\001 \001(\004\022*\n\004role\030\002 \001(\0162\034.greptime.v1" - ".meta.RegionRole\"\222\001\n\013RegionLease\0220\n\007regi" - "ons\030\001 \003(\0132\037.greptime.v1.meta.GrantedRegi" - "on\022\034\n\024duration_since_epoch\030\002 \001(\004\022\025\n\rleas" - "e_seconds\030\003 \001(\004\022\034\n\024closeable_region_ids\030" - "\004 \003(\004\"C\n\020AskLeaderRequest\022/\n\006header\030\001 \001(" - "\0132\037.greptime.v1.meta.RequestHeader\"m\n\021As" - "kLeaderResponse\0220\n\006header\030\001 \001(\0132 .grepti" - "me.v1.meta.ResponseHeader\022&\n\006leader\030\002 \001(" - "\0132\026.greptime.v1.meta.Peer\"|\n\016MailboxMess" - "age\022\n\n\002id\030\001 \001(\004\022\017\n\007subject\030\002 \001(\t\022\014\n\004from" - "\030\003 \001(\t\022\n\n\002to\030\004 \001(\t\022\030\n\020timestamp_millis\030\005" - " \001(\003\022\016\n\004json\030\006 \001(\tH\000B\t\n\007payload*&\n\nRegio" - "nRole\022\n\n\006Leader\020\000\022\014\n\010Follower\020\0012\277\001\n\tHear" - "tbeat\022Z\n\tHeartbeat\022\".greptime.v1.meta.He" - "artbeatRequest\032#.greptime.v1.meta.Heartb" - "eatResponse\"\000(\0010\001\022V\n\tAskLeader\022\".greptim" - "e.v1.meta.AskLeaderRequest\032#.greptime.v1" - ".meta.AskLeaderResponse\"\000BOwnCustomDestructor(this, &RegionStat::ArenaDtor); + } // @@protoc_insertion_point(arena_constructor:greptime.v1.meta.RegionStat) } RegionStat::RegionStat(const RegionStat& from) : ::PROTOBUF_NAMESPACE_ID::Message() { RegionStat* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.engine_){} + /*decltype(_impl_.extensions_)*/{} + , decltype(_impl_.engine_){} , decltype(_impl_.region_id_){} , decltype(_impl_.rcus_){} , decltype(_impl_.wcus_){} @@ -1145,6 +1191,7 @@ RegionStat::RegionStat(const RegionStat& from) , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.extensions_.MergeFrom(from._impl_.extensions_); _impl_.engine_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.engine_.Set("", GetArenaForAllocation()); @@ -1164,7 +1211,8 @@ inline void RegionStat::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.engine_){} + /*decltype(_impl_.extensions_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.engine_){} , decltype(_impl_.region_id_){uint64_t{0u}} , decltype(_impl_.rcus_){int64_t{0}} , decltype(_impl_.wcus_){int64_t{0}} @@ -1182,6 +1230,7 @@ RegionStat::~RegionStat() { // @@protoc_insertion_point(destructor:greptime.v1.meta.RegionStat) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; + ArenaDtor(this); return; } SharedDtor(); @@ -1189,9 +1238,15 @@ RegionStat::~RegionStat() { inline void RegionStat::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.extensions_.Destruct(); + _impl_.extensions_.~MapField(); _impl_.engine_.Destroy(); } +void RegionStat::ArenaDtor(void* object) { + RegionStat* _this = reinterpret_cast< RegionStat* >(object); + _this->_impl_.extensions_.Destruct(); +} void RegionStat::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } @@ -1202,6 +1257,7 @@ void RegionStat::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + _impl_.extensions_.Clear(); _impl_.engine_.ClearToEmpty(); ::memset(&_impl_.region_id_, 0, static_cast( reinterpret_cast(&_impl_.role_) - @@ -1266,6 +1322,19 @@ const char* RegionStat::_InternalParse(const char* ptr, ::_pbi::ParseContext* ct } else goto handle_unusual; continue; + // map extensions = 99; + case 99: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 2; + do { + ptr += 2; + ptr = ctx->ParseMessage(&_impl_.extensions_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<794>(ptr)); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -1336,6 +1405,32 @@ uint8_t* RegionStat::_InternalSerialize( 7, this->_internal_role(), target); } + // map extensions = 99; + if (!this->_internal_extensions().empty()) { + using MapType = ::_pb::Map; + using WireHelper = RegionStat_ExtensionsEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_extensions(); + auto check_utf8 = [](const MapType::value_type& entry) { + (void)entry; + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.meta.RegionStat.ExtensionsEntry.key"); + }; + + if (stream->IsSerializationDeterministic() && map_field.size() > 1) { + for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { + target = WireHelper::InternalSerialize(99, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } else { + for (const auto& entry : map_field) { + target = WireHelper::InternalSerialize(99, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -1352,6 +1447,15 @@ size_t RegionStat::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // map extensions = 99; + total_size += 2 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_extensions_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->_internal_extensions().begin(); + it != this->_internal_extensions().end(); ++it) { + total_size += RegionStat_ExtensionsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + // string engine = 6; if (!this->_internal_engine().empty()) { total_size += 1 + @@ -1403,6 +1507,7 @@ void RegionStat::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PRO uint32_t cached_has_bits = 0; (void) cached_has_bits; + _this->_impl_.extensions_.MergeFrom(from._impl_.extensions_); if (!from._internal_engine().empty()) { _this->_internal_set_engine(from._internal_engine()); } @@ -1440,6 +1545,7 @@ void RegionStat::InternalSwap(RegionStat* other) { auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.extensions_.InternalSwap(&other->_impl_.extensions_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.engine_, lhs_arena, &other->_impl_.engine_, rhs_arena @@ -1455,7 +1561,7 @@ void RegionStat::InternalSwap(RegionStat* other) { ::PROTOBUF_NAMESPACE_ID::Metadata RegionStat::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[2]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[3]); } // =================================================================== @@ -1741,7 +1847,7 @@ void HeartbeatResponse::InternalSwap(HeartbeatResponse* other) { ::PROTOBUF_NAMESPACE_ID::Metadata HeartbeatResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[3]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[4]); } // =================================================================== @@ -1955,7 +2061,7 @@ void GrantedRegion::InternalSwap(GrantedRegion* other) { ::PROTOBUF_NAMESPACE_ID::Metadata GrantedRegion::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[4]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[5]); } // =================================================================== @@ -2242,7 +2348,7 @@ void RegionLease::InternalSwap(RegionLease* other) { ::PROTOBUF_NAMESPACE_ID::Metadata RegionLease::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[5]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[6]); } // =================================================================== @@ -2441,7 +2547,7 @@ void AskLeaderRequest::InternalSwap(AskLeaderRequest* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AskLeaderRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[6]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[7]); } // =================================================================== @@ -2692,7 +2798,7 @@ void AskLeaderResponse::InternalSwap(AskLeaderResponse* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AskLeaderResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[7]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[8]); } // =================================================================== @@ -3132,7 +3238,7 @@ void MailboxMessage::InternalSwap(MailboxMessage* other) { ::PROTOBUF_NAMESPACE_ID::Metadata MailboxMessage::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[8]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[9]); } // @@protoc_insertion_point(namespace_scope) @@ -3148,6 +3254,10 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::meta::NodeInfo* Arena::CreateMaybeMessage< ::greptime::v1::meta::NodeInfo >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::meta::NodeInfo >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse* +Arena::CreateMaybeMessage< ::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse >(arena); +} template<> PROTOBUF_NOINLINE ::greptime::v1::meta::RegionStat* Arena::CreateMaybeMessage< ::greptime::v1::meta::RegionStat >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::meta::RegionStat >(arena); diff --git a/c++/greptime/v1/meta/heartbeat.pb.h b/c++/greptime/v1/meta/heartbeat.pb.h index b9a7a2d8..ce72d075 100644 --- a/c++/greptime/v1/meta/heartbeat.pb.h +++ b/c++/greptime/v1/meta/heartbeat.pb.h @@ -29,6 +29,9 @@ #include #include // IWYU pragma: export #include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include #include #include #include "greptime/v1/meta/common.pb.h" @@ -76,6 +79,9 @@ extern RegionLeaseDefaultTypeInternal _RegionLease_default_instance_; class RegionStat; struct RegionStatDefaultTypeInternal; extern RegionStatDefaultTypeInternal _RegionStat_default_instance_; +class RegionStat_ExtensionsEntry_DoNotUse; +struct RegionStat_ExtensionsEntry_DoNotUseDefaultTypeInternal; +extern RegionStat_ExtensionsEntry_DoNotUseDefaultTypeInternal _RegionStat_ExtensionsEntry_DoNotUse_default_instance_; } // namespace meta } // namespace v1 } // namespace greptime @@ -89,6 +95,7 @@ template<> ::greptime::v1::meta::MailboxMessage* Arena::CreateMaybeMessage<::gre template<> ::greptime::v1::meta::NodeInfo* Arena::CreateMaybeMessage<::greptime::v1::meta::NodeInfo>(Arena*); template<> ::greptime::v1::meta::RegionLease* Arena::CreateMaybeMessage<::greptime::v1::meta::RegionLease>(Arena*); template<> ::greptime::v1::meta::RegionStat* Arena::CreateMaybeMessage<::greptime::v1::meta::RegionStat>(Arena*); +template<> ::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace greptime { namespace v1 { @@ -580,6 +587,32 @@ class NodeInfo final : }; // ------------------------------------------------------------------- +class RegionStat_ExtensionsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + RegionStat_ExtensionsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR RegionStat_ExtensionsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit RegionStat_ExtensionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const RegionStat_ExtensionsEntry_DoNotUse& other); + static const RegionStat_ExtensionsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_RegionStat_ExtensionsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "greptime.v1.meta.RegionStat.ExtensionsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto; +}; + +// ------------------------------------------------------------------- + class RegionStat final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.RegionStat) */ { public: @@ -628,7 +661,7 @@ class RegionStat final : &_RegionStat_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 3; friend void swap(RegionStat& a, RegionStat& b) { a.Swap(&b); @@ -689,6 +722,8 @@ class RegionStat final : protected: explicit RegionStat(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); + private: + static void ArenaDtor(void* object); public: static const ClassData _class_data_; @@ -698,9 +733,11 @@ class RegionStat final : // nested types ---------------------------------------------------- + // accessors ------------------------------------------------------- enum : int { + kExtensionsFieldNumber = 99, kEngineFieldNumber = 6, kRegionIdFieldNumber = 1, kRcusFieldNumber = 2, @@ -708,6 +745,23 @@ class RegionStat final : kApproximateBytesFieldNumber = 4, kRoleFieldNumber = 7, }; + // map extensions = 99; + int extensions_size() const; + private: + int _internal_extensions_size() const; + public: + void clear_extensions(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_extensions() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_extensions(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + extensions() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_extensions(); + // string engine = 6; void clear_engine(); const std::string& engine() const; @@ -775,6 +829,11 @@ class RegionStat final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + RegionStat_ExtensionsEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BYTES> extensions_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr engine_; uint64_t region_id_; int64_t rcus_; @@ -836,7 +895,7 @@ class HeartbeatResponse final : &_HeartbeatResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 4; friend void swap(HeartbeatResponse& a, HeartbeatResponse& b) { a.Swap(&b); @@ -1033,7 +1092,7 @@ class GrantedRegion final : &_GrantedRegion_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 5; friend void swap(GrantedRegion& a, GrantedRegion& b) { a.Swap(&b); @@ -1192,7 +1251,7 @@ class RegionLease final : &_RegionLease_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 6; friend void swap(RegionLease& a, RegionLease& b) { a.Swap(&b); @@ -1396,7 +1455,7 @@ class AskLeaderRequest final : &_AskLeaderRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 7; friend void swap(AskLeaderRequest& a, AskLeaderRequest& b) { a.Swap(&b); @@ -1553,7 +1612,7 @@ class AskLeaderResponse final : &_AskLeaderResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 8; friend void swap(AskLeaderResponse& a, AskLeaderResponse& b) { a.Swap(&b); @@ -1735,7 +1794,7 @@ class MailboxMessage final : &_MailboxMessage_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 9; friend void swap(MailboxMessage& a, MailboxMessage& b) { a.Swap(&b); @@ -2576,6 +2635,8 @@ inline void NodeInfo::set_start_time_ms(uint64_t value) { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // RegionStat // uint64 region_id = 1; @@ -2728,6 +2789,35 @@ inline void RegionStat::set_role(::greptime::v1::meta::RegionRole value) { // @@protoc_insertion_point(field_set:greptime.v1.meta.RegionStat.role) } +// map extensions = 99; +inline int RegionStat::_internal_extensions_size() const { + return _impl_.extensions_.size(); +} +inline int RegionStat::extensions_size() const { + return _internal_extensions_size(); +} +inline void RegionStat::clear_extensions() { + _impl_.extensions_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +RegionStat::_internal_extensions() const { + return _impl_.extensions_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +RegionStat::extensions() const { + // @@protoc_insertion_point(field_map:greptime.v1.meta.RegionStat.extensions) + return _internal_extensions(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +RegionStat::_internal_mutable_extensions() { + return _impl_.extensions_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +RegionStat::mutable_extensions() { + // @@protoc_insertion_point(field_mutable_map:greptime.v1.meta.RegionStat.extensions) + return _internal_mutable_extensions(); +} + // ------------------------------------------------------------------- // HeartbeatResponse @@ -3734,6 +3824,8 @@ inline MailboxMessage::PayloadCase MailboxMessage::payload_case() const { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/c++/greptime/v1/region/server.pb.cc b/c++/greptime/v1/region/server.pb.cc index af96d172..14a8ba56 100644 --- a/c++/greptime/v1/region/server.pb.cc +++ b/c++/greptime/v1/region/server.pb.cc @@ -64,20 +64,20 @@ struct RegionRequestDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionRequestDefaultTypeInternal _RegionRequest_default_instance_; -PROTOBUF_CONSTEXPR RegionResponse_ExtensionEntry_DoNotUse::RegionResponse_ExtensionEntry_DoNotUse( +PROTOBUF_CONSTEXPR RegionResponse_ExtensionsEntry_DoNotUse::RegionResponse_ExtensionsEntry_DoNotUse( ::_pbi::ConstantInitialized) {} -struct RegionResponse_ExtensionEntry_DoNotUseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RegionResponse_ExtensionEntry_DoNotUseDefaultTypeInternal() +struct RegionResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RegionResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~RegionResponse_ExtensionEntry_DoNotUseDefaultTypeInternal() {} + ~RegionResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal() {} union { - RegionResponse_ExtensionEntry_DoNotUse _instance; + RegionResponse_ExtensionsEntry_DoNotUse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionResponse_ExtensionEntry_DoNotUseDefaultTypeInternal _RegionResponse_ExtensionEntry_DoNotUse_default_instance_; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal _RegionResponse_ExtensionsEntry_DoNotUse_default_instance_; PROTOBUF_CONSTEXPR RegionResponse::RegionResponse( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.extension_)*/{::_pbi::ConstantInitialized()} + /*decltype(_impl_.extensions_)*/{::_pbi::ConstantInitialized()} , /*decltype(_impl_.header_)*/nullptr , /*decltype(_impl_.affected_rows_)*/uint64_t{0u} , /*decltype(_impl_._cached_size_)*/{}} {} @@ -477,14 +477,14 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionRequest, _impl_.body_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionEntry_DoNotUse, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionEntry_DoNotUse, value_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ @@ -495,7 +495,7 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse, _impl_.header_), PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse, _impl_.affected_rows_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse, _impl_.extension_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse, _impl_.extensions_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::region::InsertRequests, _internal_metadata_), ~0u, // no _extensions_ @@ -703,7 +703,7 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 0, 8, -1, sizeof(::greptime::v1::region::RegionRequestHeader_TracingContextEntry_DoNotUse)}, { 10, -1, -1, sizeof(::greptime::v1::region::RegionRequestHeader)}, { 19, -1, -1, sizeof(::greptime::v1::region::RegionRequest)}, - { 40, 48, -1, sizeof(::greptime::v1::region::RegionResponse_ExtensionEntry_DoNotUse)}, + { 40, 48, -1, sizeof(::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse)}, { 50, -1, -1, sizeof(::greptime::v1::region::RegionResponse)}, { 59, -1, -1, sizeof(::greptime::v1::region::InsertRequests)}, { 66, -1, -1, sizeof(::greptime::v1::region::DeleteRequests)}, @@ -736,7 +736,7 @@ static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::region::_RegionRequestHeader_TracingContextEntry_DoNotUse_default_instance_._instance, &::greptime::v1::region::_RegionRequestHeader_default_instance_._instance, &::greptime::v1::region::_RegionRequest_default_instance_._instance, - &::greptime::v1::region::_RegionResponse_ExtensionEntry_DoNotUse_default_instance_._instance, + &::greptime::v1::region::_RegionResponse_ExtensionsEntry_DoNotUse_default_instance_._instance, &::greptime::v1::region::_RegionResponse_default_instance_._instance, &::greptime::v1::region::_InsertRequests_default_instance_._instance, &::greptime::v1::region::_DeleteRequests_default_instance_._instance, @@ -794,66 +794,66 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P "teRequestsH\000\0221\n\005drops\030\016 \001(\0132 .greptime.v" "1.region.DropRequestsH\000\0223\n\006alters\030\017 \001(\0132" "!.greptime.v1.region.AlterRequestsH\000B\006\n\004" - "body\"\314\001\n\016RegionResponse\022+\n\006header\030\001 \001(\0132" + "body\"\317\001\n\016RegionResponse\022+\n\006header\030\001 \001(\0132" "\033.greptime.v1.ResponseHeader\022\025\n\raffected" - "_rows\030\002 \001(\004\022D\n\textension\030\003 \003(\01321.greptim" - "e.v1.region.RegionResponse.ExtensionEntr" - "y\0320\n\016ExtensionEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - "e\030\002 \001(\014:\0028\001\"E\n\016InsertRequests\0223\n\010request" - "s\030\001 \003(\0132!.greptime.v1.region.InsertReque" - "st\"E\n\016DeleteRequests\0223\n\010requests\030\001 \003(\0132!" - ".greptime.v1.region.DeleteRequest\"C\n\rIns" - "ertRequest\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 " - "\001(\0132\021.greptime.v1.Rows\"C\n\rDeleteRequest\022" - "\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 \001(\0132\021.grept" - "ime.v1.Rows\"h\n\014QueryRequest\0227\n\006header\030\001 " - "\001(\0132\'.greptime.v1.region.RegionRequestHe" - "ader\022\021\n\tregion_id\030\002 \001(\004\022\014\n\004plan\030\003 \001(\014\"E\n" - "\016CreateRequests\0223\n\010requests\030\001 \003(\0132!.grep" - "time.v1.region.CreateRequest\"\200\002\n\rCreateR" - "equest\022\021\n\tregion_id\030\001 \001(\004\022\016\n\006engine\030\002 \001(" - "\t\0228\n\013column_defs\030\003 \003(\0132#.greptime.v1.reg" - "ion.RegionColumnDef\022\023\n\013primary_key\030\004 \003(\r" - "\022\014\n\004path\030\005 \001(\t\022\?\n\007options\030\006 \003(\0132..grepti" - "me.v1.region.CreateRequest.OptionsEntry\032" + "_rows\030\002 \001(\004\022F\n\nextensions\030\003 \003(\01322.grepti" + "me.v1.region.RegionResponse.ExtensionsEn" + "try\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + "alue\030\002 \001(\014:\0028\001\"E\n\016InsertRequests\0223\n\010requ" + "ests\030\001 \003(\0132!.greptime.v1.region.InsertRe" + "quest\"E\n\016DeleteRequests\0223\n\010requests\030\001 \003(" + "\0132!.greptime.v1.region.DeleteRequest\"C\n\r" + "InsertRequest\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows" + "\030\002 \001(\0132\021.greptime.v1.Rows\"C\n\rDeleteReque" + "st\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 \001(\0132\021.gr" + "eptime.v1.Rows\"h\n\014QueryRequest\0227\n\006header" + "\030\001 \001(\0132\'.greptime.v1.region.RegionReques" + "tHeader\022\021\n\tregion_id\030\002 \001(\004\022\014\n\004plan\030\003 \001(\014" + "\"E\n\016CreateRequests\0223\n\010requests\030\001 \003(\0132!.g" + "reptime.v1.region.CreateRequest\"\200\002\n\rCrea" + "teRequest\022\021\n\tregion_id\030\001 \001(\004\022\016\n\006engine\030\002" + " \001(\t\0228\n\013column_defs\030\003 \003(\0132#.greptime.v1." + "region.RegionColumnDef\022\023\n\013primary_key\030\004 " + "\003(\r\022\014\n\004path\030\005 \001(\t\022\?\n\007options\030\006 \003(\0132..gre" + "ptime.v1.region.CreateRequest.OptionsEnt" + "ry\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + "\030\002 \001(\t:\0028\001\"A\n\014DropRequests\0221\n\010requests\030\001" + " \003(\0132\037.greptime.v1.region.DropRequest\" \n" + "\013DropRequest\022\021\n\tregion_id\030\001 \001(\004\"\255\001\n\013Open" + "Request\022\021\n\tregion_id\030\001 \001(\004\022\016\n\006engine\030\002 \001" + "(\t\022\014\n\004path\030\003 \001(\t\022=\n\007options\030\004 \003(\0132,.grep" + "time.v1.region.OpenRequest.OptionsEntry\032" ".\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - "\001(\t:\0028\001\"A\n\014DropRequests\0221\n\010requests\030\001 \003(" - "\0132\037.greptime.v1.region.DropRequest\" \n\013Dr" - "opRequest\022\021\n\tregion_id\030\001 \001(\004\"\255\001\n\013OpenReq" - "uest\022\021\n\tregion_id\030\001 \001(\004\022\016\n\006engine\030\002 \001(\t\022" - "\014\n\004path\030\003 \001(\t\022=\n\007options\030\004 \003(\0132,.greptim" - "e.v1.region.OpenRequest.OptionsEntry\032.\n\014" - "OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" - ":\0028\001\"!\n\014CloseRequest\022\021\n\tregion_id\030\001 \001(\004\"" - "C\n\rAlterRequests\0222\n\010requests\030\001 \003(\0132 .gre" - "ptime.v1.region.AlterRequest\"\360\001\n\014AlterRe" - "quest\022\021\n\tregion_id\030\001 \001(\004\0225\n\013add_columns\030" - "\002 \001(\0132\036.greptime.v1.region.AddColumnsH\000\022" - "7\n\014drop_columns\030\003 \001(\0132\037.greptime.v1.regi" - "on.DropColumnsH\000\022=\n\023change_column_types\030" - "\005 \001(\0132\036.greptime.v1.ChangeColumnTypesH\000\022" - "\026\n\016schema_version\030\004 \001(\004B\006\n\004kind\"@\n\nAddCo" - "lumns\0222\n\013add_columns\030\001 \003(\0132\035.greptime.v1" - ".region.AddColumn\"C\n\013DropColumns\0224\n\014drop" - "_columns\030\001 \003(\0132\036.greptime.v1.region.Drop" - "Column\"v\n\tAddColumn\0227\n\ncolumn_def\030\001 \001(\0132" - "#.greptime.v1.region.RegionColumnDef\0220\n\010" - "location\030\003 \001(\0132\036.greptime.v1.AddColumnLo" - "cation\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t\"!\n\014Fl" - "ushRequest\022\021\n\tregion_id\030\001 \001(\004\"\t\n\007Regular" - "\"&\n\014StrictWindow\022\026\n\016window_seconds\030\001 \001(\003" - "\"\231\001\n\016CompactRequest\022\021\n\tregion_id\030\001 \001(\004\022." - "\n\007regular\030\002 \001(\0132\033.greptime.v1.region.Reg" - "ularH\000\0229\n\rstrict_window\030\003 \001(\0132 .greptime" - ".v1.region.StrictWindowH\000B\t\n\007options\"$\n\017" - "TruncateRequest\022\021\n\tregion_id\030\001 \001(\004\"P\n\017Re" - "gionColumnDef\022*\n\ncolumn_def\030\001 \001(\0132\026.grep" - "time.v1.ColumnDef\022\021\n\tcolumn_id\030\002 \001(\r2Y\n\006" - "Region\022O\n\006Handle\022!.greptime.v1.region.Re" - "gionRequest\032\".greptime.v1.region.RegionR" - "esponseB]\n\025io.greptime.v1.regionB\006Server" - "Z(from._internal_metadata_); - _this->_impl_.extension_.MergeFrom(from._impl_.extension_); + _this->_impl_.extensions_.MergeFrom(from._impl_.extensions_); if (from._internal_has_header()) { _this->_impl_.header_ = new ::greptime::v1::ResponseHeader(*from._impl_.header_); } @@ -2260,7 +2260,7 @@ inline void RegionResponse::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - /*decltype(_impl_.extension_)*/{::_pbi::ArenaInitialized(), arena} + /*decltype(_impl_.extensions_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_.header_){nullptr} , decltype(_impl_.affected_rows_){uint64_t{0u}} , /*decltype(_impl_._cached_size_)*/{} @@ -2279,14 +2279,14 @@ RegionResponse::~RegionResponse() { inline void RegionResponse::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.extension_.Destruct(); - _impl_.extension_.~MapField(); + _impl_.extensions_.Destruct(); + _impl_.extensions_.~MapField(); if (this != internal_default_instance()) delete _impl_.header_; } void RegionResponse::ArenaDtor(void* object) { RegionResponse* _this = reinterpret_cast< RegionResponse* >(object); - _this->_impl_.extension_.Destruct(); + _this->_impl_.extensions_.Destruct(); } void RegionResponse::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); @@ -2298,7 +2298,7 @@ void RegionResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.extension_.Clear(); + _impl_.extensions_.Clear(); if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { delete _impl_.header_; } @@ -2329,13 +2329,13 @@ const char* RegionResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext } else goto handle_unusual; continue; - // map extension = 3; + // map extensions = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(&_impl_.extension_, ptr); + ptr = ctx->ParseMessage(&_impl_.extensions_, ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); @@ -2384,17 +2384,17 @@ uint8_t* RegionResponse::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_affected_rows(), target); } - // map extension = 3; - if (!this->_internal_extension().empty()) { + // map extensions = 3; + if (!this->_internal_extensions().empty()) { using MapType = ::_pb::Map; - using WireHelper = RegionResponse_ExtensionEntry_DoNotUse::Funcs; - const auto& map_field = this->_internal_extension(); + using WireHelper = RegionResponse_ExtensionsEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_extensions(); auto check_utf8 = [](const MapType::value_type& entry) { (void)entry; ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( entry.first.data(), static_cast(entry.first.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "greptime.v1.region.RegionResponse.ExtensionEntry.key"); + "greptime.v1.region.RegionResponse.ExtensionsEntry.key"); }; if (stream->IsSerializationDeterministic() && map_field.size() > 1) { @@ -2426,13 +2426,13 @@ size_t RegionResponse::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // map extension = 3; + // map extensions = 3; total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_extension_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_extensions_size()); for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator - it = this->_internal_extension().begin(); - it != this->_internal_extension().end(); ++it) { - total_size += RegionResponse_ExtensionEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + it = this->_internal_extensions().begin(); + it != this->_internal_extensions().end(); ++it) { + total_size += RegionResponse_ExtensionsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); } // .greptime.v1.ResponseHeader header = 1; @@ -2465,7 +2465,7 @@ void RegionResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.extension_.MergeFrom(from._impl_.extension_); + _this->_impl_.extensions_.MergeFrom(from._impl_.extensions_); if (from._internal_has_header()) { _this->_internal_mutable_header()->::greptime::v1::ResponseHeader::MergeFrom( from._internal_header()); @@ -2490,7 +2490,7 @@ bool RegionResponse::IsInitialized() const { void RegionResponse::InternalSwap(RegionResponse* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.extension_.InternalSwap(&other->_impl_.extension_); + _impl_.extensions_.InternalSwap(&other->_impl_.extensions_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(RegionResponse, _impl_.affected_rows_) + sizeof(RegionResponse::_impl_.affected_rows_) @@ -7720,9 +7720,9 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::region::RegionRequest* Arena::CreateMaybeMessage< ::greptime::v1::region::RegionRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::region::RegionRequest >(arena); } -template<> PROTOBUF_NOINLINE ::greptime::v1::region::RegionResponse_ExtensionEntry_DoNotUse* -Arena::CreateMaybeMessage< ::greptime::v1::region::RegionResponse_ExtensionEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::greptime::v1::region::RegionResponse_ExtensionEntry_DoNotUse >(arena); +template<> PROTOBUF_NOINLINE ::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse* +Arena::CreateMaybeMessage< ::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse >(arena); } template<> PROTOBUF_NOINLINE ::greptime::v1::region::RegionResponse* Arena::CreateMaybeMessage< ::greptime::v1::region::RegionResponse >(Arena* arena) { diff --git a/c++/greptime/v1/region/server.pb.h b/c++/greptime/v1/region/server.pb.h index c4a953c6..3a9366a6 100644 --- a/c++/greptime/v1/region/server.pb.h +++ b/c++/greptime/v1/region/server.pb.h @@ -132,9 +132,9 @@ extern RegionRequestHeader_TracingContextEntry_DoNotUseDefaultTypeInternal _Regi class RegionResponse; struct RegionResponseDefaultTypeInternal; extern RegionResponseDefaultTypeInternal _RegionResponse_default_instance_; -class RegionResponse_ExtensionEntry_DoNotUse; -struct RegionResponse_ExtensionEntry_DoNotUseDefaultTypeInternal; -extern RegionResponse_ExtensionEntry_DoNotUseDefaultTypeInternal _RegionResponse_ExtensionEntry_DoNotUse_default_instance_; +class RegionResponse_ExtensionsEntry_DoNotUse; +struct RegionResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal; +extern RegionResponse_ExtensionsEntry_DoNotUseDefaultTypeInternal _RegionResponse_ExtensionsEntry_DoNotUse_default_instance_; class Regular; struct RegularDefaultTypeInternal; extern RegularDefaultTypeInternal _Regular_default_instance_; @@ -174,7 +174,7 @@ template<> ::greptime::v1::region::RegionRequest* Arena::CreateMaybeMessage<::gr template<> ::greptime::v1::region::RegionRequestHeader* Arena::CreateMaybeMessage<::greptime::v1::region::RegionRequestHeader>(Arena*); template<> ::greptime::v1::region::RegionRequestHeader_TracingContextEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::region::RegionRequestHeader_TracingContextEntry_DoNotUse>(Arena*); template<> ::greptime::v1::region::RegionResponse* Arena::CreateMaybeMessage<::greptime::v1::region::RegionResponse>(Arena*); -template<> ::greptime::v1::region::RegionResponse_ExtensionEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::region::RegionResponse_ExtensionEntry_DoNotUse>(Arena*); +template<> ::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse>(Arena*); template<> ::greptime::v1::region::Regular* Arena::CreateMaybeMessage<::greptime::v1::region::Regular>(Arena*); template<> ::greptime::v1::region::StrictWindow* Arena::CreateMaybeMessage<::greptime::v1::region::StrictWindow>(Arena*); template<> ::greptime::v1::region::TruncateRequest* Arena::CreateMaybeMessage<::greptime::v1::region::TruncateRequest>(Arena*); @@ -870,23 +870,23 @@ class RegionRequest final : }; // ------------------------------------------------------------------- -class RegionResponse_ExtensionEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - RegionResponse_ExtensionEntry_DoNotUse(); - explicit PROTOBUF_CONSTEXPR RegionResponse_ExtensionEntry_DoNotUse( + RegionResponse_ExtensionsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR RegionResponse_ExtensionsEntry_DoNotUse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit RegionResponse_ExtensionEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const RegionResponse_ExtensionEntry_DoNotUse& other); - static const RegionResponse_ExtensionEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_RegionResponse_ExtensionEntry_DoNotUse_default_instance_); } + explicit RegionResponse_ExtensionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const RegionResponse_ExtensionsEntry_DoNotUse& other); + static const RegionResponse_ExtensionsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_RegionResponse_ExtensionsEntry_DoNotUse_default_instance_); } static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "greptime.v1.region.RegionResponse.ExtensionEntry.key"); + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "greptime.v1.region.RegionResponse.ExtensionsEntry.key"); } static bool ValidateValue(void*) { return true; } using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; @@ -1020,26 +1020,26 @@ class RegionResponse final : // accessors ------------------------------------------------------- enum : int { - kExtensionFieldNumber = 3, + kExtensionsFieldNumber = 3, kHeaderFieldNumber = 1, kAffectedRowsFieldNumber = 2, }; - // map extension = 3; - int extension_size() const; + // map extensions = 3; + int extensions_size() const; private: - int _internal_extension_size() const; + int _internal_extensions_size() const; public: - void clear_extension(); + void clear_extensions(); private: const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - _internal_extension() const; + _internal_extensions() const; ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - _internal_mutable_extension(); + _internal_mutable_extensions(); public: const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - extension() const; + extensions() const; ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - mutable_extension(); + mutable_extensions(); // .greptime.v1.ResponseHeader header = 1; bool has_header() const; @@ -1077,10 +1077,10 @@ class RegionResponse final : typedef void DestructorSkippable_; struct Impl_ { ::PROTOBUF_NAMESPACE_ID::internal::MapField< - RegionResponse_ExtensionEntry_DoNotUse, + RegionResponse_ExtensionsEntry_DoNotUse, std::string, std::string, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BYTES> extension_; + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BYTES> extensions_; ::greptime::v1::ResponseHeader* header_; uint64_t affected_rows_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -6376,33 +6376,33 @@ inline void RegionResponse::set_affected_rows(uint64_t value) { // @@protoc_insertion_point(field_set:greptime.v1.region.RegionResponse.affected_rows) } -// map extension = 3; -inline int RegionResponse::_internal_extension_size() const { - return _impl_.extension_.size(); +// map extensions = 3; +inline int RegionResponse::_internal_extensions_size() const { + return _impl_.extensions_.size(); } -inline int RegionResponse::extension_size() const { - return _internal_extension_size(); +inline int RegionResponse::extensions_size() const { + return _internal_extensions_size(); } -inline void RegionResponse::clear_extension() { - _impl_.extension_.Clear(); +inline void RegionResponse::clear_extensions() { + _impl_.extensions_.Clear(); } inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -RegionResponse::_internal_extension() const { - return _impl_.extension_.GetMap(); +RegionResponse::_internal_extensions() const { + return _impl_.extensions_.GetMap(); } inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -RegionResponse::extension() const { - // @@protoc_insertion_point(field_map:greptime.v1.region.RegionResponse.extension) - return _internal_extension(); +RegionResponse::extensions() const { + // @@protoc_insertion_point(field_map:greptime.v1.region.RegionResponse.extensions) + return _internal_extensions(); } inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -RegionResponse::_internal_mutable_extension() { - return _impl_.extension_.MutableMap(); +RegionResponse::_internal_mutable_extensions() { + return _impl_.extensions_.MutableMap(); } inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -RegionResponse::mutable_extension() { - // @@protoc_insertion_point(field_mutable_map:greptime.v1.region.RegionResponse.extension) - return _internal_mutable_extension(); +RegionResponse::mutable_extensions() { + // @@protoc_insertion_point(field_mutable_map:greptime.v1.region.RegionResponse.extensions) + return _internal_mutable_extensions(); } // ------------------------------------------------------------------- diff --git a/go/greptime/v1/meta/heartbeat.pb.go b/go/greptime/v1/meta/heartbeat.pb.go index 2d7a436f..ade354bf 100644 --- a/go/greptime/v1/meta/heartbeat.pb.go +++ b/go/greptime/v1/meta/heartbeat.pb.go @@ -272,7 +272,8 @@ type RegionStat struct { // Engine name Engine string `protobuf:"bytes,6,opt,name=engine,proto3" json:"engine,omitempty"` // Region role - Role RegionRole `protobuf:"varint,7,opt,name=role,proto3,enum=greptime.v1.meta.RegionRole" json:"role,omitempty"` + Role RegionRole `protobuf:"varint,7,opt,name=role,proto3,enum=greptime.v1.meta.RegionRole" json:"role,omitempty"` + Extensions map[string][]byte `protobuf:"bytes,99,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *RegionStat) Reset() { @@ -349,6 +350,13 @@ func (x *RegionStat) GetRole() RegionRole { return RegionRole_Leader } +func (x *RegionStat) GetExtensions() map[string][]byte { + if x != nil { + return x.Extensions + } + return nil +} + type HeartbeatResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -796,7 +804,7 @@ var file_greptime_v1_meta_heartbeat_proto_rawDesc = []byte{ 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x22, 0xc8, 0x01, 0x0a, + 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x22, 0xd5, 0x02, 0x0a, 0x0a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x63, 0x75, 0x73, @@ -809,83 +817,91 @@ var file_greptime_v1_meta_heartbeat_proto_rawDesc = []byte{ 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, - 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x72, - 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, - 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, - 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x0f, 0x6d, 0x61, 0x69, 0x6c, 0x62, - 0x6f, 0x78, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, - 0x65, 0x74, 0x61, 0x2e, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x61, - 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4c, - 0x65, 0x61, 0x73, 0x65, 0x22, 0x5e, 0x0a, 0x0d, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x52, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, - 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, - 0x72, 0x6f, 0x6c, 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4c, - 0x65, 0x61, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x30, 0x0a, 0x14, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x6e, 0x63, - 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45, 0x70, 0x6f, 0x63, - 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x04, 0x52, 0x12, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x4b, 0x0a, 0x10, 0x41, 0x73, 0x6b, 0x4c, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x7d, 0x0a, 0x11, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, + 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x63, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x72, + 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xda, 0x01, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, + 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x06, 0x6c, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x22, 0xaa, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, - 0x12, 0x14, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x2a, 0x26, 0x0a, 0x0a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x12, - 0x0a, 0x0a, 0x06, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, - 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x10, 0x01, 0x32, 0xbf, 0x01, 0x0a, 0x09, 0x48, 0x65, - 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, - 0x62, 0x65, 0x61, 0x74, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72, - 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x09, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, - 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, - 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x0f, 0x6d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x5f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x0e, 0x6d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x40, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4c, + 0x65, 0x61, 0x73, 0x65, 0x52, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x61, 0x73, + 0x65, 0x22, 0x5e, 0x0a, 0x0d, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x30, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, + 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, + 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x61, 0x73, + 0x65, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x23, + 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x04, 0x52, 0x12, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x4b, 0x0a, 0x10, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x22, 0x7d, 0x0a, 0x11, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x2e, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x22, 0xaa, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, + 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x74, 0x6f, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, + 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x14, 0x0a, + 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6a, + 0x73, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x26, + 0x0a, 0x0a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0a, 0x0a, 0x06, + 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x6f, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x72, 0x10, 0x01, 0x32, 0xbf, 0x01, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, + 0x62, 0x65, 0x61, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, + 0x74, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, + 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, + 0x12, 0x56, 0x0a, 0x09, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x22, 0x2e, + 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, + 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -901,7 +917,7 @@ func file_greptime_v1_meta_heartbeat_proto_rawDescGZIP() []byte { } var file_greptime_v1_meta_heartbeat_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_greptime_v1_meta_heartbeat_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_greptime_v1_meta_heartbeat_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_greptime_v1_meta_heartbeat_proto_goTypes = []interface{}{ (RegionRole)(0), // 0: greptime.v1.meta.RegionRole (*HeartbeatRequest)(nil), // 1: greptime.v1.meta.HeartbeatRequest @@ -913,36 +929,38 @@ var file_greptime_v1_meta_heartbeat_proto_goTypes = []interface{}{ (*AskLeaderRequest)(nil), // 7: greptime.v1.meta.AskLeaderRequest (*AskLeaderResponse)(nil), // 8: greptime.v1.meta.AskLeaderResponse (*MailboxMessage)(nil), // 9: greptime.v1.meta.MailboxMessage - (*RequestHeader)(nil), // 10: greptime.v1.meta.RequestHeader - (*Peer)(nil), // 11: greptime.v1.meta.Peer - (*TimeInterval)(nil), // 12: greptime.v1.meta.TimeInterval - (*ResponseHeader)(nil), // 13: greptime.v1.meta.ResponseHeader + nil, // 10: greptime.v1.meta.RegionStat.ExtensionsEntry + (*RequestHeader)(nil), // 11: greptime.v1.meta.RequestHeader + (*Peer)(nil), // 12: greptime.v1.meta.Peer + (*TimeInterval)(nil), // 13: greptime.v1.meta.TimeInterval + (*ResponseHeader)(nil), // 14: greptime.v1.meta.ResponseHeader } var file_greptime_v1_meta_heartbeat_proto_depIdxs = []int32{ - 10, // 0: greptime.v1.meta.HeartbeatRequest.header:type_name -> greptime.v1.meta.RequestHeader - 11, // 1: greptime.v1.meta.HeartbeatRequest.peer:type_name -> greptime.v1.meta.Peer - 12, // 2: greptime.v1.meta.HeartbeatRequest.report_interval:type_name -> greptime.v1.meta.TimeInterval + 11, // 0: greptime.v1.meta.HeartbeatRequest.header:type_name -> greptime.v1.meta.RequestHeader + 12, // 1: greptime.v1.meta.HeartbeatRequest.peer:type_name -> greptime.v1.meta.Peer + 13, // 2: greptime.v1.meta.HeartbeatRequest.report_interval:type_name -> greptime.v1.meta.TimeInterval 3, // 3: greptime.v1.meta.HeartbeatRequest.region_stats:type_name -> greptime.v1.meta.RegionStat 9, // 4: greptime.v1.meta.HeartbeatRequest.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage 2, // 5: greptime.v1.meta.HeartbeatRequest.info:type_name -> greptime.v1.meta.NodeInfo 0, // 6: greptime.v1.meta.RegionStat.role:type_name -> greptime.v1.meta.RegionRole - 13, // 7: greptime.v1.meta.HeartbeatResponse.header:type_name -> greptime.v1.meta.ResponseHeader - 9, // 8: greptime.v1.meta.HeartbeatResponse.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage - 6, // 9: greptime.v1.meta.HeartbeatResponse.region_lease:type_name -> greptime.v1.meta.RegionLease - 0, // 10: greptime.v1.meta.GrantedRegion.role:type_name -> greptime.v1.meta.RegionRole - 5, // 11: greptime.v1.meta.RegionLease.regions:type_name -> greptime.v1.meta.GrantedRegion - 10, // 12: greptime.v1.meta.AskLeaderRequest.header:type_name -> greptime.v1.meta.RequestHeader - 13, // 13: greptime.v1.meta.AskLeaderResponse.header:type_name -> greptime.v1.meta.ResponseHeader - 11, // 14: greptime.v1.meta.AskLeaderResponse.leader:type_name -> greptime.v1.meta.Peer - 1, // 15: greptime.v1.meta.Heartbeat.Heartbeat:input_type -> greptime.v1.meta.HeartbeatRequest - 7, // 16: greptime.v1.meta.Heartbeat.AskLeader:input_type -> greptime.v1.meta.AskLeaderRequest - 4, // 17: greptime.v1.meta.Heartbeat.Heartbeat:output_type -> greptime.v1.meta.HeartbeatResponse - 8, // 18: greptime.v1.meta.Heartbeat.AskLeader:output_type -> greptime.v1.meta.AskLeaderResponse - 17, // [17:19] is the sub-list for method output_type - 15, // [15:17] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 10, // 7: greptime.v1.meta.RegionStat.extensions:type_name -> greptime.v1.meta.RegionStat.ExtensionsEntry + 14, // 8: greptime.v1.meta.HeartbeatResponse.header:type_name -> greptime.v1.meta.ResponseHeader + 9, // 9: greptime.v1.meta.HeartbeatResponse.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage + 6, // 10: greptime.v1.meta.HeartbeatResponse.region_lease:type_name -> greptime.v1.meta.RegionLease + 0, // 11: greptime.v1.meta.GrantedRegion.role:type_name -> greptime.v1.meta.RegionRole + 5, // 12: greptime.v1.meta.RegionLease.regions:type_name -> greptime.v1.meta.GrantedRegion + 11, // 13: greptime.v1.meta.AskLeaderRequest.header:type_name -> greptime.v1.meta.RequestHeader + 14, // 14: greptime.v1.meta.AskLeaderResponse.header:type_name -> greptime.v1.meta.ResponseHeader + 12, // 15: greptime.v1.meta.AskLeaderResponse.leader:type_name -> greptime.v1.meta.Peer + 1, // 16: greptime.v1.meta.Heartbeat.Heartbeat:input_type -> greptime.v1.meta.HeartbeatRequest + 7, // 17: greptime.v1.meta.Heartbeat.AskLeader:input_type -> greptime.v1.meta.AskLeaderRequest + 4, // 18: greptime.v1.meta.Heartbeat.Heartbeat:output_type -> greptime.v1.meta.HeartbeatResponse + 8, // 19: greptime.v1.meta.Heartbeat.AskLeader:output_type -> greptime.v1.meta.AskLeaderResponse + 18, // [18:20] is the sub-list for method output_type + 16, // [16:18] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_greptime_v1_meta_heartbeat_proto_init() } @@ -1070,7 +1088,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_meta_heartbeat_proto_rawDesc, NumEnums: 1, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/java/src/main/java/greptime/v1/meta/HeartbeatOuterClass.java b/java/src/main/java/greptime/v1/meta/HeartbeatOuterClass.java index d3599642..919330d8 100644 --- a/java/src/main/java/greptime/v1/meta/HeartbeatOuterClass.java +++ b/java/src/main/java/greptime/v1/meta/HeartbeatOuterClass.java @@ -3383,6 +3383,42 @@ public interface RegionStatOrBuilder extends * @return The role. */ greptime.v1.meta.HeartbeatOuterClass.RegionRole getRole(); + + /** + * map<string, bytes> extensions = 99; + */ + int getExtensionsCount(); + /** + * map<string, bytes> extensions = 99; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + * map<string, bytes> extensions = 99; + */ + java.util.Map + getExtensionsMap(); + /** + * map<string, bytes> extensions = 99; + */ + + /* nullable */ +com.google.protobuf.ByteString getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.ByteString defaultValue); + /** + * map<string, bytes> extensions = 99; + */ + + com.google.protobuf.ByteString getExtensionsOrThrow( + java.lang.String key); } /** * Protobuf type {@code greptime.v1.meta.RegionStat} @@ -3421,6 +3457,7 @@ private RegionStat( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -3463,6 +3500,19 @@ private RegionStat( role_ = rawValue; break; } + case 794: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + extensions_ = com.google.protobuf.MapField.newMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + extensions_.getMutableMap().put( + extensions__.getKey(), extensions__.getValue()); + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -3489,6 +3539,18 @@ private RegionStat( return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionStat_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 99: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -3626,6 +3688,87 @@ public java.lang.String getEngine() { return result == null ? greptime.v1.meta.HeartbeatOuterClass.RegionRole.UNRECOGNIZED : result; } + public static final int EXTENSIONS_FIELD_NUMBER = 99; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.ByteString> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionStat_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.BYTES, + com.google.protobuf.ByteString.EMPTY); + } + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.ByteString> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + * map<string, bytes> extensions = 99; + */ + + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + * map<string, bytes> extensions = 99; + */ + @java.lang.Override + + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + * map<string, bytes> extensions = 99; + */ + @java.lang.Override + + public com.google.protobuf.ByteString getExtensionsOrDefault( + java.lang.String key, + com.google.protobuf.ByteString defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, bytes> extensions = 99; + */ + @java.lang.Override + + public com.google.protobuf.ByteString getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -3658,6 +3801,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (role_ != greptime.v1.meta.HeartbeatOuterClass.RegionRole.Leader.getNumber()) { output.writeEnum(7, role_); } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 99); unknownFields.writeTo(output); } @@ -3690,6 +3839,16 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(7, role_); } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(99, extensions__); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3716,6 +3875,8 @@ public boolean equals(final java.lang.Object obj) { if (!getEngine() .equals(other.getEngine())) return false; if (role_ != other.role_) return false; + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3743,6 +3904,10 @@ public int hashCode() { hash = (53 * hash) + getEngine().hashCode(); hash = (37 * hash) + ROLE_FIELD_NUMBER; hash = (53 * hash) + role_; + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -3850,6 +4015,28 @@ public static final class Builder extends return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionStat_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 99: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 99: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -3888,6 +4075,7 @@ public Builder clear() { role_ = 0; + internalGetMutableExtensions().clear(); return this; } @@ -3914,12 +4102,15 @@ public greptime.v1.meta.HeartbeatOuterClass.RegionStat build() { @java.lang.Override public greptime.v1.meta.HeartbeatOuterClass.RegionStat buildPartial() { greptime.v1.meta.HeartbeatOuterClass.RegionStat result = new greptime.v1.meta.HeartbeatOuterClass.RegionStat(this); + int from_bitField0_ = bitField0_; result.regionId_ = regionId_; result.rcus_ = rcus_; result.wcus_ = wcus_; result.approximateBytes_ = approximateBytes_; result.engine_ = engine_; result.role_ = role_; + result.extensions_ = internalGetExtensions(); + result.extensions_.makeImmutable(); onBuilt(); return result; } @@ -3987,6 +4178,8 @@ public Builder mergeFrom(greptime.v1.meta.HeartbeatOuterClass.RegionStat other) if (other.role_ != 0) { setRoleValue(other.getRoleValue()); } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4015,6 +4208,7 @@ public Builder mergeFrom( } return this; } + private int bitField0_; private long regionId_ ; /** @@ -4345,6 +4539,137 @@ public Builder clearRole() { onChanged(); return this; } + + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.ByteString> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + private com.google.protobuf.MapField + internalGetMutableExtensions() { + onChanged();; + if (extensions_ == null) { + extensions_ = com.google.protobuf.MapField.newMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + if (!extensions_.isMutable()) { + extensions_ = extensions_.copy(); + } + return extensions_; + } + + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + * map<string, bytes> extensions = 99; + */ + + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + * map<string, bytes> extensions = 99; + */ + @java.lang.Override + + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + * map<string, bytes> extensions = 99; + */ + @java.lang.Override + + public com.google.protobuf.ByteString getExtensionsOrDefault( + java.lang.String key, + com.google.protobuf.ByteString defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, bytes> extensions = 99; + */ + @java.lang.Override + + public com.google.protobuf.ByteString getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearExtensions() { + internalGetMutableExtensions().getMutableMap() + .clear(); + return this; + } + /** + * map<string, bytes> extensions = 99; + */ + + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + return internalGetMutableExtensions().getMutableMap(); + } + /** + * map<string, bytes> extensions = 99; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.ByteString value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableExtensions().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, bytes> extensions = 99; + */ + + public Builder putAllExtensions( + java.util.Map values) { + internalGetMutableExtensions().getMutableMap() + .putAll(values); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -9985,6 +10310,11 @@ public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage getDefaultInstanceFor private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_meta_RegionStat_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_meta_RegionStat_ExtensionsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_meta_RegionStat_ExtensionsEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_meta_HeartbeatResponse_descriptor; private static final @@ -10037,36 +10367,39 @@ public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage getDefaultInstanceFor "och\030\007 \001(\004\022(\n\004info\030\010 \001(\0132\032.greptime.v1.me" + "ta.NodeInfo\"F\n\010NodeInfo\022\017\n\007version\030\001 \001(\t" + "\022\022\n\ngit_commit\030\002 \001(\t\022\025\n\rstart_time_ms\030\003 " + - "\001(\004\"\222\001\n\nRegionStat\022\021\n\tregion_id\030\001 \001(\004\022\014\n" + + "\001(\004\"\207\002\n\nRegionStat\022\021\n\tregion_id\030\001 \001(\004\022\014\n" + "\004rcus\030\002 \001(\003\022\014\n\004wcus\030\003 \001(\003\022\031\n\021approximate" + "_bytes\030\004 \001(\003\022\016\n\006engine\030\006 \001(\t\022*\n\004role\030\007 \001" + - "(\0162\034.greptime.v1.meta.RegionRole\"\265\001\n\021Hea" + - "rtbeatResponse\0220\n\006header\030\001 \001(\0132 .greptim" + - "e.v1.meta.ResponseHeader\0229\n\017mailbox_mess" + - "age\030\002 \001(\0132 .greptime.v1.meta.MailboxMess" + - "age\0223\n\014region_lease\030\003 \001(\0132\035.greptime.v1." + - "meta.RegionLease\"N\n\rGrantedRegion\022\021\n\treg" + - "ion_id\030\001 \001(\004\022*\n\004role\030\002 \001(\0162\034.greptime.v1" + - ".meta.RegionRole\"\222\001\n\013RegionLease\0220\n\007regi" + - "ons\030\001 \003(\0132\037.greptime.v1.meta.GrantedRegi" + - "on\022\034\n\024duration_since_epoch\030\002 \001(\004\022\025\n\rleas" + - "e_seconds\030\003 \001(\004\022\034\n\024closeable_region_ids\030" + - "\004 \003(\004\"C\n\020AskLeaderRequest\022/\n\006header\030\001 \001(" + - "\0132\037.greptime.v1.meta.RequestHeader\"m\n\021As" + - "kLeaderResponse\0220\n\006header\030\001 \001(\0132 .grepti" + - "me.v1.meta.ResponseHeader\022&\n\006leader\030\002 \001(" + - "\0132\026.greptime.v1.meta.Peer\"|\n\016MailboxMess" + - "age\022\n\n\002id\030\001 \001(\004\022\017\n\007subject\030\002 \001(\t\022\014\n\004from" + - "\030\003 \001(\t\022\n\n\002to\030\004 \001(\t\022\030\n\020timestamp_millis\030\005" + - " \001(\003\022\016\n\004json\030\006 \001(\tH\000B\t\n\007payload*&\n\nRegio" + - "nRole\022\n\n\006Leader\020\000\022\014\n\010Follower\020\0012\277\001\n\tHear" + - "tbeat\022Z\n\tHeartbeat\022\".greptime.v1.meta.He" + - "artbeatRequest\032#.greptime.v1.meta.Heartb" + - "eatResponse\"\000(\0010\001\022V\n\tAskLeader\022\".greptim" + - "e.v1.meta.AskLeaderRequest\032#.greptime.v1" + - ".meta.AskLeaderResponse\"\000Bmap<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ - int getExtensionCount(); + int getExtensionsCount(); /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ - boolean containsExtension( + boolean containsExtensions( java.lang.String key); /** - * Use {@link #getExtensionMap()} instead. + * Use {@link #getExtensionsMap()} instead. */ @java.lang.Deprecated java.util.Map - getExtension(); + getExtensions(); /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ java.util.Map - getExtensionMap(); + getExtensionsMap(); /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ /* nullable */ -com.google.protobuf.ByteString getExtensionOrDefault( +com.google.protobuf.ByteString getExtensionsOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.ByteString defaultValue); /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ - com.google.protobuf.ByteString getExtensionOrThrow( + com.google.protobuf.ByteString getExtensionsOrThrow( java.lang.String key); } /** @@ -4156,15 +4156,15 @@ private FlowResponse( } case 34: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { - extension_ = com.google.protobuf.MapField.newMapField( - ExtensionDefaultEntryHolder.defaultEntry); + extensions_ = com.google.protobuf.MapField.newMapField( + ExtensionsDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000002; } com.google.protobuf.MapEntry - extension__ = input.readMessage( - ExtensionDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - extension_.getMutableMap().put( - extension__.getKey(), extension__.getValue()); + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + extensions_.getMutableMap().put( + extensions__.getKey(), extensions__.getValue()); break; } default: { @@ -4202,7 +4202,7 @@ protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 4: - return internalGetExtension(); + return internalGetExtensions(); default: throw new RuntimeException( "Invalid map field number: " + number); @@ -4313,81 +4313,81 @@ public io.greptime.v1.Ddl.FlowIdOrBuilder getAffectedFlowsOrBuilder( return affectedFlows_.get(index); } - public static final int EXTENSION_FIELD_NUMBER = 4; - private static final class ExtensionDefaultEntryHolder { + public static final int EXTENSIONS_FIELD_NUMBER = 4; + private static final class ExtensionsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.google.protobuf.ByteString> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( - io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowResponse_ExtensionEntry_descriptor, + io.greptime.v1.flow.Server.internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.BYTES, com.google.protobuf.ByteString.EMPTY); } private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.ByteString> extension_; + java.lang.String, com.google.protobuf.ByteString> extensions_; private com.google.protobuf.MapField - internalGetExtension() { - if (extension_ == null) { + internalGetExtensions() { + if (extensions_ == null) { return com.google.protobuf.MapField.emptyMapField( - ExtensionDefaultEntryHolder.defaultEntry); + ExtensionsDefaultEntryHolder.defaultEntry); } - return extension_; + return extensions_; } - public int getExtensionCount() { - return internalGetExtension().getMap().size(); + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); } /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ @java.lang.Override - public boolean containsExtension( + public boolean containsExtensions( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtension().getMap().containsKey(key); + return internalGetExtensions().getMap().containsKey(key); } /** - * Use {@link #getExtensionMap()} instead. + * Use {@link #getExtensionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated - public java.util.Map getExtension() { - return getExtensionMap(); + public java.util.Map getExtensions() { + return getExtensionsMap(); } /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ @java.lang.Override - public java.util.Map getExtensionMap() { - return internalGetExtension().getMap(); + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); } /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ @java.lang.Override - public com.google.protobuf.ByteString getExtensionOrDefault( + public com.google.protobuf.ByteString getExtensionsOrDefault( java.lang.String key, com.google.protobuf.ByteString defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = - internalGetExtension().getMap(); + internalGetExtensions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ @java.lang.Override - public com.google.protobuf.ByteString getExtensionOrThrow( + public com.google.protobuf.ByteString getExtensionsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = - internalGetExtension().getMap(); + internalGetExtensions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } @@ -4420,8 +4420,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, - internalGetExtension(), - ExtensionDefaultEntryHolder.defaultEntry, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, 4); unknownFields.writeTo(output); } @@ -4445,14 +4445,14 @@ public int getSerializedSize() { .computeMessageSize(3, affectedFlows_.get(i)); } for (java.util.Map.Entry entry - : internalGetExtension().getMap().entrySet()) { + : internalGetExtensions().getMap().entrySet()) { com.google.protobuf.MapEntry - extension__ = ExtensionDefaultEntryHolder.defaultEntry.newBuilderForType() + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, extension__); + .computeMessageSize(4, extensions__); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -4478,8 +4478,8 @@ public boolean equals(final java.lang.Object obj) { != other.getAffectedRows()) return false; if (!getAffectedFlowsList() .equals(other.getAffectedFlowsList())) return false; - if (!internalGetExtension().equals( - other.internalGetExtension())) return false; + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -4502,9 +4502,9 @@ public int hashCode() { hash = (37 * hash) + AFFECTED_FLOWS_FIELD_NUMBER; hash = (53 * hash) + getAffectedFlowsList().hashCode(); } - if (!internalGetExtension().getMap().isEmpty()) { - hash = (37 * hash) + EXTENSION_FIELD_NUMBER; - hash = (53 * hash) + internalGetExtension().hashCode(); + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; @@ -4618,7 +4618,7 @@ protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 4: - return internalGetExtension(); + return internalGetExtensions(); default: throw new RuntimeException( "Invalid map field number: " + number); @@ -4629,7 +4629,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 4: - return internalGetMutableExtension(); + return internalGetMutableExtensions(); default: throw new RuntimeException( "Invalid map field number: " + number); @@ -4676,7 +4676,7 @@ public Builder clear() { } else { affectedFlowsBuilder_.clear(); } - internalGetMutableExtension().clear(); + internalGetMutableExtensions().clear(); return this; } @@ -4719,8 +4719,8 @@ public io.greptime.v1.flow.Server.FlowResponse buildPartial() { } else { result.affectedFlows_ = affectedFlowsBuilder_.build(); } - result.extension_ = internalGetExtension(); - result.extension_.makeImmutable(); + result.extensions_ = internalGetExtensions(); + result.extensions_.makeImmutable(); onBuilt(); return result; } @@ -4801,8 +4801,8 @@ public Builder mergeFrom(io.greptime.v1.flow.Server.FlowResponse other) { } } } - internalGetMutableExtension().mergeFrom( - other.internalGetExtension()); + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -5296,99 +5296,99 @@ public io.greptime.v1.Ddl.FlowId.Builder addAffectedFlowsBuilder( } private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.ByteString> extension_; + java.lang.String, com.google.protobuf.ByteString> extensions_; private com.google.protobuf.MapField - internalGetExtension() { - if (extension_ == null) { + internalGetExtensions() { + if (extensions_ == null) { return com.google.protobuf.MapField.emptyMapField( - ExtensionDefaultEntryHolder.defaultEntry); + ExtensionsDefaultEntryHolder.defaultEntry); } - return extension_; + return extensions_; } private com.google.protobuf.MapField - internalGetMutableExtension() { + internalGetMutableExtensions() { onChanged();; - if (extension_ == null) { - extension_ = com.google.protobuf.MapField.newMapField( - ExtensionDefaultEntryHolder.defaultEntry); + if (extensions_ == null) { + extensions_ = com.google.protobuf.MapField.newMapField( + ExtensionsDefaultEntryHolder.defaultEntry); } - if (!extension_.isMutable()) { - extension_ = extension_.copy(); + if (!extensions_.isMutable()) { + extensions_ = extensions_.copy(); } - return extension_; + return extensions_; } - public int getExtensionCount() { - return internalGetExtension().getMap().size(); + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); } /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ @java.lang.Override - public boolean containsExtension( + public boolean containsExtensions( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtension().getMap().containsKey(key); + return internalGetExtensions().getMap().containsKey(key); } /** - * Use {@link #getExtensionMap()} instead. + * Use {@link #getExtensionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated - public java.util.Map getExtension() { - return getExtensionMap(); + public java.util.Map getExtensions() { + return getExtensionsMap(); } /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ @java.lang.Override - public java.util.Map getExtensionMap() { - return internalGetExtension().getMap(); + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); } /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ @java.lang.Override - public com.google.protobuf.ByteString getExtensionOrDefault( + public com.google.protobuf.ByteString getExtensionsOrDefault( java.lang.String key, com.google.protobuf.ByteString defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = - internalGetExtension().getMap(); + internalGetExtensions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ @java.lang.Override - public com.google.protobuf.ByteString getExtensionOrThrow( + public com.google.protobuf.ByteString getExtensionsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = - internalGetExtension().getMap(); + internalGetExtensions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } - public Builder clearExtension() { - internalGetMutableExtension().getMutableMap() + public Builder clearExtensions() { + internalGetMutableExtensions().getMutableMap() .clear(); return this; } /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ - public Builder removeExtension( + public Builder removeExtensions( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableExtension().getMutableMap() + internalGetMutableExtensions().getMutableMap() .remove(key); return this; } @@ -5397,13 +5397,13 @@ public Builder removeExtension( */ @java.lang.Deprecated public java.util.Map - getMutableExtension() { - return internalGetMutableExtension().getMutableMap(); + getMutableExtensions() { + return internalGetMutableExtensions().getMutableMap(); } /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ - public Builder putExtension( + public Builder putExtensions( java.lang.String key, com.google.protobuf.ByteString value) { if (key == null) { throw new NullPointerException("map key"); } @@ -5411,17 +5411,17 @@ public Builder putExtension( throw new NullPointerException("map value"); } - internalGetMutableExtension().getMutableMap() + internalGetMutableExtensions().getMutableMap() .put(key, value); return this; } /** - * map<string, bytes> extension = 4; + * map<string, bytes> extensions = 4; */ - public Builder putAllExtension( + public Builder putAllExtensions( java.util.Map values) { - internalGetMutableExtension().getMutableMap() + internalGetMutableExtensions().getMutableMap() .putAll(values); return this; } @@ -8924,10 +8924,10 @@ public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_flow_FlowResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_greptime_v1_flow_FlowResponse_ExtensionEntry_descriptor; + internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_greptime_v1_flow_FlowResponse_ExtensionEntry_fieldAccessorTable; + internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_flow_CreateRequest_descriptor; private static final @@ -8974,32 +8974,32 @@ public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() { "time.v1.flow.CreateRequestH\000\022-\n\004drop\030\002 \001" + "(\0132\035.greptime.v1.flow.DropRequestH\000\022,\n\005f" + "lush\030\003 \001(\0132\033.greptime.v1.flow.FlushFlowH" + - "\000B\006\n\004body\"\363\001\n\014FlowResponse\022+\n\006header\030\001 \001" + + "\000B\006\n\004body\"\366\001\n\014FlowResponse\022+\n\006header\030\001 \001" + "(\0132\033.greptime.v1.ResponseHeader\022\025\n\raffec" + "ted_rows\030\002 \001(\004\022+\n\016affected_flows\030\003 \003(\0132\023" + - ".greptime.v1.FlowId\022@\n\textension\030\004 \003(\0132-" + - ".greptime.v1.flow.FlowResponse.Extension" + - "Entry\0320\n\016ExtensionEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + - "value\030\002 \001(\014:\0028\001\"\376\002\n\rCreateRequest\022$\n\007flo" + - "w_id\030\001 \001(\0132\023.greptime.v1.FlowId\022.\n\020sourc" + - "e_table_ids\030\002 \003(\0132\024.greptime.v1.TableId\022" + - "/\n\017sink_table_name\030\003 \001(\0132\026.greptime.v1.T" + - "ableName\022\034\n\024create_if_not_exists\030\004 \001(\010\022." + - "\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Expir" + - "eAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022F\n\014" + - "flow_options\030\010 \003(\01320.greptime.v1.flow.Cr" + - "eateRequest.FlowOptionsEntry\0322\n\020FlowOpti" + - "onsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + - "\"3\n\013DropRequest\022$\n\007flow_id\030\001 \001(\0132\023.grept" + - "ime.v1.FlowId\"1\n\tFlushFlow\022$\n\007flow_id\030\001 " + - "\001(\0132\023.greptime.v1.FlowId2\264\001\n\004Flow\022S\n\022Han" + - "dleCreateRemove\022\035.greptime.v1.flow.FlowR" + - "equest\032\036.greptime.v1.flow.FlowResponse\022W" + - "\n\023HandleMirrorRequest\022 .greptime.v1.flow" + - ".InsertRequests\032\036.greptime.v1.flow.FlowR" + - "esponseBY\n\023io.greptime.v1.flowB\006ServerZ:" + - "github.com/GreptimeTeam/greptime-proto/g" + - "o/greptime/v1/flowb\006proto3" + ".greptime.v1.FlowId\022B\n\nextensions\030\004 \003(\0132" + + "..greptime.v1.flow.FlowResponse.Extensio" + + "nsEntry\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\014:\0028\001\"\376\002\n\rCreateRequest\022$\n\007" + + "flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\022.\n\020so" + + "urce_table_ids\030\002 \003(\0132\024.greptime.v1.Table" + + "Id\022/\n\017sink_table_name\030\003 \001(\0132\026.greptime.v" + + "1.TableName\022\034\n\024create_if_not_exists\030\004 \001(" + + "\010\022.\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Ex" + + "pireAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022" + + "F\n\014flow_options\030\010 \003(\01320.greptime.v1.flow" + + ".CreateRequest.FlowOptionsEntry\0322\n\020FlowO" + + "ptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\"3\n\013DropRequest\022$\n\007flow_id\030\001 \001(\0132\023.gr" + + "eptime.v1.FlowId\"1\n\tFlushFlow\022$\n\007flow_id" + + "\030\001 \001(\0132\023.greptime.v1.FlowId2\264\001\n\004Flow\022S\n\022" + + "HandleCreateRemove\022\035.greptime.v1.flow.Fl" + + "owRequest\032\036.greptime.v1.flow.FlowRespons" + + "e\022W\n\023HandleMirrorRequest\022 .greptime.v1.f" + + "low.InsertRequests\032\036.greptime.v1.flow.Fl" + + "owResponseBY\n\023io.greptime.v1.flowB\006Serve" + + "rZ:github.com/GreptimeTeam/greptime-prot" + + "o/go/greptime/v1/flowb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -9043,12 +9043,12 @@ public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() { internal_static_greptime_v1_flow_FlowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_flow_FlowResponse_descriptor, - new java.lang.String[] { "Header", "AffectedRows", "AffectedFlows", "Extension", }); - internal_static_greptime_v1_flow_FlowResponse_ExtensionEntry_descriptor = + new java.lang.String[] { "Header", "AffectedRows", "AffectedFlows", "Extensions", }); + internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_descriptor = internal_static_greptime_v1_flow_FlowResponse_descriptor.getNestedTypes().get(0); - internal_static_greptime_v1_flow_FlowResponse_ExtensionEntry_fieldAccessorTable = new + internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_greptime_v1_flow_FlowResponse_ExtensionEntry_descriptor, + internal_static_greptime_v1_flow_FlowResponse_ExtensionsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_greptime_v1_flow_CreateRequest_descriptor = getDescriptor().getMessageTypes().get(5); diff --git a/java/src/main/java/io/greptime/v1/region/Server.java b/java/src/main/java/io/greptime/v1/region/Server.java index 0e986955..755a4fe1 100644 --- a/java/src/main/java/io/greptime/v1/region/Server.java +++ b/java/src/main/java/io/greptime/v1/region/Server.java @@ -4998,39 +4998,39 @@ public interface RegionResponseOrBuilder extends long getAffectedRows(); /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ - int getExtensionCount(); + int getExtensionsCount(); /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ - boolean containsExtension( + boolean containsExtensions( java.lang.String key); /** - * Use {@link #getExtensionMap()} instead. + * Use {@link #getExtensionsMap()} instead. */ @java.lang.Deprecated java.util.Map - getExtension(); + getExtensions(); /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ java.util.Map - getExtensionMap(); + getExtensionsMap(); /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ /* nullable */ -com.google.protobuf.ByteString getExtensionOrDefault( +com.google.protobuf.ByteString getExtensionsOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.ByteString defaultValue); /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ - com.google.protobuf.ByteString getExtensionOrThrow( + com.google.protobuf.ByteString getExtensionsOrThrow( java.lang.String key); } /** @@ -5099,15 +5099,15 @@ private RegionResponse( } case 26: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - extension_ = com.google.protobuf.MapField.newMapField( - ExtensionDefaultEntryHolder.defaultEntry); + extensions_ = com.google.protobuf.MapField.newMapField( + ExtensionsDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } com.google.protobuf.MapEntry - extension__ = input.readMessage( - ExtensionDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - extension_.getMutableMap().put( - extension__.getKey(), extension__.getValue()); + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + extensions_.getMutableMap().put( + extensions__.getKey(), extensions__.getValue()); break; } default: { @@ -5142,7 +5142,7 @@ protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 3: - return internalGetExtension(); + return internalGetExtensions(); default: throw new RuntimeException( "Invalid map field number: " + number); @@ -5193,81 +5193,81 @@ public long getAffectedRows() { return affectedRows_; } - public static final int EXTENSION_FIELD_NUMBER = 3; - private static final class ExtensionDefaultEntryHolder { + public static final int EXTENSIONS_FIELD_NUMBER = 3; + private static final class ExtensionsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.google.protobuf.ByteString> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( - io.greptime.v1.region.Server.internal_static_greptime_v1_region_RegionResponse_ExtensionEntry_descriptor, + io.greptime.v1.region.Server.internal_static_greptime_v1_region_RegionResponse_ExtensionsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.BYTES, com.google.protobuf.ByteString.EMPTY); } private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.ByteString> extension_; + java.lang.String, com.google.protobuf.ByteString> extensions_; private com.google.protobuf.MapField - internalGetExtension() { - if (extension_ == null) { + internalGetExtensions() { + if (extensions_ == null) { return com.google.protobuf.MapField.emptyMapField( - ExtensionDefaultEntryHolder.defaultEntry); + ExtensionsDefaultEntryHolder.defaultEntry); } - return extension_; + return extensions_; } - public int getExtensionCount() { - return internalGetExtension().getMap().size(); + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); } /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ @java.lang.Override - public boolean containsExtension( + public boolean containsExtensions( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtension().getMap().containsKey(key); + return internalGetExtensions().getMap().containsKey(key); } /** - * Use {@link #getExtensionMap()} instead. + * Use {@link #getExtensionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated - public java.util.Map getExtension() { - return getExtensionMap(); + public java.util.Map getExtensions() { + return getExtensionsMap(); } /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ @java.lang.Override - public java.util.Map getExtensionMap() { - return internalGetExtension().getMap(); + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); } /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ @java.lang.Override - public com.google.protobuf.ByteString getExtensionOrDefault( + public com.google.protobuf.ByteString getExtensionsOrDefault( java.lang.String key, com.google.protobuf.ByteString defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = - internalGetExtension().getMap(); + internalGetExtensions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ @java.lang.Override - public com.google.protobuf.ByteString getExtensionOrThrow( + public com.google.protobuf.ByteString getExtensionsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = - internalGetExtension().getMap(); + internalGetExtensions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } @@ -5297,8 +5297,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, - internalGetExtension(), - ExtensionDefaultEntryHolder.defaultEntry, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, 3); unknownFields.writeTo(output); } @@ -5318,14 +5318,14 @@ public int getSerializedSize() { .computeUInt64Size(2, affectedRows_); } for (java.util.Map.Entry entry - : internalGetExtension().getMap().entrySet()) { + : internalGetExtensions().getMap().entrySet()) { com.google.protobuf.MapEntry - extension__ = ExtensionDefaultEntryHolder.defaultEntry.newBuilderForType() + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, extension__); + .computeMessageSize(3, extensions__); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -5349,8 +5349,8 @@ public boolean equals(final java.lang.Object obj) { } if (getAffectedRows() != other.getAffectedRows()) return false; - if (!internalGetExtension().equals( - other.internalGetExtension())) return false; + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -5369,9 +5369,9 @@ public int hashCode() { hash = (37 * hash) + AFFECTED_ROWS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAffectedRows()); - if (!internalGetExtension().getMap().isEmpty()) { - hash = (37 * hash) + EXTENSION_FIELD_NUMBER; - hash = (53 * hash) + internalGetExtension().hashCode(); + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; @@ -5485,7 +5485,7 @@ protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 3: - return internalGetExtension(); + return internalGetExtensions(); default: throw new RuntimeException( "Invalid map field number: " + number); @@ -5496,7 +5496,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 3: - return internalGetMutableExtension(); + return internalGetMutableExtensions(); default: throw new RuntimeException( "Invalid map field number: " + number); @@ -5536,7 +5536,7 @@ public Builder clear() { } affectedRows_ = 0L; - internalGetMutableExtension().clear(); + internalGetMutableExtensions().clear(); return this; } @@ -5570,8 +5570,8 @@ public io.greptime.v1.region.Server.RegionResponse buildPartial() { result.header_ = headerBuilder_.build(); } result.affectedRows_ = affectedRows_; - result.extension_ = internalGetExtension(); - result.extension_.makeImmutable(); + result.extensions_ = internalGetExtensions(); + result.extensions_.makeImmutable(); onBuilt(); return result; } @@ -5626,8 +5626,8 @@ public Builder mergeFrom(io.greptime.v1.region.Server.RegionResponse other) { if (other.getAffectedRows() != 0L) { setAffectedRows(other.getAffectedRows()); } - internalGetMutableExtension().mergeFrom( - other.internalGetExtension()); + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -5809,99 +5809,99 @@ public Builder clearAffectedRows() { } private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.ByteString> extension_; + java.lang.String, com.google.protobuf.ByteString> extensions_; private com.google.protobuf.MapField - internalGetExtension() { - if (extension_ == null) { + internalGetExtensions() { + if (extensions_ == null) { return com.google.protobuf.MapField.emptyMapField( - ExtensionDefaultEntryHolder.defaultEntry); + ExtensionsDefaultEntryHolder.defaultEntry); } - return extension_; + return extensions_; } private com.google.protobuf.MapField - internalGetMutableExtension() { + internalGetMutableExtensions() { onChanged();; - if (extension_ == null) { - extension_ = com.google.protobuf.MapField.newMapField( - ExtensionDefaultEntryHolder.defaultEntry); + if (extensions_ == null) { + extensions_ = com.google.protobuf.MapField.newMapField( + ExtensionsDefaultEntryHolder.defaultEntry); } - if (!extension_.isMutable()) { - extension_ = extension_.copy(); + if (!extensions_.isMutable()) { + extensions_ = extensions_.copy(); } - return extension_; + return extensions_; } - public int getExtensionCount() { - return internalGetExtension().getMap().size(); + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); } /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ @java.lang.Override - public boolean containsExtension( + public boolean containsExtensions( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtension().getMap().containsKey(key); + return internalGetExtensions().getMap().containsKey(key); } /** - * Use {@link #getExtensionMap()} instead. + * Use {@link #getExtensionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated - public java.util.Map getExtension() { - return getExtensionMap(); + public java.util.Map getExtensions() { + return getExtensionsMap(); } /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ @java.lang.Override - public java.util.Map getExtensionMap() { - return internalGetExtension().getMap(); + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); } /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ @java.lang.Override - public com.google.protobuf.ByteString getExtensionOrDefault( + public com.google.protobuf.ByteString getExtensionsOrDefault( java.lang.String key, com.google.protobuf.ByteString defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = - internalGetExtension().getMap(); + internalGetExtensions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ @java.lang.Override - public com.google.protobuf.ByteString getExtensionOrThrow( + public com.google.protobuf.ByteString getExtensionsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = - internalGetExtension().getMap(); + internalGetExtensions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } - public Builder clearExtension() { - internalGetMutableExtension().getMutableMap() + public Builder clearExtensions() { + internalGetMutableExtensions().getMutableMap() .clear(); return this; } /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ - public Builder removeExtension( + public Builder removeExtensions( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableExtension().getMutableMap() + internalGetMutableExtensions().getMutableMap() .remove(key); return this; } @@ -5910,13 +5910,13 @@ public Builder removeExtension( */ @java.lang.Deprecated public java.util.Map - getMutableExtension() { - return internalGetMutableExtension().getMutableMap(); + getMutableExtensions() { + return internalGetMutableExtensions().getMutableMap(); } /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ - public Builder putExtension( + public Builder putExtensions( java.lang.String key, com.google.protobuf.ByteString value) { if (key == null) { throw new NullPointerException("map key"); } @@ -5924,17 +5924,17 @@ public Builder putExtension( throw new NullPointerException("map value"); } - internalGetMutableExtension().getMutableMap() + internalGetMutableExtensions().getMutableMap() .put(key, value); return this; } /** - * map<string, bytes> extension = 3; + * map<string, bytes> extensions = 3; */ - public Builder putAllExtension( + public Builder putAllExtensions( java.util.Map values) { - internalGetMutableExtension().getMutableMap() + internalGetMutableExtensions().getMutableMap() .putAll(values); return this; } @@ -24366,10 +24366,10 @@ public io.greptime.v1.region.Server.RegionColumnDef getDefaultInstanceForType() com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_region_RegionResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_greptime_v1_region_RegionResponse_ExtensionEntry_descriptor; + internal_static_greptime_v1_region_RegionResponse_ExtensionsEntry_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_greptime_v1_region_RegionResponse_ExtensionEntry_fieldAccessorTable; + internal_static_greptime_v1_region_RegionResponse_ExtensionsEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_region_InsertRequests_descriptor; private static final @@ -24532,66 +24532,66 @@ public io.greptime.v1.region.Server.RegionColumnDef getDefaultInstanceForType() "teRequestsH\000\0221\n\005drops\030\016 \001(\0132 .greptime.v" + "1.region.DropRequestsH\000\0223\n\006alters\030\017 \001(\0132" + "!.greptime.v1.region.AlterRequestsH\000B\006\n\004" + - "body\"\314\001\n\016RegionResponse\022+\n\006header\030\001 \001(\0132" + + "body\"\317\001\n\016RegionResponse\022+\n\006header\030\001 \001(\0132" + "\033.greptime.v1.ResponseHeader\022\025\n\raffected" + - "_rows\030\002 \001(\004\022D\n\textension\030\003 \003(\01321.greptim" + - "e.v1.region.RegionResponse.ExtensionEntr" + - "y\0320\n\016ExtensionEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + - "e\030\002 \001(\014:\0028\001\"E\n\016InsertRequests\0223\n\010request" + - "s\030\001 \003(\0132!.greptime.v1.region.InsertReque" + - "st\"E\n\016DeleteRequests\0223\n\010requests\030\001 \003(\0132!" + - ".greptime.v1.region.DeleteRequest\"C\n\rIns" + - "ertRequest\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 " + - "\001(\0132\021.greptime.v1.Rows\"C\n\rDeleteRequest\022" + - "\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 \001(\0132\021.grept" + - "ime.v1.Rows\"h\n\014QueryRequest\0227\n\006header\030\001 " + - "\001(\0132\'.greptime.v1.region.RegionRequestHe" + - "ader\022\021\n\tregion_id\030\002 \001(\004\022\014\n\004plan\030\003 \001(\014\"E\n" + - "\016CreateRequests\0223\n\010requests\030\001 \003(\0132!.grep" + - "time.v1.region.CreateRequest\"\200\002\n\rCreateR" + - "equest\022\021\n\tregion_id\030\001 \001(\004\022\016\n\006engine\030\002 \001(" + - "\t\0228\n\013column_defs\030\003 \003(\0132#.greptime.v1.reg" + - "ion.RegionColumnDef\022\023\n\013primary_key\030\004 \003(\r" + - "\022\014\n\004path\030\005 \001(\t\022?\n\007options\030\006 \003(\0132..grepti" + - "me.v1.region.CreateRequest.OptionsEntry\032" + + "_rows\030\002 \001(\004\022F\n\nextensions\030\003 \003(\01322.grepti" + + "me.v1.region.RegionResponse.ExtensionsEn" + + "try\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\014:\0028\001\"E\n\016InsertRequests\0223\n\010requ" + + "ests\030\001 \003(\0132!.greptime.v1.region.InsertRe" + + "quest\"E\n\016DeleteRequests\0223\n\010requests\030\001 \003(" + + "\0132!.greptime.v1.region.DeleteRequest\"C\n\r" + + "InsertRequest\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows" + + "\030\002 \001(\0132\021.greptime.v1.Rows\"C\n\rDeleteReque" + + "st\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 \001(\0132\021.gr" + + "eptime.v1.Rows\"h\n\014QueryRequest\0227\n\006header" + + "\030\001 \001(\0132\'.greptime.v1.region.RegionReques" + + "tHeader\022\021\n\tregion_id\030\002 \001(\004\022\014\n\004plan\030\003 \001(\014" + + "\"E\n\016CreateRequests\0223\n\010requests\030\001 \003(\0132!.g" + + "reptime.v1.region.CreateRequest\"\200\002\n\rCrea" + + "teRequest\022\021\n\tregion_id\030\001 \001(\004\022\016\n\006engine\030\002" + + " \001(\t\0228\n\013column_defs\030\003 \003(\0132#.greptime.v1." + + "region.RegionColumnDef\022\023\n\013primary_key\030\004 " + + "\003(\r\022\014\n\004path\030\005 \001(\t\022?\n\007options\030\006 \003(\0132..gre" + + "ptime.v1.region.CreateRequest.OptionsEnt" + + "ry\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001\"A\n\014DropRequests\0221\n\010requests\030\001" + + " \003(\0132\037.greptime.v1.region.DropRequest\" \n" + + "\013DropRequest\022\021\n\tregion_id\030\001 \001(\004\"\255\001\n\013Open" + + "Request\022\021\n\tregion_id\030\001 \001(\004\022\016\n\006engine\030\002 \001" + + "(\t\022\014\n\004path\030\003 \001(\t\022=\n\007options\030\004 \003(\0132,.grep" + + "time.v1.region.OpenRequest.OptionsEntry\032" + ".\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + - "\001(\t:\0028\001\"A\n\014DropRequests\0221\n\010requests\030\001 \003(" + - "\0132\037.greptime.v1.region.DropRequest\" \n\013Dr" + - "opRequest\022\021\n\tregion_id\030\001 \001(\004\"\255\001\n\013OpenReq" + - "uest\022\021\n\tregion_id\030\001 \001(\004\022\016\n\006engine\030\002 \001(\t\022" + - "\014\n\004path\030\003 \001(\t\022=\n\007options\030\004 \003(\0132,.greptim" + - "e.v1.region.OpenRequest.OptionsEntry\032.\n\014" + - "OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" + - ":\0028\001\"!\n\014CloseRequest\022\021\n\tregion_id\030\001 \001(\004\"" + - "C\n\rAlterRequests\0222\n\010requests\030\001 \003(\0132 .gre" + - "ptime.v1.region.AlterRequest\"\360\001\n\014AlterRe" + - "quest\022\021\n\tregion_id\030\001 \001(\004\0225\n\013add_columns\030" + - "\002 \001(\0132\036.greptime.v1.region.AddColumnsH\000\022" + - "7\n\014drop_columns\030\003 \001(\0132\037.greptime.v1.regi" + - "on.DropColumnsH\000\022=\n\023change_column_types\030" + - "\005 \001(\0132\036.greptime.v1.ChangeColumnTypesH\000\022" + - "\026\n\016schema_version\030\004 \001(\004B\006\n\004kind\"@\n\nAddCo" + - "lumns\0222\n\013add_columns\030\001 \003(\0132\035.greptime.v1" + - ".region.AddColumn\"C\n\013DropColumns\0224\n\014drop" + - "_columns\030\001 \003(\0132\036.greptime.v1.region.Drop" + - "Column\"v\n\tAddColumn\0227\n\ncolumn_def\030\001 \001(\0132" + - "#.greptime.v1.region.RegionColumnDef\0220\n\010" + - "location\030\003 \001(\0132\036.greptime.v1.AddColumnLo" + - "cation\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t\"!\n\014Fl" + - "ushRequest\022\021\n\tregion_id\030\001 \001(\004\"\t\n\007Regular" + - "\"&\n\014StrictWindow\022\026\n\016window_seconds\030\001 \001(\003" + - "\"\231\001\n\016CompactRequest\022\021\n\tregion_id\030\001 \001(\004\022." + - "\n\007regular\030\002 \001(\0132\033.greptime.v1.region.Reg" + - "ularH\000\0229\n\rstrict_window\030\003 \001(\0132 .greptime" + - ".v1.region.StrictWindowH\000B\t\n\007options\"$\n\017" + - "TruncateRequest\022\021\n\tregion_id\030\001 \001(\004\"P\n\017Re" + - "gionColumnDef\022*\n\ncolumn_def\030\001 \001(\0132\026.grep" + - "time.v1.ColumnDef\022\021\n\tcolumn_id\030\002 \001(\r2Y\n\006" + - "Region\022O\n\006Handle\022!.greptime.v1.region.Re" + - "gionRequest\032\".greptime.v1.region.RegionR" + - "esponseB]\n\025io.greptime.v1.regionB\006Server" + - "Z extension = 4; + map extensions = 4; } // Create a flow diff --git a/proto/greptime/v1/meta/heartbeat.proto b/proto/greptime/v1/meta/heartbeat.proto index 1207f161..203c7510 100644 --- a/proto/greptime/v1/meta/heartbeat.proto +++ b/proto/greptime/v1/meta/heartbeat.proto @@ -77,6 +77,7 @@ message RegionStat { string engine = 6; // Region role RegionRole role = 7; + map extensions = 99; } message HeartbeatResponse { diff --git a/proto/greptime/v1/region/server.proto b/proto/greptime/v1/region/server.proto index 2c6d5b76..d504ea3a 100644 --- a/proto/greptime/v1/region/server.proto +++ b/proto/greptime/v1/region/server.proto @@ -59,7 +59,7 @@ message RegionRequest { message RegionResponse { ResponseHeader header = 1; uint64 affected_rows = 2; - map extension = 3; + map extensions = 3; } message InsertRequests { repeated InsertRequest requests = 1; }