diff --git a/c++/greptime/v1/meta/heartbeat.pb.cc b/c++/greptime/v1/meta/heartbeat.pb.cc index 5f4c5e6..683e601 100644 --- a/c++/greptime/v1/meta/heartbeat.pb.cc +++ b/c++/greptime/v1/meta/heartbeat.pb.cc @@ -31,6 +31,7 @@ PROTOBUF_CONSTEXPR HeartbeatRequest::HeartbeatRequest( , /*decltype(_impl_.report_interval_)*/nullptr , /*decltype(_impl_.mailbox_message_)*/nullptr , /*decltype(_impl_.info_)*/nullptr + , /*decltype(_impl_.flow_stat_)*/nullptr , /*decltype(_impl_.duration_since_epoch_)*/uint64_t{0u} , /*decltype(_impl_.node_epoch_)*/uint64_t{0u} , /*decltype(_impl_._cached_size_)*/{}} {} @@ -88,6 +89,30 @@ struct RegionStatDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionStatDefaultTypeInternal _RegionStat_default_instance_; +PROTOBUF_CONSTEXPR FlowStat_FlowStatSizeEntry_DoNotUse::FlowStat_FlowStatSizeEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct FlowStat_FlowStatSizeEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR FlowStat_FlowStatSizeEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FlowStat_FlowStatSizeEntry_DoNotUseDefaultTypeInternal() {} + union { + FlowStat_FlowStatSizeEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowStat_FlowStatSizeEntry_DoNotUseDefaultTypeInternal _FlowStat_FlowStatSizeEntry_DoNotUse_default_instance_; +PROTOBUF_CONSTEXPR FlowStat::FlowStat( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.flow_stat_size_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct FlowStatDefaultTypeInternal { + PROTOBUF_CONSTEXPR FlowStatDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FlowStatDefaultTypeInternal() {} + union { + FlowStat _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowStatDefaultTypeInternal _FlowStat_default_instance_; PROTOBUF_CONSTEXPR HeartbeatResponse::HeartbeatResponse( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.header_)*/nullptr @@ -183,7 +208,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[10]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[12]; 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; @@ -202,6 +227,7 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets[] P PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::HeartbeatRequest, _impl_.duration_since_epoch_), PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::HeartbeatRequest, _impl_.node_epoch_), PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::HeartbeatRequest, _impl_.info_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::HeartbeatRequest, _impl_.flow_stat_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _internal_metadata_), ~0u, // no _extensions_ @@ -234,6 +260,23 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets[] P 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_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::FlowStat_FlowStatSizeEntry_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::FlowStat_FlowStatSizeEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::FlowStat, _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::FlowStat, _impl_.flow_stat_size_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::HeartbeatResponse, _internal_metadata_), ~0u, // no _extensions_ @@ -292,15 +335,17 @@ 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, 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)}, + { 15, -1, -1, sizeof(::greptime::v1::meta::NodeInfo)}, + { 24, 32, -1, sizeof(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse)}, + { 34, -1, -1, sizeof(::greptime::v1::meta::RegionStat)}, + { 47, 55, -1, sizeof(::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse)}, + { 57, -1, -1, sizeof(::greptime::v1::meta::FlowStat)}, + { 64, -1, -1, sizeof(::greptime::v1::meta::HeartbeatResponse)}, + { 73, -1, -1, sizeof(::greptime::v1::meta::GrantedRegion)}, + { 81, -1, -1, sizeof(::greptime::v1::meta::RegionLease)}, + { 91, -1, -1, sizeof(::greptime::v1::meta::AskLeaderRequest)}, + { 98, -1, -1, sizeof(::greptime::v1::meta::AskLeaderResponse)}, + { 106, -1, -1, sizeof(::greptime::v1::meta::MailboxMessage)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -308,6 +353,8 @@ static const ::_pb::Message* const file_default_instances[] = { &::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::_FlowStat_FlowStatSizeEntry_DoNotUse_default_instance_._instance, + &::greptime::v1::meta::_FlowStat_default_instance_._instance, &::greptime::v1::meta::_HeartbeatResponse_default_instance_._instance, &::greptime::v1::meta::_GrantedRegion_default_instance_._instance, &::greptime::v1::meta::_RegionLease_default_instance_._instance, @@ -319,7 +366,7 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n greptime/v1/meta/heartbeat.proto\022\020grep" "time.v1.meta\032\035greptime/v1/meta/common.pr" - "oto\"\355\002\n\020HeartbeatRequest\022/\n\006header\030\001 \001(\013" + "oto\"\234\003\n\020HeartbeatRequest\022/\n\006header\030\001 \001(\013" "2\037.greptime.v1.meta.RequestHeader\022$\n\004pee" "r\030\002 \001(\0132\026.greptime.v1.meta.Peer\0227\n\017repor" "t_interval\030\003 \001(\0132\036.greptime.v1.meta.Time" @@ -328,50 +375,55 @@ const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto[] "\005 \001(\0132 .greptime.v1.meta.MailboxMessage\022" "\034\n\024duration_since_epoch\030\006 \001(\004\022\022\n\nnode_ep" "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\"\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\022@\n\nexte" - "nsions\030c \003(\0132,.greptime.v1.meta.RegionSt" - "at.ExtensionsEntry\0321\n\017ExtensionsEntry\022\013\n" - "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001\"\265\001\n\021Heartb" - "eatResponse\0220\n\006header\030\001 \001(\0132 .greptime.v" - "1.meta.ResponseHeader\0229\n\017mailbox_message" - "\030\002 \001(\0132 .greptime.v1.meta.MailboxMessage" - "\0223\n\014region_lease\030\003 \001(\0132\035.greptime.v1.met" - "a.RegionLease\"N\n\rGrantedRegion\022\021\n\tregion" - "_id\030\001 \001(\004\022*\n\004role\030\002 \001(\0162\034.greptime.v1.me" - "ta.RegionRole\"\222\001\n\013RegionLease\0220\n\007regions" - "\030\001 \003(\0132\037.greptime.v1.meta.GrantedRegion\022" - "\034\n\024duration_since_epoch\030\002 \001(\004\022\025\n\rlease_s" - "econds\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\021AskLe" - "aderResponse\0220\n\006header\030\001 \001(\0132 .greptime." - "v1.meta.ResponseHeader\022&\n\006leader\030\002 \001(\0132\026" - ".greptime.v1.meta.Peer\"|\n\016MailboxMessage" - "\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\nRegionRo" - "le\022\n\n\006Leader\020\000\022\014\n\010Follower\020\001\022\025\n\021Downgrad" - "ingLeader\020\0022\277\001\n\tHeartbeat\022Z\n\tHeartbeat\022\"" - ".greptime.v1.meta.HeartbeatRequest\032#.gre" - "ptime.v1.meta.HeartbeatResponse\"\000(\0010\001\022V\n" - "\tAskLeader\022\".greptime.v1.meta.AskLeaderR" - "equest\032#.greptime.v1.meta.AskLeaderRespo" - "nse\"\000B_impl_.info_; } +const ::greptime::v1::meta::FlowStat& +HeartbeatRequest::_Internal::flow_stat(const HeartbeatRequest* msg) { + return *msg->_impl_.flow_stat_; +} void HeartbeatRequest::clear_header() { if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { delete _impl_.header_; @@ -466,6 +523,7 @@ HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& from) , decltype(_impl_.report_interval_){nullptr} , decltype(_impl_.mailbox_message_){nullptr} , decltype(_impl_.info_){nullptr} + , decltype(_impl_.flow_stat_){nullptr} , decltype(_impl_.duration_since_epoch_){} , decltype(_impl_.node_epoch_){} , /*decltype(_impl_._cached_size_)*/{}}; @@ -486,6 +544,9 @@ HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& from) if (from._internal_has_info()) { _this->_impl_.info_ = new ::greptime::v1::meta::NodeInfo(*from._impl_.info_); } + if (from._internal_has_flow_stat()) { + _this->_impl_.flow_stat_ = new ::greptime::v1::meta::FlowStat(*from._impl_.flow_stat_); + } ::memcpy(&_impl_.duration_since_epoch_, &from._impl_.duration_since_epoch_, static_cast(reinterpret_cast(&_impl_.node_epoch_) - reinterpret_cast(&_impl_.duration_since_epoch_)) + sizeof(_impl_.node_epoch_)); @@ -503,6 +564,7 @@ inline void HeartbeatRequest::SharedCtor( , decltype(_impl_.report_interval_){nullptr} , decltype(_impl_.mailbox_message_){nullptr} , decltype(_impl_.info_){nullptr} + , decltype(_impl_.flow_stat_){nullptr} , decltype(_impl_.duration_since_epoch_){uint64_t{0u}} , decltype(_impl_.node_epoch_){uint64_t{0u}} , /*decltype(_impl_._cached_size_)*/{} @@ -526,6 +588,7 @@ inline void HeartbeatRequest::SharedDtor() { if (this != internal_default_instance()) delete _impl_.report_interval_; if (this != internal_default_instance()) delete _impl_.mailbox_message_; if (this != internal_default_instance()) delete _impl_.info_; + if (this != internal_default_instance()) delete _impl_.flow_stat_; } void HeartbeatRequest::SetCachedSize(int size) const { @@ -559,6 +622,10 @@ void HeartbeatRequest::Clear() { delete _impl_.info_; } _impl_.info_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.flow_stat_ != nullptr) { + delete _impl_.flow_stat_; + } + _impl_.flow_stat_ = nullptr; ::memset(&_impl_.duration_since_epoch_, 0, static_cast( reinterpret_cast(&_impl_.node_epoch_) - reinterpret_cast(&_impl_.duration_since_epoch_)) + sizeof(_impl_.node_epoch_)); @@ -640,6 +707,14 @@ const char* HeartbeatRequest::_InternalParse(const char* ptr, ::_pbi::ParseConte } else goto handle_unusual; continue; + // .greptime.v1.meta.FlowStat flow_stat = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + ptr = ctx->ParseMessage(_internal_mutable_flow_stat(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -724,6 +799,13 @@ uint8_t* HeartbeatRequest::_InternalSerialize( _Internal::info(this).GetCachedSize(), target, stream); } + // .greptime.v1.meta.FlowStat flow_stat = 9; + if (this->_internal_has_flow_stat()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(9, _Internal::flow_stat(this), + _Internal::flow_stat(this).GetCachedSize(), target, stream); + } + 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); @@ -782,6 +864,13 @@ size_t HeartbeatRequest::ByteSizeLong() const { *_impl_.info_); } + // .greptime.v1.meta.FlowStat flow_stat = 9; + if (this->_internal_has_flow_stat()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.flow_stat_); + } + // uint64 duration_since_epoch = 6; if (this->_internal_duration_since_epoch() != 0) { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_duration_since_epoch()); @@ -831,6 +920,10 @@ void HeartbeatRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const _this->_internal_mutable_info()->::greptime::v1::meta::NodeInfo::MergeFrom( from._internal_info()); } + if (from._internal_has_flow_stat()) { + _this->_internal_mutable_flow_stat()->::greptime::v1::meta::FlowStat::MergeFrom( + from._internal_flow_stat()); + } if (from._internal_duration_since_epoch() != 0) { _this->_internal_set_duration_since_epoch(from._internal_duration_since_epoch()); } @@ -1567,6 +1660,226 @@ void RegionStat::InternalSwap(RegionStat* other) { // =================================================================== +FlowStat_FlowStatSizeEntry_DoNotUse::FlowStat_FlowStatSizeEntry_DoNotUse() {} +FlowStat_FlowStatSizeEntry_DoNotUse::FlowStat_FlowStatSizeEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void FlowStat_FlowStatSizeEntry_DoNotUse::MergeFrom(const FlowStat_FlowStatSizeEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata FlowStat_FlowStatSizeEntry_DoNotUse::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]); +} + +// =================================================================== + +class FlowStat::_Internal { + public: +}; + +FlowStat::FlowStat(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + if (arena != nullptr && !is_message_owned) { + arena->OwnCustomDestructor(this, &FlowStat::ArenaDtor); + } + // @@protoc_insertion_point(arena_constructor:greptime.v1.meta.FlowStat) +} +FlowStat::FlowStat(const FlowStat& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + FlowStat* const _this = this; (void)_this; + new (&_impl_) Impl_{ + /*decltype(_impl_.flow_stat_size_)*/{} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.flow_stat_size_.MergeFrom(from._impl_.flow_stat_size_); + // @@protoc_insertion_point(copy_constructor:greptime.v1.meta.FlowStat) +} + +inline void FlowStat::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + /*decltype(_impl_.flow_stat_size_)*/{::_pbi::ArenaInitialized(), arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +FlowStat::~FlowStat() { + // @@protoc_insertion_point(destructor:greptime.v1.meta.FlowStat) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + ArenaDtor(this); + return; + } + SharedDtor(); +} + +inline void FlowStat::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.flow_stat_size_.Destruct(); + _impl_.flow_stat_size_.~MapField(); +} + +void FlowStat::ArenaDtor(void* object) { + FlowStat* _this = reinterpret_cast< FlowStat* >(object); + _this->_impl_.flow_stat_size_.Destruct(); +} +void FlowStat::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void FlowStat::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.meta.FlowStat) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.flow_stat_size_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* FlowStat::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // map flow_stat_size = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&_impl_.flow_stat_size_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FlowStat::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.meta.FlowStat) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // map flow_stat_size = 1; + if (!this->_internal_flow_stat_size().empty()) { + using MapType = ::_pb::Map; + using WireHelper = FlowStat_FlowStatSizeEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_flow_stat_size(); + + if (stream->IsSerializationDeterministic() && map_field.size() > 1) { + for (const auto& entry : ::_pbi::MapSorterFlat(map_field)) { + target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream); + } + } else { + for (const auto& entry : map_field) { + target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream); + } + } + } + + 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); + } + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.meta.FlowStat) + return target; +} + +size_t FlowStat::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.meta.FlowStat) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map flow_stat_size = 1; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_flow_stat_size_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, uint64_t >::const_iterator + it = this->_internal_flow_stat_size().begin(); + it != this->_internal_flow_stat_size().end(); ++it) { + total_size += FlowStat_FlowStatSizeEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FlowStat::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + FlowStat::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FlowStat::GetClassData() const { return &_class_data_; } + + +void FlowStat::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.meta.FlowStat) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.flow_stat_size_.MergeFrom(from._impl_.flow_stat_size_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void FlowStat::CopyFrom(const FlowStat& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.meta.FlowStat) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FlowStat::IsInitialized() const { + return true; +} + +void FlowStat::InternalSwap(FlowStat* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.flow_stat_size_.InternalSwap(&other->_impl_.flow_stat_size_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata FlowStat::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]); +} + +// =================================================================== + class HeartbeatResponse::_Internal { public: static const ::greptime::v1::meta::ResponseHeader& header(const HeartbeatResponse* msg); @@ -1848,7 +2161,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[4]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[6]); } // =================================================================== @@ -2062,7 +2375,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[5]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[7]); } // =================================================================== @@ -2349,7 +2662,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[6]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[8]); } // =================================================================== @@ -2548,7 +2861,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[7]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[9]); } // =================================================================== @@ -2799,7 +3112,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[8]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[10]); } // =================================================================== @@ -3239,7 +3552,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[9]); + file_level_metadata_greptime_2fv1_2fmeta_2fheartbeat_2eproto[11]); } // @@protoc_insertion_point(namespace_scope) @@ -3263,6 +3576,14 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::meta::RegionStat* Arena::CreateMaybeMessage< ::greptime::v1::meta::RegionStat >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::meta::RegionStat >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse* +Arena::CreateMaybeMessage< ::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::greptime::v1::meta::FlowStat* +Arena::CreateMaybeMessage< ::greptime::v1::meta::FlowStat >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::meta::FlowStat >(arena); +} template<> PROTOBUF_NOINLINE ::greptime::v1::meta::HeartbeatResponse* Arena::CreateMaybeMessage< ::greptime::v1::meta::HeartbeatResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::meta::HeartbeatResponse >(arena); diff --git a/c++/greptime/v1/meta/heartbeat.pb.h b/c++/greptime/v1/meta/heartbeat.pb.h index 7fe3f8b..7ed2ee4 100644 --- a/c++/greptime/v1/meta/heartbeat.pb.h +++ b/c++/greptime/v1/meta/heartbeat.pb.h @@ -58,6 +58,12 @@ extern AskLeaderRequestDefaultTypeInternal _AskLeaderRequest_default_instance_; class AskLeaderResponse; struct AskLeaderResponseDefaultTypeInternal; extern AskLeaderResponseDefaultTypeInternal _AskLeaderResponse_default_instance_; +class FlowStat; +struct FlowStatDefaultTypeInternal; +extern FlowStatDefaultTypeInternal _FlowStat_default_instance_; +class FlowStat_FlowStatSizeEntry_DoNotUse; +struct FlowStat_FlowStatSizeEntry_DoNotUseDefaultTypeInternal; +extern FlowStat_FlowStatSizeEntry_DoNotUseDefaultTypeInternal _FlowStat_FlowStatSizeEntry_DoNotUse_default_instance_; class GrantedRegion; struct GrantedRegionDefaultTypeInternal; extern GrantedRegionDefaultTypeInternal _GrantedRegion_default_instance_; @@ -88,6 +94,8 @@ extern RegionStat_ExtensionsEntry_DoNotUseDefaultTypeInternal _RegionStat_Extens PROTOBUF_NAMESPACE_OPEN template<> ::greptime::v1::meta::AskLeaderRequest* Arena::CreateMaybeMessage<::greptime::v1::meta::AskLeaderRequest>(Arena*); template<> ::greptime::v1::meta::AskLeaderResponse* Arena::CreateMaybeMessage<::greptime::v1::meta::AskLeaderResponse>(Arena*); +template<> ::greptime::v1::meta::FlowStat* Arena::CreateMaybeMessage<::greptime::v1::meta::FlowStat>(Arena*); +template<> ::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse>(Arena*); template<> ::greptime::v1::meta::GrantedRegion* Arena::CreateMaybeMessage<::greptime::v1::meta::GrantedRegion>(Arena*); template<> ::greptime::v1::meta::HeartbeatRequest* Arena::CreateMaybeMessage<::greptime::v1::meta::HeartbeatRequest>(Arena*); template<> ::greptime::v1::meta::HeartbeatResponse* Arena::CreateMaybeMessage<::greptime::v1::meta::HeartbeatResponse>(Arena*); @@ -256,6 +264,7 @@ class HeartbeatRequest final : kReportIntervalFieldNumber = 3, kMailboxMessageFieldNumber = 5, kInfoFieldNumber = 8, + kFlowStatFieldNumber = 9, kDurationSinceEpochFieldNumber = 6, kNodeEpochFieldNumber = 7, }; @@ -367,6 +376,24 @@ class HeartbeatRequest final : ::greptime::v1::meta::NodeInfo* info); ::greptime::v1::meta::NodeInfo* unsafe_arena_release_info(); + // .greptime.v1.meta.FlowStat flow_stat = 9; + bool has_flow_stat() const; + private: + bool _internal_has_flow_stat() const; + public: + void clear_flow_stat(); + const ::greptime::v1::meta::FlowStat& flow_stat() const; + PROTOBUF_NODISCARD ::greptime::v1::meta::FlowStat* release_flow_stat(); + ::greptime::v1::meta::FlowStat* mutable_flow_stat(); + void set_allocated_flow_stat(::greptime::v1::meta::FlowStat* flow_stat); + private: + const ::greptime::v1::meta::FlowStat& _internal_flow_stat() const; + ::greptime::v1::meta::FlowStat* _internal_mutable_flow_stat(); + public: + void unsafe_arena_set_allocated_flow_stat( + ::greptime::v1::meta::FlowStat* flow_stat); + ::greptime::v1::meta::FlowStat* unsafe_arena_release_flow_stat(); + // uint64 duration_since_epoch = 6; void clear_duration_since_epoch(); uint64_t duration_since_epoch() const; @@ -399,6 +426,7 @@ class HeartbeatRequest final : ::greptime::v1::meta::TimeInterval* report_interval_; ::greptime::v1::meta::MailboxMessage* mailbox_message_; ::greptime::v1::meta::NodeInfo* info_; + ::greptime::v1::meta::FlowStat* flow_stat_; uint64_t duration_since_epoch_; uint64_t node_epoch_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -848,6 +876,193 @@ class RegionStat final : }; // ------------------------------------------------------------------- +class FlowStat_FlowStatSizeEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + FlowStat_FlowStatSizeEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR FlowStat_FlowStatSizeEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit FlowStat_FlowStatSizeEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const FlowStat_FlowStatSizeEntry_DoNotUse& other); + static const FlowStat_FlowStatSizeEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_FlowStat_FlowStatSizeEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + 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 FlowStat final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.FlowStat) */ { + public: + inline FlowStat() : FlowStat(nullptr) {} + ~FlowStat() override; + explicit PROTOBUF_CONSTEXPR FlowStat(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FlowStat(const FlowStat& from); + FlowStat(FlowStat&& from) noexcept + : FlowStat() { + *this = ::std::move(from); + } + + inline FlowStat& operator=(const FlowStat& from) { + CopyFrom(from); + return *this; + } + inline FlowStat& operator=(FlowStat&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const FlowStat& default_instance() { + return *internal_default_instance(); + } + static inline const FlowStat* internal_default_instance() { + return reinterpret_cast( + &_FlowStat_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(FlowStat& a, FlowStat& b) { + a.Swap(&b); + } + inline void Swap(FlowStat* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FlowStat* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FlowStat* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const FlowStat& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const FlowStat& from) { + FlowStat::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(FlowStat* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.meta.FlowStat"; + } + protected: + explicit FlowStat(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kFlowStatSizeFieldNumber = 1, + }; + // map flow_stat_size = 1; + int flow_stat_size_size() const; + private: + int _internal_flow_stat_size_size() const; + public: + void clear_flow_stat_size(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, uint64_t >& + _internal_flow_stat_size() const; + ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, uint64_t >* + _internal_mutable_flow_stat_size(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, uint64_t >& + flow_stat_size() const; + ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, uint64_t >* + mutable_flow_stat_size(); + + // @@protoc_insertion_point(class_scope:greptime.v1.meta.FlowStat) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + FlowStat_FlowStatSizeEntry_DoNotUse, + uint32_t, uint64_t, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64> flow_stat_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto; +}; +// ------------------------------------------------------------------- + class HeartbeatResponse final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.HeartbeatResponse) */ { public: @@ -896,7 +1111,7 @@ class HeartbeatResponse final : &_HeartbeatResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 6; friend void swap(HeartbeatResponse& a, HeartbeatResponse& b) { a.Swap(&b); @@ -1093,7 +1308,7 @@ class GrantedRegion final : &_GrantedRegion_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 7; friend void swap(GrantedRegion& a, GrantedRegion& b) { a.Swap(&b); @@ -1252,7 +1467,7 @@ class RegionLease final : &_RegionLease_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 8; friend void swap(RegionLease& a, RegionLease& b) { a.Swap(&b); @@ -1456,7 +1671,7 @@ class AskLeaderRequest final : &_AskLeaderRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 9; friend void swap(AskLeaderRequest& a, AskLeaderRequest& b) { a.Swap(&b); @@ -1613,7 +1828,7 @@ class AskLeaderResponse final : &_AskLeaderResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 10; friend void swap(AskLeaderResponse& a, AskLeaderResponse& b) { a.Swap(&b); @@ -1795,7 +2010,7 @@ class MailboxMessage final : &_MailboxMessage_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 11; friend void swap(MailboxMessage& a, MailboxMessage& b) { a.Swap(&b); @@ -2510,6 +2725,96 @@ inline void HeartbeatRequest::set_allocated_info(::greptime::v1::meta::NodeInfo* // @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.HeartbeatRequest.info) } +// .greptime.v1.meta.FlowStat flow_stat = 9; +inline bool HeartbeatRequest::_internal_has_flow_stat() const { + return this != internal_default_instance() && _impl_.flow_stat_ != nullptr; +} +inline bool HeartbeatRequest::has_flow_stat() const { + return _internal_has_flow_stat(); +} +inline void HeartbeatRequest::clear_flow_stat() { + if (GetArenaForAllocation() == nullptr && _impl_.flow_stat_ != nullptr) { + delete _impl_.flow_stat_; + } + _impl_.flow_stat_ = nullptr; +} +inline const ::greptime::v1::meta::FlowStat& HeartbeatRequest::_internal_flow_stat() const { + const ::greptime::v1::meta::FlowStat* p = _impl_.flow_stat_; + return p != nullptr ? *p : reinterpret_cast( + ::greptime::v1::meta::_FlowStat_default_instance_); +} +inline const ::greptime::v1::meta::FlowStat& HeartbeatRequest::flow_stat() const { + // @@protoc_insertion_point(field_get:greptime.v1.meta.HeartbeatRequest.flow_stat) + return _internal_flow_stat(); +} +inline void HeartbeatRequest::unsafe_arena_set_allocated_flow_stat( + ::greptime::v1::meta::FlowStat* flow_stat) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.flow_stat_); + } + _impl_.flow_stat_ = flow_stat; + if (flow_stat) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.meta.HeartbeatRequest.flow_stat) +} +inline ::greptime::v1::meta::FlowStat* HeartbeatRequest::release_flow_stat() { + + ::greptime::v1::meta::FlowStat* temp = _impl_.flow_stat_; + _impl_.flow_stat_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::greptime::v1::meta::FlowStat* HeartbeatRequest::unsafe_arena_release_flow_stat() { + // @@protoc_insertion_point(field_release:greptime.v1.meta.HeartbeatRequest.flow_stat) + + ::greptime::v1::meta::FlowStat* temp = _impl_.flow_stat_; + _impl_.flow_stat_ = nullptr; + return temp; +} +inline ::greptime::v1::meta::FlowStat* HeartbeatRequest::_internal_mutable_flow_stat() { + + if (_impl_.flow_stat_ == nullptr) { + auto* p = CreateMaybeMessage<::greptime::v1::meta::FlowStat>(GetArenaForAllocation()); + _impl_.flow_stat_ = p; + } + return _impl_.flow_stat_; +} +inline ::greptime::v1::meta::FlowStat* HeartbeatRequest::mutable_flow_stat() { + ::greptime::v1::meta::FlowStat* _msg = _internal_mutable_flow_stat(); + // @@protoc_insertion_point(field_mutable:greptime.v1.meta.HeartbeatRequest.flow_stat) + return _msg; +} +inline void HeartbeatRequest::set_allocated_flow_stat(::greptime::v1::meta::FlowStat* flow_stat) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.flow_stat_; + } + if (flow_stat) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(flow_stat); + if (message_arena != submessage_arena) { + flow_stat = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, flow_stat, submessage_arena); + } + + } else { + + } + _impl_.flow_stat_ = flow_stat; + // @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.HeartbeatRequest.flow_stat) +} + // ------------------------------------------------------------------- // NodeInfo @@ -2821,6 +3126,41 @@ RegionStat::mutable_extensions() { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// FlowStat + +// map flow_stat_size = 1; +inline int FlowStat::_internal_flow_stat_size_size() const { + return _impl_.flow_stat_size_.size(); +} +inline int FlowStat::flow_stat_size_size() const { + return _internal_flow_stat_size_size(); +} +inline void FlowStat::clear_flow_stat_size() { + _impl_.flow_stat_size_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, uint64_t >& +FlowStat::_internal_flow_stat_size() const { + return _impl_.flow_stat_size_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, uint64_t >& +FlowStat::flow_stat_size() const { + // @@protoc_insertion_point(field_map:greptime.v1.meta.FlowStat.flow_stat_size) + return _internal_flow_stat_size(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, uint64_t >* +FlowStat::_internal_mutable_flow_stat_size() { + return _impl_.flow_stat_size_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, uint64_t >* +FlowStat::mutable_flow_stat_size() { + // @@protoc_insertion_point(field_mutable_map:greptime.v1.meta.FlowStat.flow_stat_size) + return _internal_mutable_flow_stat_size(); +} + +// ------------------------------------------------------------------- + // HeartbeatResponse // .greptime.v1.meta.ResponseHeader header = 1; @@ -3827,6 +4167,10 @@ inline MailboxMessage::PayloadCase MailboxMessage::payload_case() const { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/go/greptime/v1/meta/heartbeat.pb.go b/go/greptime/v1/meta/heartbeat.pb.go index 90f5350..c8e346e 100644 --- a/go/greptime/v1/meta/heartbeat.pb.go +++ b/go/greptime/v1/meta/heartbeat.pb.go @@ -41,9 +41,11 @@ const ( RegionRole_Leader RegionRole = 0 // Readonly region. RegionRole_Follower RegionRole = 1 - // A downgrading region, which is in the process of downgrading from Leader to Follower. + // A downgrading region, which is in the process of downgrading from Leader to + // Follower. // - // This role is used to prevent the region from being written during the downgrade process. + // This role is used to prevent the region from being written during the + // downgrade process. RegionRole_DowngradingLeader RegionRole = 2 ) @@ -107,6 +109,7 @@ type HeartbeatRequest struct { // The node's epoch NodeEpoch uint64 `protobuf:"varint,7,opt,name=node_epoch,json=nodeEpoch,proto3" json:"node_epoch,omitempty"` Info *NodeInfo `protobuf:"bytes,8,opt,name=info,proto3" json:"info,omitempty"` + FlowStat *FlowStat `protobuf:"bytes,9,opt,name=flow_stat,json=flowStat,proto3" json:"flow_stat,omitempty"` } func (x *HeartbeatRequest) Reset() { @@ -197,6 +200,13 @@ func (x *HeartbeatRequest) GetInfo() *NodeInfo { return nil } +func (x *HeartbeatRequest) GetFlowStat() *FlowStat { + if x != nil { + return x.FlowStat + } + return nil +} + type NodeInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -363,6 +373,56 @@ func (x *RegionStat) GetExtensions() map[string][]byte { return nil } +type FlowStat struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Each flow's in mem state's size in bytes + // due to protobuf's key can't be a message, so we use uint32 as the key which + // is [`FlowId`]'s inner field `id` + FlowStatSize map[uint32]uint64 `protobuf:"bytes,1,rep,name=flow_stat_size,json=flowStatSize,proto3" json:"flow_stat_size,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (x *FlowStat) Reset() { + *x = FlowStat{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlowStat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlowStat) ProtoMessage() {} + +func (x *FlowStat) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlowStat.ProtoReflect.Descriptor instead. +func (*FlowStat) Descriptor() ([]byte, []int) { + return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{3} +} + +func (x *FlowStat) GetFlowStatSize() map[uint32]uint64 { + if x != nil { + return x.FlowStatSize + } + return nil +} + type HeartbeatResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -376,7 +436,7 @@ type HeartbeatResponse struct { func (x *HeartbeatResponse) Reset() { *x = HeartbeatResponse{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -389,7 +449,7 @@ func (x *HeartbeatResponse) String() string { func (*HeartbeatResponse) ProtoMessage() {} func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -402,7 +462,7 @@ func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead. func (*HeartbeatResponse) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{3} + return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{4} } func (x *HeartbeatResponse) GetHeader() *ResponseHeader { @@ -438,7 +498,7 @@ type GrantedRegion struct { func (x *GrantedRegion) Reset() { *x = GrantedRegion{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -451,7 +511,7 @@ func (x *GrantedRegion) String() string { func (*GrantedRegion) ProtoMessage() {} func (x *GrantedRegion) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -464,7 +524,7 @@ func (x *GrantedRegion) ProtoReflect() protoreflect.Message { // Deprecated: Use GrantedRegion.ProtoReflect.Descriptor instead. func (*GrantedRegion) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{4} + return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{5} } func (x *GrantedRegion) GetRegionId() uint64 { @@ -495,7 +555,7 @@ type RegionLease struct { func (x *RegionLease) Reset() { *x = RegionLease{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -508,7 +568,7 @@ func (x *RegionLease) String() string { func (*RegionLease) ProtoMessage() {} func (x *RegionLease) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -521,7 +581,7 @@ func (x *RegionLease) ProtoReflect() protoreflect.Message { // Deprecated: Use RegionLease.ProtoReflect.Descriptor instead. func (*RegionLease) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{5} + return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{6} } func (x *RegionLease) GetRegions() []*GrantedRegion { @@ -563,7 +623,7 @@ type AskLeaderRequest struct { func (x *AskLeaderRequest) Reset() { *x = AskLeaderRequest{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -576,7 +636,7 @@ func (x *AskLeaderRequest) String() string { func (*AskLeaderRequest) ProtoMessage() {} func (x *AskLeaderRequest) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -589,7 +649,7 @@ func (x *AskLeaderRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AskLeaderRequest.ProtoReflect.Descriptor instead. func (*AskLeaderRequest) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{6} + return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{7} } func (x *AskLeaderRequest) GetHeader() *RequestHeader { @@ -611,7 +671,7 @@ type AskLeaderResponse struct { func (x *AskLeaderResponse) Reset() { *x = AskLeaderResponse{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[7] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -624,7 +684,7 @@ func (x *AskLeaderResponse) String() string { func (*AskLeaderResponse) ProtoMessage() {} func (x *AskLeaderResponse) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[7] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -637,7 +697,7 @@ func (x *AskLeaderResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AskLeaderResponse.ProtoReflect.Descriptor instead. func (*AskLeaderResponse) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{7} + return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{8} } func (x *AskLeaderResponse) GetHeader() *ResponseHeader { @@ -679,7 +739,7 @@ type MailboxMessage struct { func (x *MailboxMessage) Reset() { *x = MailboxMessage{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[8] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -692,7 +752,7 @@ func (x *MailboxMessage) String() string { func (*MailboxMessage) ProtoMessage() {} func (x *MailboxMessage) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[8] + mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -705,7 +765,7 @@ func (x *MailboxMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use MailboxMessage.ProtoReflect.Descriptor instead. func (*MailboxMessage) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{8} + return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{9} } func (x *MailboxMessage) GetId() uint64 { @@ -775,7 +835,7 @@ var file_greptime_v1_meta_heartbeat_proto_rawDesc = []byte{ 0x74, 0x6f, 0x12, 0x10, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x03, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, + 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x04, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 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, @@ -804,112 +864,125 @@ var file_greptime_v1_meta_heartbeat_proto_rawDesc = []byte{ 0x6f, 0x63, 0x68, 0x12, 0x2e, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, - 0x6e, 0x66, 0x6f, 0x22, 0x67, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, - 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, 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, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x63, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x77, 0x63, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x77, 0x63, 0x75, 0x73, - 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x61, 0x70, 0x70, - 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x16, 0x0a, - 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, - 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, 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, 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, 0x3d, - 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, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x6f, 0x77, 0x6e, 0x67, 0x72, - 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x02, 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, + 0x6e, 0x66, 0x6f, 0x12, 0x37, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x74, + 0x61, 0x74, 0x52, 0x08, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x22, 0x67, 0x0a, 0x08, + 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, 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, 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, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x04, 0x72, 0x63, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x63, 0x75, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x04, 0x77, 0x63, 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x70, 0x70, + 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 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, - 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, + 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 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, 0x9f, 0x01, + 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x12, 0x52, 0x0a, 0x0e, 0x66, 0x6c, + 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0c, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x1a, 0x3f, + 0x0a, 0x11, 0x46, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 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, + 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, 0x3d, 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, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x6f, 0x77, 0x6e, 0x67, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, + 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x02, 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 ( @@ -925,50 +998,54 @@ 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, 10) +var file_greptime_v1_meta_heartbeat_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_greptime_v1_meta_heartbeat_proto_goTypes = []interface{}{ (RegionRole)(0), // 0: greptime.v1.meta.RegionRole (*HeartbeatRequest)(nil), // 1: greptime.v1.meta.HeartbeatRequest (*NodeInfo)(nil), // 2: greptime.v1.meta.NodeInfo (*RegionStat)(nil), // 3: greptime.v1.meta.RegionStat - (*HeartbeatResponse)(nil), // 4: greptime.v1.meta.HeartbeatResponse - (*GrantedRegion)(nil), // 5: greptime.v1.meta.GrantedRegion - (*RegionLease)(nil), // 6: greptime.v1.meta.RegionLease - (*AskLeaderRequest)(nil), // 7: greptime.v1.meta.AskLeaderRequest - (*AskLeaderResponse)(nil), // 8: greptime.v1.meta.AskLeaderResponse - (*MailboxMessage)(nil), // 9: greptime.v1.meta.MailboxMessage - 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 + (*FlowStat)(nil), // 4: greptime.v1.meta.FlowStat + (*HeartbeatResponse)(nil), // 5: greptime.v1.meta.HeartbeatResponse + (*GrantedRegion)(nil), // 6: greptime.v1.meta.GrantedRegion + (*RegionLease)(nil), // 7: greptime.v1.meta.RegionLease + (*AskLeaderRequest)(nil), // 8: greptime.v1.meta.AskLeaderRequest + (*AskLeaderResponse)(nil), // 9: greptime.v1.meta.AskLeaderResponse + (*MailboxMessage)(nil), // 10: greptime.v1.meta.MailboxMessage + nil, // 11: greptime.v1.meta.RegionStat.ExtensionsEntry + nil, // 12: greptime.v1.meta.FlowStat.FlowStatSizeEntry + (*RequestHeader)(nil), // 13: greptime.v1.meta.RequestHeader + (*Peer)(nil), // 14: greptime.v1.meta.Peer + (*TimeInterval)(nil), // 15: greptime.v1.meta.TimeInterval + (*ResponseHeader)(nil), // 16: greptime.v1.meta.ResponseHeader } var file_greptime_v1_meta_heartbeat_proto_depIdxs = []int32{ - 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 + 13, // 0: greptime.v1.meta.HeartbeatRequest.header:type_name -> greptime.v1.meta.RequestHeader + 14, // 1: greptime.v1.meta.HeartbeatRequest.peer:type_name -> greptime.v1.meta.Peer + 15, // 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 + 10, // 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 - 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 + 4, // 6: greptime.v1.meta.HeartbeatRequest.flow_stat:type_name -> greptime.v1.meta.FlowStat + 0, // 7: greptime.v1.meta.RegionStat.role:type_name -> greptime.v1.meta.RegionRole + 11, // 8: greptime.v1.meta.RegionStat.extensions:type_name -> greptime.v1.meta.RegionStat.ExtensionsEntry + 12, // 9: greptime.v1.meta.FlowStat.flow_stat_size:type_name -> greptime.v1.meta.FlowStat.FlowStatSizeEntry + 16, // 10: greptime.v1.meta.HeartbeatResponse.header:type_name -> greptime.v1.meta.ResponseHeader + 10, // 11: greptime.v1.meta.HeartbeatResponse.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage + 7, // 12: greptime.v1.meta.HeartbeatResponse.region_lease:type_name -> greptime.v1.meta.RegionLease + 0, // 13: greptime.v1.meta.GrantedRegion.role:type_name -> greptime.v1.meta.RegionRole + 6, // 14: greptime.v1.meta.RegionLease.regions:type_name -> greptime.v1.meta.GrantedRegion + 13, // 15: greptime.v1.meta.AskLeaderRequest.header:type_name -> greptime.v1.meta.RequestHeader + 16, // 16: greptime.v1.meta.AskLeaderResponse.header:type_name -> greptime.v1.meta.ResponseHeader + 14, // 17: greptime.v1.meta.AskLeaderResponse.leader:type_name -> greptime.v1.meta.Peer + 1, // 18: greptime.v1.meta.Heartbeat.Heartbeat:input_type -> greptime.v1.meta.HeartbeatRequest + 8, // 19: greptime.v1.meta.Heartbeat.AskLeader:input_type -> greptime.v1.meta.AskLeaderRequest + 5, // 20: greptime.v1.meta.Heartbeat.Heartbeat:output_type -> greptime.v1.meta.HeartbeatResponse + 9, // 21: greptime.v1.meta.Heartbeat.AskLeader:output_type -> greptime.v1.meta.AskLeaderResponse + 20, // [20:22] is the sub-list for method output_type + 18, // [18:20] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_greptime_v1_meta_heartbeat_proto_init() } @@ -1015,7 +1092,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() { } } file_greptime_v1_meta_heartbeat_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeartbeatResponse); i { + switch v := v.(*FlowStat); i { case 0: return &v.state case 1: @@ -1027,7 +1104,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() { } } file_greptime_v1_meta_heartbeat_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrantedRegion); i { + switch v := v.(*HeartbeatResponse); i { case 0: return &v.state case 1: @@ -1039,7 +1116,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() { } } file_greptime_v1_meta_heartbeat_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegionLease); i { + switch v := v.(*GrantedRegion); i { case 0: return &v.state case 1: @@ -1051,7 +1128,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() { } } file_greptime_v1_meta_heartbeat_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AskLeaderRequest); i { + switch v := v.(*RegionLease); i { case 0: return &v.state case 1: @@ -1063,7 +1140,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() { } } file_greptime_v1_meta_heartbeat_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AskLeaderResponse); i { + switch v := v.(*AskLeaderRequest); i { case 0: return &v.state case 1: @@ -1075,6 +1152,18 @@ func file_greptime_v1_meta_heartbeat_proto_init() { } } file_greptime_v1_meta_heartbeat_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AskLeaderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_meta_heartbeat_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MailboxMessage); i { case 0: return &v.state @@ -1087,7 +1176,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() { } } } - file_greptime_v1_meta_heartbeat_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_greptime_v1_meta_heartbeat_proto_msgTypes[9].OneofWrappers = []interface{}{ (*MailboxMessage_Json)(nil), } type x struct{} @@ -1096,7 +1185,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: 10, + NumMessages: 12, 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 47c736c..74f5969 100644 --- a/java/src/main/java/greptime/v1/meta/HeartbeatOuterClass.java +++ b/java/src/main/java/greptime/v1/meta/HeartbeatOuterClass.java @@ -37,9 +37,10 @@ public final class HeartbeatOuterClass { Follower(1), /** *
-     * A downgrading region, which is in the process of downgrading from Leader to Follower.
-     * 
-     * This role is used to prevent the region from being written during the downgrade process.
+     * A downgrading region, which is in the process of downgrading from Leader to
+     * Follower.
+     * This role is used to prevent the region from being written during the
+     * downgrade process.
      * 
* * DowngradingLeader = 2; @@ -66,9 +67,10 @@ public final class HeartbeatOuterClass { public static final int Follower_VALUE = 1; /** *
-     * A downgrading region, which is in the process of downgrading from Leader to Follower.
-     * 
-     * This role is used to prevent the region from being written during the downgrade process.
+     * A downgrading region, which is in the process of downgrading from Leader to
+     * Follower.
+     * This role is used to prevent the region from being written during the
+     * downgrade process.
      * 
* * DowngradingLeader = 2; @@ -337,6 +339,21 @@ public final class HeartbeatOuterClass { * .greptime.v1.meta.NodeInfo info = 8; */ greptime.v1.meta.HeartbeatOuterClass.NodeInfoOrBuilder getInfoOrBuilder(); + + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + * @return Whether the flowStat field is set. + */ + boolean hasFlowStat(); + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + * @return The flowStat. + */ + greptime.v1.meta.HeartbeatOuterClass.FlowStat getFlowStat(); + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + */ + greptime.v1.meta.HeartbeatOuterClass.FlowStatOrBuilder getFlowStatOrBuilder(); } /** * Protobuf type {@code greptime.v1.meta.HeartbeatRequest} @@ -469,6 +486,19 @@ public final class HeartbeatOuterClass { break; } + case 74: { + greptime.v1.meta.HeartbeatOuterClass.FlowStat.Builder subBuilder = null; + if (flowStat_ != null) { + subBuilder = flowStat_.toBuilder(); + } + flowStat_ = input.readMessage(greptime.v1.meta.HeartbeatOuterClass.FlowStat.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(flowStat_); + flowStat_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -762,6 +792,32 @@ public final class HeartbeatOuterClass { return getInfo(); } + public static final int FLOW_STAT_FIELD_NUMBER = 9; + private greptime.v1.meta.HeartbeatOuterClass.FlowStat flowStat_; + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + * @return Whether the flowStat field is set. + */ + @java.lang.Override + public boolean hasFlowStat() { + return flowStat_ != null; + } + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + * @return The flowStat. + */ + @java.lang.Override + public greptime.v1.meta.HeartbeatOuterClass.FlowStat getFlowStat() { + return flowStat_ == null ? greptime.v1.meta.HeartbeatOuterClass.FlowStat.getDefaultInstance() : flowStat_; + } + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + */ + @java.lang.Override + public greptime.v1.meta.HeartbeatOuterClass.FlowStatOrBuilder getFlowStatOrBuilder() { + return getFlowStat(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -800,6 +856,9 @@ public final class HeartbeatOuterClass { if (info_ != null) { output.writeMessage(8, getInfo()); } + if (flowStat_ != null) { + output.writeMessage(9, getFlowStat()); + } unknownFields.writeTo(output); } @@ -841,6 +900,10 @@ public final class HeartbeatOuterClass { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getInfo()); } + if (flowStat_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getFlowStat()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -887,6 +950,11 @@ public final class HeartbeatOuterClass { if (!getInfo() .equals(other.getInfo())) return false; } + if (hasFlowStat() != other.hasFlowStat()) return false; + if (hasFlowStat()) { + if (!getFlowStat() + .equals(other.getFlowStat())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -928,6 +996,10 @@ public final class HeartbeatOuterClass { hash = (37 * hash) + INFO_FIELD_NUMBER; hash = (53 * hash) + getInfo().hashCode(); } + if (hasFlowStat()) { + hash = (37 * hash) + FLOW_STAT_FIELD_NUMBER; + hash = (53 * hash) + getFlowStat().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1102,6 +1174,12 @@ public final class HeartbeatOuterClass { info_ = null; infoBuilder_ = null; } + if (flowStatBuilder_ == null) { + flowStat_ = null; + } else { + flowStat_ = null; + flowStatBuilder_ = null; + } return this; } @@ -1165,6 +1243,11 @@ public final class HeartbeatOuterClass { } else { result.info_ = infoBuilder_.build(); } + if (flowStatBuilder_ == null) { + result.flowStat_ = flowStat_; + } else { + result.flowStat_ = flowStatBuilder_.build(); + } onBuilt(); return result; } @@ -1260,6 +1343,9 @@ public final class HeartbeatOuterClass { if (other.hasInfo()) { mergeInfo(other.getInfo()); } + if (other.hasFlowStat()) { + mergeFlowStat(other.getFlowStat()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2390,6 +2476,125 @@ public final class HeartbeatOuterClass { } return infoBuilder_; } + + private greptime.v1.meta.HeartbeatOuterClass.FlowStat flowStat_; + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.HeartbeatOuterClass.FlowStat, greptime.v1.meta.HeartbeatOuterClass.FlowStat.Builder, greptime.v1.meta.HeartbeatOuterClass.FlowStatOrBuilder> flowStatBuilder_; + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + * @return Whether the flowStat field is set. + */ + public boolean hasFlowStat() { + return flowStatBuilder_ != null || flowStat_ != null; + } + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + * @return The flowStat. + */ + public greptime.v1.meta.HeartbeatOuterClass.FlowStat getFlowStat() { + if (flowStatBuilder_ == null) { + return flowStat_ == null ? greptime.v1.meta.HeartbeatOuterClass.FlowStat.getDefaultInstance() : flowStat_; + } else { + return flowStatBuilder_.getMessage(); + } + } + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + */ + public Builder setFlowStat(greptime.v1.meta.HeartbeatOuterClass.FlowStat value) { + if (flowStatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + flowStat_ = value; + onChanged(); + } else { + flowStatBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + */ + public Builder setFlowStat( + greptime.v1.meta.HeartbeatOuterClass.FlowStat.Builder builderForValue) { + if (flowStatBuilder_ == null) { + flowStat_ = builderForValue.build(); + onChanged(); + } else { + flowStatBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + */ + public Builder mergeFlowStat(greptime.v1.meta.HeartbeatOuterClass.FlowStat value) { + if (flowStatBuilder_ == null) { + if (flowStat_ != null) { + flowStat_ = + greptime.v1.meta.HeartbeatOuterClass.FlowStat.newBuilder(flowStat_).mergeFrom(value).buildPartial(); + } else { + flowStat_ = value; + } + onChanged(); + } else { + flowStatBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + */ + public Builder clearFlowStat() { + if (flowStatBuilder_ == null) { + flowStat_ = null; + onChanged(); + } else { + flowStat_ = null; + flowStatBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + */ + public greptime.v1.meta.HeartbeatOuterClass.FlowStat.Builder getFlowStatBuilder() { + + onChanged(); + return getFlowStatFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + */ + public greptime.v1.meta.HeartbeatOuterClass.FlowStatOrBuilder getFlowStatOrBuilder() { + if (flowStatBuilder_ != null) { + return flowStatBuilder_.getMessageOrBuilder(); + } else { + return flowStat_ == null ? + greptime.v1.meta.HeartbeatOuterClass.FlowStat.getDefaultInstance() : flowStat_; + } + } + /** + * .greptime.v1.meta.FlowStat flow_stat = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.HeartbeatOuterClass.FlowStat, greptime.v1.meta.HeartbeatOuterClass.FlowStat.Builder, greptime.v1.meta.HeartbeatOuterClass.FlowStatOrBuilder> + getFlowStatFieldBuilder() { + if (flowStatBuilder_ == null) { + flowStatBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.HeartbeatOuterClass.FlowStat, greptime.v1.meta.HeartbeatOuterClass.FlowStat.Builder, greptime.v1.meta.HeartbeatOuterClass.FlowStatOrBuilder>( + getFlowStat(), + getParentForChildren(), + isClean()); + flowStat_ = null; + } + return flowStatBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4744,6 +4949,842 @@ com.google.protobuf.ByteString defaultValue); } + public interface FlowStatOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.meta.FlowStat) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Each flow's in mem state's size in bytes
+     * due to protobuf's key can't be a message, so we use uint32 as the key which
+     * is [`FlowId`]'s inner field `id`
+     * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + int getFlowStatSizeCount(); + /** + *
+     * Each flow's in mem state's size in bytes
+     * due to protobuf's key can't be a message, so we use uint32 as the key which
+     * is [`FlowId`]'s inner field `id`
+     * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + boolean containsFlowStatSize( + int key); + /** + * Use {@link #getFlowStatSizeMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFlowStatSize(); + /** + *
+     * Each flow's in mem state's size in bytes
+     * due to protobuf's key can't be a message, so we use uint32 as the key which
+     * is [`FlowId`]'s inner field `id`
+     * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + java.util.Map + getFlowStatSizeMap(); + /** + *
+     * Each flow's in mem state's size in bytes
+     * due to protobuf's key can't be a message, so we use uint32 as the key which
+     * is [`FlowId`]'s inner field `id`
+     * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + + long getFlowStatSizeOrDefault( + int key, + long defaultValue); + /** + *
+     * Each flow's in mem state's size in bytes
+     * due to protobuf's key can't be a message, so we use uint32 as the key which
+     * is [`FlowId`]'s inner field `id`
+     * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + + long getFlowStatSizeOrThrow( + int key); + } + /** + * Protobuf type {@code greptime.v1.meta.FlowStat} + */ + public static final class FlowStat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.meta.FlowStat) + FlowStatOrBuilder { + private static final long serialVersionUID = 0L; + // Use FlowStat.newBuilder() to construct. + private FlowStat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FlowStat() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FlowStat(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FlowStat( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + flowStatSize_ = com.google.protobuf.MapField.newMapField( + FlowStatSizeDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + flowStatSize__ = input.readMessage( + FlowStatSizeDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + flowStatSize_.getMutableMap().put( + flowStatSize__.getKey(), flowStatSize__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_FlowStat_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFlowStatSize(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_FlowStat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.meta.HeartbeatOuterClass.FlowStat.class, greptime.v1.meta.HeartbeatOuterClass.FlowStat.Builder.class); + } + + public static final int FLOW_STAT_SIZE_FIELD_NUMBER = 1; + private static final class FlowStatSizeDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, java.lang.Long> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_FlowStat_FlowStatSizeEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.UINT32, + 0, + com.google.protobuf.WireFormat.FieldType.UINT64, + 0L); + } + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Long> flowStatSize_; + private com.google.protobuf.MapField + internalGetFlowStatSize() { + if (flowStatSize_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FlowStatSizeDefaultEntryHolder.defaultEntry); + } + return flowStatSize_; + } + + public int getFlowStatSizeCount() { + return internalGetFlowStatSize().getMap().size(); + } + /** + *
+     * Each flow's in mem state's size in bytes
+     * due to protobuf's key can't be a message, so we use uint32 as the key which
+     * is [`FlowId`]'s inner field `id`
+     * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + + @java.lang.Override + public boolean containsFlowStatSize( + int key) { + + return internalGetFlowStatSize().getMap().containsKey(key); + } + /** + * Use {@link #getFlowStatSizeMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFlowStatSize() { + return getFlowStatSizeMap(); + } + /** + *
+     * Each flow's in mem state's size in bytes
+     * due to protobuf's key can't be a message, so we use uint32 as the key which
+     * is [`FlowId`]'s inner field `id`
+     * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + @java.lang.Override + + public java.util.Map getFlowStatSizeMap() { + return internalGetFlowStatSize().getMap(); + } + /** + *
+     * Each flow's in mem state's size in bytes
+     * due to protobuf's key can't be a message, so we use uint32 as the key which
+     * is [`FlowId`]'s inner field `id`
+     * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + @java.lang.Override + + public long getFlowStatSizeOrDefault( + int key, + long defaultValue) { + + java.util.Map map = + internalGetFlowStatSize().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Each flow's in mem state's size in bytes
+     * due to protobuf's key can't be a message, so we use uint32 as the key which
+     * is [`FlowId`]'s inner field `id`
+     * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + @java.lang.Override + + public long getFlowStatSizeOrThrow( + int key) { + + java.util.Map map = + internalGetFlowStatSize().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() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetFlowStatSize(), + FlowStatSizeDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetFlowStatSize().getMap().entrySet()) { + com.google.protobuf.MapEntry + flowStatSize__ = FlowStatSizeDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, flowStatSize__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof greptime.v1.meta.HeartbeatOuterClass.FlowStat)) { + return super.equals(obj); + } + greptime.v1.meta.HeartbeatOuterClass.FlowStat other = (greptime.v1.meta.HeartbeatOuterClass.FlowStat) obj; + + if (!internalGetFlowStatSize().equals( + other.internalGetFlowStatSize())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetFlowStatSize().getMap().isEmpty()) { + hash = (37 * hash) + FLOW_STAT_SIZE_FIELD_NUMBER; + hash = (53 * hash) + internalGetFlowStatSize().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(greptime.v1.meta.HeartbeatOuterClass.FlowStat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code greptime.v1.meta.FlowStat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.meta.FlowStat) + greptime.v1.meta.HeartbeatOuterClass.FlowStatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_FlowStat_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFlowStatSize(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableFlowStatSize(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_FlowStat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.meta.HeartbeatOuterClass.FlowStat.class, greptime.v1.meta.HeartbeatOuterClass.FlowStat.Builder.class); + } + + // Construct using greptime.v1.meta.HeartbeatOuterClass.FlowStat.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableFlowStatSize().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_FlowStat_descriptor; + } + + @java.lang.Override + public greptime.v1.meta.HeartbeatOuterClass.FlowStat getDefaultInstanceForType() { + return greptime.v1.meta.HeartbeatOuterClass.FlowStat.getDefaultInstance(); + } + + @java.lang.Override + public greptime.v1.meta.HeartbeatOuterClass.FlowStat build() { + greptime.v1.meta.HeartbeatOuterClass.FlowStat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public greptime.v1.meta.HeartbeatOuterClass.FlowStat buildPartial() { + greptime.v1.meta.HeartbeatOuterClass.FlowStat result = new greptime.v1.meta.HeartbeatOuterClass.FlowStat(this); + int from_bitField0_ = bitField0_; + result.flowStatSize_ = internalGetFlowStatSize(); + result.flowStatSize_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof greptime.v1.meta.HeartbeatOuterClass.FlowStat) { + return mergeFrom((greptime.v1.meta.HeartbeatOuterClass.FlowStat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(greptime.v1.meta.HeartbeatOuterClass.FlowStat other) { + if (other == greptime.v1.meta.HeartbeatOuterClass.FlowStat.getDefaultInstance()) return this; + internalGetMutableFlowStatSize().mergeFrom( + other.internalGetFlowStatSize()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + greptime.v1.meta.HeartbeatOuterClass.FlowStat parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (greptime.v1.meta.HeartbeatOuterClass.FlowStat) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Long> flowStatSize_; + private com.google.protobuf.MapField + internalGetFlowStatSize() { + if (flowStatSize_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FlowStatSizeDefaultEntryHolder.defaultEntry); + } + return flowStatSize_; + } + private com.google.protobuf.MapField + internalGetMutableFlowStatSize() { + onChanged();; + if (flowStatSize_ == null) { + flowStatSize_ = com.google.protobuf.MapField.newMapField( + FlowStatSizeDefaultEntryHolder.defaultEntry); + } + if (!flowStatSize_.isMutable()) { + flowStatSize_ = flowStatSize_.copy(); + } + return flowStatSize_; + } + + public int getFlowStatSizeCount() { + return internalGetFlowStatSize().getMap().size(); + } + /** + *
+       * Each flow's in mem state's size in bytes
+       * due to protobuf's key can't be a message, so we use uint32 as the key which
+       * is [`FlowId`]'s inner field `id`
+       * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + + @java.lang.Override + public boolean containsFlowStatSize( + int key) { + + return internalGetFlowStatSize().getMap().containsKey(key); + } + /** + * Use {@link #getFlowStatSizeMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFlowStatSize() { + return getFlowStatSizeMap(); + } + /** + *
+       * Each flow's in mem state's size in bytes
+       * due to protobuf's key can't be a message, so we use uint32 as the key which
+       * is [`FlowId`]'s inner field `id`
+       * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + @java.lang.Override + + public java.util.Map getFlowStatSizeMap() { + return internalGetFlowStatSize().getMap(); + } + /** + *
+       * Each flow's in mem state's size in bytes
+       * due to protobuf's key can't be a message, so we use uint32 as the key which
+       * is [`FlowId`]'s inner field `id`
+       * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + @java.lang.Override + + public long getFlowStatSizeOrDefault( + int key, + long defaultValue) { + + java.util.Map map = + internalGetFlowStatSize().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Each flow's in mem state's size in bytes
+       * due to protobuf's key can't be a message, so we use uint32 as the key which
+       * is [`FlowId`]'s inner field `id`
+       * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + @java.lang.Override + + public long getFlowStatSizeOrThrow( + int key) { + + java.util.Map map = + internalGetFlowStatSize().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFlowStatSize() { + internalGetMutableFlowStatSize().getMutableMap() + .clear(); + return this; + } + /** + *
+       * Each flow's in mem state's size in bytes
+       * due to protobuf's key can't be a message, so we use uint32 as the key which
+       * is [`FlowId`]'s inner field `id`
+       * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + + public Builder removeFlowStatSize( + int key) { + + internalGetMutableFlowStatSize().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFlowStatSize() { + return internalGetMutableFlowStatSize().getMutableMap(); + } + /** + *
+       * Each flow's in mem state's size in bytes
+       * due to protobuf's key can't be a message, so we use uint32 as the key which
+       * is [`FlowId`]'s inner field `id`
+       * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + public Builder putFlowStatSize( + int key, + long value) { + + + internalGetMutableFlowStatSize().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * Each flow's in mem state's size in bytes
+       * due to protobuf's key can't be a message, so we use uint32 as the key which
+       * is [`FlowId`]'s inner field `id`
+       * 
+ * + * map<uint32, uint64> flow_stat_size = 1; + */ + + public Builder putAllFlowStatSize( + java.util.Map values) { + internalGetMutableFlowStatSize().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.meta.FlowStat) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.meta.FlowStat) + private static final greptime.v1.meta.HeartbeatOuterClass.FlowStat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new greptime.v1.meta.HeartbeatOuterClass.FlowStat(); + } + + public static greptime.v1.meta.HeartbeatOuterClass.FlowStat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FlowStat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FlowStat(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public greptime.v1.meta.HeartbeatOuterClass.FlowStat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + public interface HeartbeatResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.meta.HeartbeatResponse) com.google.protobuf.MessageOrBuilder { @@ -10336,6 +11377,16 @@ com.google.protobuf.ByteString defaultValue); 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_FlowStat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_meta_FlowStat_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_meta_FlowStat_FlowStatSizeEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_meta_FlowStat_FlowStatSizeEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_meta_HeartbeatResponse_descriptor; private static final @@ -10377,7 +11428,7 @@ com.google.protobuf.ByteString defaultValue); java.lang.String[] descriptorData = { "\n greptime/v1/meta/heartbeat.proto\022\020grep" + "time.v1.meta\032\035greptime/v1/meta/common.pr" + - "oto\"\355\002\n\020HeartbeatRequest\022/\n\006header\030\001 \001(\013" + + "oto\"\234\003\n\020HeartbeatRequest\022/\n\006header\030\001 \001(\013" + "2\037.greptime.v1.meta.RequestHeader\022$\n\004pee" + "r\030\002 \001(\0132\026.greptime.v1.meta.Peer\0227\n\017repor" + "t_interval\030\003 \001(\0132\036.greptime.v1.meta.Time" + @@ -10386,41 +11437,46 @@ com.google.protobuf.ByteString defaultValue); "\005 \001(\0132 .greptime.v1.meta.MailboxMessage\022" + "\034\n\024duration_since_epoch\030\006 \001(\004\022\022\n\nnode_ep" + "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\"\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\022@\n\nexte" + - "nsions\030c \003(\0132,.greptime.v1.meta.RegionSt" + - "at.ExtensionsEntry\0321\n\017ExtensionsEntry\022\013\n" + - "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001\"\265\001\n\021Heartb" + - "eatResponse\0220\n\006header\030\001 \001(\0132 .greptime.v" + - "1.meta.ResponseHeader\0229\n\017mailbox_message" + - "\030\002 \001(\0132 .greptime.v1.meta.MailboxMessage" + - "\0223\n\014region_lease\030\003 \001(\0132\035.greptime.v1.met" + - "a.RegionLease\"N\n\rGrantedRegion\022\021\n\tregion" + - "_id\030\001 \001(\004\022*\n\004role\030\002 \001(\0162\034.greptime.v1.me" + - "ta.RegionRole\"\222\001\n\013RegionLease\0220\n\007regions" + - "\030\001 \003(\0132\037.greptime.v1.meta.GrantedRegion\022" + - "\034\n\024duration_since_epoch\030\002 \001(\004\022\025\n\rlease_s" + - "econds\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\021AskLe" + - "aderResponse\0220\n\006header\030\001 \001(\0132 .greptime." + - "v1.meta.ResponseHeader\022&\n\006leader\030\002 \001(\0132\026" + - ".greptime.v1.meta.Peer\"|\n\016MailboxMessage" + - "\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\nRegionRo" + - "le\022\n\n\006Leader\020\000\022\014\n\010Follower\020\001\022\025\n\021Downgrad" + - "ingLeader\020\0022\277\001\n\tHeartbeat\022Z\n\tHeartbeat\022\"" + - ".greptime.v1.meta.HeartbeatRequest\032#.gre" + - "ptime.v1.meta.HeartbeatResponse\"\000(\0010\001\022V\n" + - "\tAskLeader\022\".greptime.v1.meta.AskLeaderR" + - "equest\032#.greptime.v1.meta.AskLeaderRespo" + - "nse\"\000B extensions = 99; } +message FlowStat { + // Each flow's in mem state's size in bytes + // due to protobuf's key can't be a message, so we use uint32 as the key which + // is [`FlowId`]'s inner field `id` + map flow_stat_size = 1; +} + message HeartbeatResponse { ResponseHeader header = 1; MailboxMessage mailbox_message = 2;