refactor: add hostname field in NodeInfo and use it in MetasrvNodeInfo (#278)
This commit is contained in:
@@ -56,6 +56,7 @@ PROTOBUF_CONSTEXPR MetasrvNodeInfo::MetasrvNodeInfo(
|
||||
/*decltype(_impl_.version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.git_commit_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.peer_)*/nullptr
|
||||
, /*decltype(_impl_.info_)*/nullptr
|
||||
, /*decltype(_impl_.start_time_ms_)*/uint64_t{0u}
|
||||
, /*decltype(_impl_.memory_bytes_)*/uint64_t{0u}
|
||||
, /*decltype(_impl_.cpus_)*/0u
|
||||
@@ -105,6 +106,7 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fcluster_2eproto::offsets[] PRO
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MetasrvNodeInfo, _impl_.start_time_ms_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MetasrvNodeInfo, _impl_.cpus_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MetasrvNodeInfo, _impl_.memory_bytes_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MetasrvNodeInfo, _impl_.info_),
|
||||
};
|
||||
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(::greptime::v1::meta::MetasrvPeersRequest)},
|
||||
@@ -121,36 +123,39 @@ static const ::_pb::Message* const file_default_instances[] = {
|
||||
const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fcluster_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
"\n\036greptime/v1/meta/cluster.proto\022\020grepti"
|
||||
"me.v1.meta\032\035greptime/v1/meta/common.prot"
|
||||
"o\032\034greptime/v1/meta/store.proto\"F\n\023Metas"
|
||||
"rvPeersRequest\022/\n\006header\030\001 \001(\0132\037.greptim"
|
||||
"e.v1.meta.RequestHeader\"\261\001\n\024MetasrvPeers"
|
||||
"Response\0220\n\006header\030\001 \001(\0132 .greptime.v1.m"
|
||||
"eta.ResponseHeader\0221\n\006leader\030\002 \001(\0132!.gre"
|
||||
"ptime.v1.meta.MetasrvNodeInfo\0224\n\tfollowe"
|
||||
"rs\030\003 \003(\0132!.greptime.v1.meta.MetasrvNodeI"
|
||||
"nfo\"\227\001\n\017MetasrvNodeInfo\022$\n\004peer\030\001 \001(\0132\026."
|
||||
"greptime.v1.meta.Peer\022\017\n\007version\030\002 \001(\t\022\022"
|
||||
"\n\ngit_commit\030\003 \001(\t\022\025\n\rstart_time_ms\030\004 \001("
|
||||
"\004\022\014\n\004cpus\030\005 \001(\r\022\024\n\014memory_bytes\030\006 \001(\0042\205\002"
|
||||
"\n\007Cluster\022Q\n\010BatchGet\022!.greptime.v1.meta"
|
||||
".BatchGetRequest\032\".greptime.v1.meta.Batc"
|
||||
"hGetResponse\022H\n\005Range\022\036.greptime.v1.meta"
|
||||
".RangeRequest\032\037.greptime.v1.meta.RangeRe"
|
||||
"sponse\022]\n\014MetasrvPeers\022%.greptime.v1.met"
|
||||
"a.MetasrvPeersRequest\032&.greptime.v1.meta"
|
||||
".MetasrvPeersResponseB<Z:github.com/Grep"
|
||||
"timeTeam/greptime-proto/go/greptime/v1/m"
|
||||
"etab\006proto3"
|
||||
"o\032 greptime/v1/meta/heartbeat.proto\032\034gre"
|
||||
"ptime/v1/meta/store.proto\"F\n\023MetasrvPeer"
|
||||
"sRequest\022/\n\006header\030\001 \001(\0132\037.greptime.v1.m"
|
||||
"eta.RequestHeader\"\261\001\n\024MetasrvPeersRespon"
|
||||
"se\0220\n\006header\030\001 \001(\0132 .greptime.v1.meta.Re"
|
||||
"sponseHeader\0221\n\006leader\030\002 \001(\0132!.greptime."
|
||||
"v1.meta.MetasrvNodeInfo\0224\n\tfollowers\030\003 \003"
|
||||
"(\0132!.greptime.v1.meta.MetasrvNodeInfo\"\325\001"
|
||||
"\n\017MetasrvNodeInfo\022$\n\004peer\030\001 \001(\0132\026.grepti"
|
||||
"me.v1.meta.Peer\022\023\n\007version\030\002 \001(\tB\002\030\001\022\026\n\n"
|
||||
"git_commit\030\003 \001(\tB\002\030\001\022\031\n\rstart_time_ms\030\004 "
|
||||
"\001(\004B\002\030\001\022\020\n\004cpus\030\005 \001(\rB\002\030\001\022\030\n\014memory_byte"
|
||||
"s\030\006 \001(\004B\002\030\001\022(\n\004info\030\007 \001(\0132\032.greptime.v1."
|
||||
"meta.NodeInfo2\205\002\n\007Cluster\022Q\n\010BatchGet\022!."
|
||||
"greptime.v1.meta.BatchGetRequest\032\".grept"
|
||||
"ime.v1.meta.BatchGetResponse\022H\n\005Range\022\036."
|
||||
"greptime.v1.meta.RangeRequest\032\037.greptime"
|
||||
".v1.meta.RangeResponse\022]\n\014MetasrvPeers\022%"
|
||||
".greptime.v1.meta.MetasrvPeersRequest\032&."
|
||||
"greptime.v1.meta.MetasrvPeersResponseB<Z"
|
||||
":github.com/GreptimeTeam/greptime-proto/"
|
||||
"go/greptime/v1/metab\006proto3"
|
||||
;
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fmeta_2fcluster_2eproto_deps[2] = {
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fmeta_2fcluster_2eproto_deps[3] = {
|
||||
&::descriptor_table_greptime_2fv1_2fmeta_2fcommon_2eproto,
|
||||
&::descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto,
|
||||
&::descriptor_table_greptime_2fv1_2fmeta_2fstore_2eproto,
|
||||
};
|
||||
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fmeta_2fcluster_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fmeta_2fcluster_2eproto = {
|
||||
false, false, 851, descriptor_table_protodef_greptime_2fv1_2fmeta_2fcluster_2eproto,
|
||||
false, false, 947, descriptor_table_protodef_greptime_2fv1_2fmeta_2fcluster_2eproto,
|
||||
"greptime/v1/meta/cluster.proto",
|
||||
&descriptor_table_greptime_2fv1_2fmeta_2fcluster_2eproto_once, descriptor_table_greptime_2fv1_2fmeta_2fcluster_2eproto_deps, 2, 3,
|
||||
&descriptor_table_greptime_2fv1_2fmeta_2fcluster_2eproto_once, descriptor_table_greptime_2fv1_2fmeta_2fcluster_2eproto_deps, 3, 3,
|
||||
schemas, file_default_instances, TableStruct_greptime_2fv1_2fmeta_2fcluster_2eproto::offsets,
|
||||
file_level_metadata_greptime_2fv1_2fmeta_2fcluster_2eproto, file_level_enum_descriptors_greptime_2fv1_2fmeta_2fcluster_2eproto,
|
||||
file_level_service_descriptors_greptime_2fv1_2fmeta_2fcluster_2eproto,
|
||||
@@ -648,18 +653,29 @@ void MetasrvPeersResponse::InternalSwap(MetasrvPeersResponse* other) {
|
||||
class MetasrvNodeInfo::_Internal {
|
||||
public:
|
||||
static const ::greptime::v1::meta::Peer& peer(const MetasrvNodeInfo* msg);
|
||||
static const ::greptime::v1::meta::NodeInfo& info(const MetasrvNodeInfo* msg);
|
||||
};
|
||||
|
||||
const ::greptime::v1::meta::Peer&
|
||||
MetasrvNodeInfo::_Internal::peer(const MetasrvNodeInfo* msg) {
|
||||
return *msg->_impl_.peer_;
|
||||
}
|
||||
const ::greptime::v1::meta::NodeInfo&
|
||||
MetasrvNodeInfo::_Internal::info(const MetasrvNodeInfo* msg) {
|
||||
return *msg->_impl_.info_;
|
||||
}
|
||||
void MetasrvNodeInfo::clear_peer() {
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.peer_ != nullptr) {
|
||||
delete _impl_.peer_;
|
||||
}
|
||||
_impl_.peer_ = nullptr;
|
||||
}
|
||||
void MetasrvNodeInfo::clear_info() {
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.info_ != nullptr) {
|
||||
delete _impl_.info_;
|
||||
}
|
||||
_impl_.info_ = nullptr;
|
||||
}
|
||||
MetasrvNodeInfo::MetasrvNodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||
bool is_message_owned)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
||||
@@ -673,6 +689,7 @@ MetasrvNodeInfo::MetasrvNodeInfo(const MetasrvNodeInfo& from)
|
||||
decltype(_impl_.version_){}
|
||||
, decltype(_impl_.git_commit_){}
|
||||
, decltype(_impl_.peer_){nullptr}
|
||||
, decltype(_impl_.info_){nullptr}
|
||||
, decltype(_impl_.start_time_ms_){}
|
||||
, decltype(_impl_.memory_bytes_){}
|
||||
, decltype(_impl_.cpus_){}
|
||||
@@ -698,6 +715,9 @@ MetasrvNodeInfo::MetasrvNodeInfo(const MetasrvNodeInfo& from)
|
||||
if (from._internal_has_peer()) {
|
||||
_this->_impl_.peer_ = new ::greptime::v1::meta::Peer(*from._impl_.peer_);
|
||||
}
|
||||
if (from._internal_has_info()) {
|
||||
_this->_impl_.info_ = new ::greptime::v1::meta::NodeInfo(*from._impl_.info_);
|
||||
}
|
||||
::memcpy(&_impl_.start_time_ms_, &from._impl_.start_time_ms_,
|
||||
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.cpus_) -
|
||||
reinterpret_cast<char*>(&_impl_.start_time_ms_)) + sizeof(_impl_.cpus_));
|
||||
@@ -712,6 +732,7 @@ inline void MetasrvNodeInfo::SharedCtor(
|
||||
decltype(_impl_.version_){}
|
||||
, decltype(_impl_.git_commit_){}
|
||||
, decltype(_impl_.peer_){nullptr}
|
||||
, decltype(_impl_.info_){nullptr}
|
||||
, decltype(_impl_.start_time_ms_){uint64_t{0u}}
|
||||
, decltype(_impl_.memory_bytes_){uint64_t{0u}}
|
||||
, decltype(_impl_.cpus_){0u}
|
||||
@@ -741,6 +762,7 @@ inline void MetasrvNodeInfo::SharedDtor() {
|
||||
_impl_.version_.Destroy();
|
||||
_impl_.git_commit_.Destroy();
|
||||
if (this != internal_default_instance()) delete _impl_.peer_;
|
||||
if (this != internal_default_instance()) delete _impl_.info_;
|
||||
}
|
||||
|
||||
void MetasrvNodeInfo::SetCachedSize(int size) const {
|
||||
@@ -759,6 +781,10 @@ void MetasrvNodeInfo::Clear() {
|
||||
delete _impl_.peer_;
|
||||
}
|
||||
_impl_.peer_ = nullptr;
|
||||
if (GetArenaForAllocation() == nullptr && _impl_.info_ != nullptr) {
|
||||
delete _impl_.info_;
|
||||
}
|
||||
_impl_.info_ = nullptr;
|
||||
::memset(&_impl_.start_time_ms_, 0, static_cast<size_t>(
|
||||
reinterpret_cast<char*>(&_impl_.cpus_) -
|
||||
reinterpret_cast<char*>(&_impl_.start_time_ms_)) + sizeof(_impl_.cpus_));
|
||||
@@ -779,7 +805,7 @@ const char* MetasrvNodeInfo::_InternalParse(const char* ptr, ::_pbi::ParseContex
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// string version = 2;
|
||||
// string version = 2 [deprecated = true];
|
||||
case 2:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
||||
auto str = _internal_mutable_version();
|
||||
@@ -789,7 +815,7 @@ const char* MetasrvNodeInfo::_InternalParse(const char* ptr, ::_pbi::ParseContex
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// string git_commit = 3;
|
||||
// string git_commit = 3 [deprecated = true];
|
||||
case 3:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
||||
auto str = _internal_mutable_git_commit();
|
||||
@@ -799,7 +825,7 @@ const char* MetasrvNodeInfo::_InternalParse(const char* ptr, ::_pbi::ParseContex
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// uint64 start_time_ms = 4;
|
||||
// uint64 start_time_ms = 4 [deprecated = true];
|
||||
case 4:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
|
||||
_impl_.start_time_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
@@ -807,7 +833,7 @@ const char* MetasrvNodeInfo::_InternalParse(const char* ptr, ::_pbi::ParseContex
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// uint32 cpus = 5;
|
||||
// uint32 cpus = 5 [deprecated = true];
|
||||
case 5:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
|
||||
_impl_.cpus_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||||
@@ -815,7 +841,7 @@ const char* MetasrvNodeInfo::_InternalParse(const char* ptr, ::_pbi::ParseContex
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// uint64 memory_bytes = 6;
|
||||
// uint64 memory_bytes = 6 [deprecated = true];
|
||||
case 6:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
|
||||
_impl_.memory_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
@@ -823,6 +849,14 @@ const char* MetasrvNodeInfo::_InternalParse(const char* ptr, ::_pbi::ParseContex
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// .greptime.v1.meta.NodeInfo info = 7;
|
||||
case 7:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
|
||||
ptr = ctx->ParseMessage(_internal_mutable_info(), ptr);
|
||||
CHK_(ptr);
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
default:
|
||||
goto handle_unusual;
|
||||
} // switch
|
||||
@@ -859,7 +893,7 @@ uint8_t* MetasrvNodeInfo::_InternalSerialize(
|
||||
_Internal::peer(this).GetCachedSize(), target, stream);
|
||||
}
|
||||
|
||||
// string version = 2;
|
||||
// string version = 2 [deprecated = true];
|
||||
if (!this->_internal_version().empty()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->_internal_version().data(), static_cast<int>(this->_internal_version().length()),
|
||||
@@ -869,7 +903,7 @@ uint8_t* MetasrvNodeInfo::_InternalSerialize(
|
||||
2, this->_internal_version(), target);
|
||||
}
|
||||
|
||||
// string git_commit = 3;
|
||||
// string git_commit = 3 [deprecated = true];
|
||||
if (!this->_internal_git_commit().empty()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->_internal_git_commit().data(), static_cast<int>(this->_internal_git_commit().length()),
|
||||
@@ -879,24 +913,31 @@ uint8_t* MetasrvNodeInfo::_InternalSerialize(
|
||||
3, this->_internal_git_commit(), target);
|
||||
}
|
||||
|
||||
// uint64 start_time_ms = 4;
|
||||
// uint64 start_time_ms = 4 [deprecated = true];
|
||||
if (this->_internal_start_time_ms() != 0) {
|
||||
target = stream->EnsureSpace(target);
|
||||
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_start_time_ms(), target);
|
||||
}
|
||||
|
||||
// uint32 cpus = 5;
|
||||
// uint32 cpus = 5 [deprecated = true];
|
||||
if (this->_internal_cpus() != 0) {
|
||||
target = stream->EnsureSpace(target);
|
||||
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_cpus(), target);
|
||||
}
|
||||
|
||||
// uint64 memory_bytes = 6;
|
||||
// uint64 memory_bytes = 6 [deprecated = true];
|
||||
if (this->_internal_memory_bytes() != 0) {
|
||||
target = stream->EnsureSpace(target);
|
||||
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_memory_bytes(), target);
|
||||
}
|
||||
|
||||
// .greptime.v1.meta.NodeInfo info = 7;
|
||||
if (this->_internal_has_info()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||
InternalWriteMessage(7, _Internal::info(this),
|
||||
_Internal::info(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);
|
||||
@@ -913,14 +954,14 @@ size_t MetasrvNodeInfo::ByteSizeLong() const {
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// string version = 2;
|
||||
// string version = 2 [deprecated = true];
|
||||
if (!this->_internal_version().empty()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->_internal_version());
|
||||
}
|
||||
|
||||
// string git_commit = 3;
|
||||
// string git_commit = 3 [deprecated = true];
|
||||
if (!this->_internal_git_commit().empty()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
@@ -934,17 +975,24 @@ size_t MetasrvNodeInfo::ByteSizeLong() const {
|
||||
*_impl_.peer_);
|
||||
}
|
||||
|
||||
// uint64 start_time_ms = 4;
|
||||
// .greptime.v1.meta.NodeInfo info = 7;
|
||||
if (this->_internal_has_info()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
||||
*_impl_.info_);
|
||||
}
|
||||
|
||||
// uint64 start_time_ms = 4 [deprecated = true];
|
||||
if (this->_internal_start_time_ms() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_start_time_ms());
|
||||
}
|
||||
|
||||
// uint64 memory_bytes = 6;
|
||||
// uint64 memory_bytes = 6 [deprecated = true];
|
||||
if (this->_internal_memory_bytes() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_memory_bytes());
|
||||
}
|
||||
|
||||
// uint32 cpus = 5;
|
||||
// uint32 cpus = 5 [deprecated = true];
|
||||
if (this->_internal_cpus() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cpus());
|
||||
}
|
||||
@@ -977,6 +1025,10 @@ void MetasrvNodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const
|
||||
_this->_internal_mutable_peer()->::greptime::v1::meta::Peer::MergeFrom(
|
||||
from._internal_peer());
|
||||
}
|
||||
if (from._internal_has_info()) {
|
||||
_this->_internal_mutable_info()->::greptime::v1::meta::NodeInfo::MergeFrom(
|
||||
from._internal_info());
|
||||
}
|
||||
if (from._internal_start_time_ms() != 0) {
|
||||
_this->_internal_set_start_time_ms(from._internal_start_time_ms());
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <google/protobuf/extension_set.h> // IWYU pragma: export
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
#include "greptime/v1/meta/common.pb.h"
|
||||
#include "greptime/v1/meta/heartbeat.pb.h"
|
||||
#include "greptime/v1/meta/store.pb.h"
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
@@ -550,32 +551,33 @@ class MetasrvNodeInfo final :
|
||||
kVersionFieldNumber = 2,
|
||||
kGitCommitFieldNumber = 3,
|
||||
kPeerFieldNumber = 1,
|
||||
kInfoFieldNumber = 7,
|
||||
kStartTimeMsFieldNumber = 4,
|
||||
kMemoryBytesFieldNumber = 6,
|
||||
kCpusFieldNumber = 5,
|
||||
};
|
||||
// string version = 2;
|
||||
void clear_version();
|
||||
const std::string& version() const;
|
||||
// string version = 2 [deprecated = true];
|
||||
PROTOBUF_DEPRECATED void clear_version();
|
||||
PROTOBUF_DEPRECATED const std::string& version() const;
|
||||
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
void set_version(ArgT0&& arg0, ArgT... args);
|
||||
std::string* mutable_version();
|
||||
PROTOBUF_NODISCARD std::string* release_version();
|
||||
void set_allocated_version(std::string* version);
|
||||
PROTOBUF_DEPRECATED void set_version(ArgT0&& arg0, ArgT... args);
|
||||
PROTOBUF_DEPRECATED std::string* mutable_version();
|
||||
PROTOBUF_NODISCARD PROTOBUF_DEPRECATED std::string* release_version();
|
||||
PROTOBUF_DEPRECATED void set_allocated_version(std::string* version);
|
||||
private:
|
||||
const std::string& _internal_version() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_version(const std::string& value);
|
||||
std::string* _internal_mutable_version();
|
||||
public:
|
||||
|
||||
// string git_commit = 3;
|
||||
void clear_git_commit();
|
||||
const std::string& git_commit() const;
|
||||
// string git_commit = 3 [deprecated = true];
|
||||
PROTOBUF_DEPRECATED void clear_git_commit();
|
||||
PROTOBUF_DEPRECATED const std::string& git_commit() const;
|
||||
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
void set_git_commit(ArgT0&& arg0, ArgT... args);
|
||||
std::string* mutable_git_commit();
|
||||
PROTOBUF_NODISCARD std::string* release_git_commit();
|
||||
void set_allocated_git_commit(std::string* git_commit);
|
||||
PROTOBUF_DEPRECATED void set_git_commit(ArgT0&& arg0, ArgT... args);
|
||||
PROTOBUF_DEPRECATED std::string* mutable_git_commit();
|
||||
PROTOBUF_NODISCARD PROTOBUF_DEPRECATED std::string* release_git_commit();
|
||||
PROTOBUF_DEPRECATED void set_allocated_git_commit(std::string* git_commit);
|
||||
private:
|
||||
const std::string& _internal_git_commit() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_git_commit(const std::string& value);
|
||||
@@ -600,28 +602,46 @@ class MetasrvNodeInfo final :
|
||||
::greptime::v1::meta::Peer* peer);
|
||||
::greptime::v1::meta::Peer* unsafe_arena_release_peer();
|
||||
|
||||
// uint64 start_time_ms = 4;
|
||||
void clear_start_time_ms();
|
||||
uint64_t start_time_ms() const;
|
||||
void set_start_time_ms(uint64_t value);
|
||||
// .greptime.v1.meta.NodeInfo info = 7;
|
||||
bool has_info() const;
|
||||
private:
|
||||
bool _internal_has_info() const;
|
||||
public:
|
||||
void clear_info();
|
||||
const ::greptime::v1::meta::NodeInfo& info() const;
|
||||
PROTOBUF_NODISCARD ::greptime::v1::meta::NodeInfo* release_info();
|
||||
::greptime::v1::meta::NodeInfo* mutable_info();
|
||||
void set_allocated_info(::greptime::v1::meta::NodeInfo* info);
|
||||
private:
|
||||
const ::greptime::v1::meta::NodeInfo& _internal_info() const;
|
||||
::greptime::v1::meta::NodeInfo* _internal_mutable_info();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_info(
|
||||
::greptime::v1::meta::NodeInfo* info);
|
||||
::greptime::v1::meta::NodeInfo* unsafe_arena_release_info();
|
||||
|
||||
// uint64 start_time_ms = 4 [deprecated = true];
|
||||
PROTOBUF_DEPRECATED void clear_start_time_ms();
|
||||
PROTOBUF_DEPRECATED uint64_t start_time_ms() const;
|
||||
PROTOBUF_DEPRECATED void set_start_time_ms(uint64_t value);
|
||||
private:
|
||||
uint64_t _internal_start_time_ms() const;
|
||||
void _internal_set_start_time_ms(uint64_t value);
|
||||
public:
|
||||
|
||||
// uint64 memory_bytes = 6;
|
||||
void clear_memory_bytes();
|
||||
uint64_t memory_bytes() const;
|
||||
void set_memory_bytes(uint64_t value);
|
||||
// uint64 memory_bytes = 6 [deprecated = true];
|
||||
PROTOBUF_DEPRECATED void clear_memory_bytes();
|
||||
PROTOBUF_DEPRECATED uint64_t memory_bytes() const;
|
||||
PROTOBUF_DEPRECATED void set_memory_bytes(uint64_t value);
|
||||
private:
|
||||
uint64_t _internal_memory_bytes() const;
|
||||
void _internal_set_memory_bytes(uint64_t value);
|
||||
public:
|
||||
|
||||
// uint32 cpus = 5;
|
||||
void clear_cpus();
|
||||
uint32_t cpus() const;
|
||||
void set_cpus(uint32_t value);
|
||||
// uint32 cpus = 5 [deprecated = true];
|
||||
PROTOBUF_DEPRECATED void clear_cpus();
|
||||
PROTOBUF_DEPRECATED uint32_t cpus() const;
|
||||
PROTOBUF_DEPRECATED void set_cpus(uint32_t value);
|
||||
private:
|
||||
uint32_t _internal_cpus() const;
|
||||
void _internal_set_cpus(uint32_t value);
|
||||
@@ -638,6 +658,7 @@ class MetasrvNodeInfo final :
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr git_commit_;
|
||||
::greptime::v1::meta::Peer* peer_;
|
||||
::greptime::v1::meta::NodeInfo* info_;
|
||||
uint64_t start_time_ms_;
|
||||
uint64_t memory_bytes_;
|
||||
uint32_t cpus_;
|
||||
@@ -1050,7 +1071,7 @@ inline void MetasrvNodeInfo::set_allocated_peer(::greptime::v1::meta::Peer* peer
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.MetasrvNodeInfo.peer)
|
||||
}
|
||||
|
||||
// string version = 2;
|
||||
// string version = 2 [deprecated = true];
|
||||
inline void MetasrvNodeInfo::clear_version() {
|
||||
_impl_.version_.ClearToEmpty();
|
||||
}
|
||||
@@ -1100,7 +1121,7 @@ inline void MetasrvNodeInfo::set_allocated_version(std::string* version) {
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.MetasrvNodeInfo.version)
|
||||
}
|
||||
|
||||
// string git_commit = 3;
|
||||
// string git_commit = 3 [deprecated = true];
|
||||
inline void MetasrvNodeInfo::clear_git_commit() {
|
||||
_impl_.git_commit_.ClearToEmpty();
|
||||
}
|
||||
@@ -1150,7 +1171,7 @@ inline void MetasrvNodeInfo::set_allocated_git_commit(std::string* git_commit) {
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.MetasrvNodeInfo.git_commit)
|
||||
}
|
||||
|
||||
// uint64 start_time_ms = 4;
|
||||
// uint64 start_time_ms = 4 [deprecated = true];
|
||||
inline void MetasrvNodeInfo::clear_start_time_ms() {
|
||||
_impl_.start_time_ms_ = uint64_t{0u};
|
||||
}
|
||||
@@ -1170,7 +1191,7 @@ inline void MetasrvNodeInfo::set_start_time_ms(uint64_t value) {
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.meta.MetasrvNodeInfo.start_time_ms)
|
||||
}
|
||||
|
||||
// uint32 cpus = 5;
|
||||
// uint32 cpus = 5 [deprecated = true];
|
||||
inline void MetasrvNodeInfo::clear_cpus() {
|
||||
_impl_.cpus_ = 0u;
|
||||
}
|
||||
@@ -1190,7 +1211,7 @@ inline void MetasrvNodeInfo::set_cpus(uint32_t value) {
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.meta.MetasrvNodeInfo.cpus)
|
||||
}
|
||||
|
||||
// uint64 memory_bytes = 6;
|
||||
// uint64 memory_bytes = 6 [deprecated = true];
|
||||
inline void MetasrvNodeInfo::clear_memory_bytes() {
|
||||
_impl_.memory_bytes_ = uint64_t{0u};
|
||||
}
|
||||
@@ -1210,6 +1231,91 @@ inline void MetasrvNodeInfo::set_memory_bytes(uint64_t value) {
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.meta.MetasrvNodeInfo.memory_bytes)
|
||||
}
|
||||
|
||||
// .greptime.v1.meta.NodeInfo info = 7;
|
||||
inline bool MetasrvNodeInfo::_internal_has_info() const {
|
||||
return this != internal_default_instance() && _impl_.info_ != nullptr;
|
||||
}
|
||||
inline bool MetasrvNodeInfo::has_info() const {
|
||||
return _internal_has_info();
|
||||
}
|
||||
inline const ::greptime::v1::meta::NodeInfo& MetasrvNodeInfo::_internal_info() const {
|
||||
const ::greptime::v1::meta::NodeInfo* p = _impl_.info_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::meta::NodeInfo&>(
|
||||
::greptime::v1::meta::_NodeInfo_default_instance_);
|
||||
}
|
||||
inline const ::greptime::v1::meta::NodeInfo& MetasrvNodeInfo::info() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.meta.MetasrvNodeInfo.info)
|
||||
return _internal_info();
|
||||
}
|
||||
inline void MetasrvNodeInfo::unsafe_arena_set_allocated_info(
|
||||
::greptime::v1::meta::NodeInfo* info) {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.info_);
|
||||
}
|
||||
_impl_.info_ = info;
|
||||
if (info) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.meta.MetasrvNodeInfo.info)
|
||||
}
|
||||
inline ::greptime::v1::meta::NodeInfo* MetasrvNodeInfo::release_info() {
|
||||
|
||||
::greptime::v1::meta::NodeInfo* temp = _impl_.info_;
|
||||
_impl_.info_ = 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::NodeInfo* MetasrvNodeInfo::unsafe_arena_release_info() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.meta.MetasrvNodeInfo.info)
|
||||
|
||||
::greptime::v1::meta::NodeInfo* temp = _impl_.info_;
|
||||
_impl_.info_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline ::greptime::v1::meta::NodeInfo* MetasrvNodeInfo::_internal_mutable_info() {
|
||||
|
||||
if (_impl_.info_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<::greptime::v1::meta::NodeInfo>(GetArenaForAllocation());
|
||||
_impl_.info_ = p;
|
||||
}
|
||||
return _impl_.info_;
|
||||
}
|
||||
inline ::greptime::v1::meta::NodeInfo* MetasrvNodeInfo::mutable_info() {
|
||||
::greptime::v1::meta::NodeInfo* _msg = _internal_mutable_info();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.meta.MetasrvNodeInfo.info)
|
||||
return _msg;
|
||||
}
|
||||
inline void MetasrvNodeInfo::set_allocated_info(::greptime::v1::meta::NodeInfo* info) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.info_);
|
||||
}
|
||||
if (info) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
|
||||
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(info));
|
||||
if (message_arena != submessage_arena) {
|
||||
info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||
message_arena, info, submessage_arena);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
_impl_.info_ = info;
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.MetasrvNodeInfo.info)
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // __GNUC__
|
||||
|
||||
@@ -105,6 +105,7 @@ PROTOBUF_CONSTEXPR NodeInfo::NodeInfo(
|
||||
::_pbi::ConstantInitialized): _impl_{
|
||||
/*decltype(_impl_.version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.git_commit_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.hostname_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||
, /*decltype(_impl_.start_time_ms_)*/uint64_t{0u}
|
||||
, /*decltype(_impl_.memory_bytes_)*/uint64_t{0u}
|
||||
, /*decltype(_impl_.cpus_)*/0u
|
||||
@@ -375,6 +376,7 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets[] P
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.start_time_ms_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.cpus_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.memory_bytes_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.hostname_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
@@ -510,19 +512,19 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
|
||||
{ 38, -1, -1, sizeof(::greptime::v1::meta::FrontendWorkloads)},
|
||||
{ 45, -1, -1, sizeof(::greptime::v1::meta::FlownodeWorkloads)},
|
||||
{ 52, -1, -1, sizeof(::greptime::v1::meta::NodeInfo)},
|
||||
{ 63, 71, -1, sizeof(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse)},
|
||||
{ 73, -1, -1, sizeof(::greptime::v1::meta::RegionStat)},
|
||||
{ 86, -1, -1, sizeof(::greptime::v1::meta::TopicStat)},
|
||||
{ 96, 104, -1, sizeof(::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse)},
|
||||
{ 106, 114, -1, sizeof(::greptime::v1::meta::FlowStat_FlowLastExecTimeMapEntry_DoNotUse)},
|
||||
{ 116, -1, -1, sizeof(::greptime::v1::meta::FlowStat)},
|
||||
{ 124, -1, -1, sizeof(::greptime::v1::meta::HeartbeatResponse)},
|
||||
{ 133, 141, -1, sizeof(::greptime::v1::meta::GrantedRegion_ExtensionsEntry_DoNotUse)},
|
||||
{ 143, -1, -1, sizeof(::greptime::v1::meta::GrantedRegion)},
|
||||
{ 152, -1, -1, sizeof(::greptime::v1::meta::RegionLease)},
|
||||
{ 162, -1, -1, sizeof(::greptime::v1::meta::AskLeaderRequest)},
|
||||
{ 169, -1, -1, sizeof(::greptime::v1::meta::AskLeaderResponse)},
|
||||
{ 177, -1, -1, sizeof(::greptime::v1::meta::MailboxMessage)},
|
||||
{ 64, 72, -1, sizeof(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse)},
|
||||
{ 74, -1, -1, sizeof(::greptime::v1::meta::RegionStat)},
|
||||
{ 87, -1, -1, sizeof(::greptime::v1::meta::TopicStat)},
|
||||
{ 97, 105, -1, sizeof(::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse)},
|
||||
{ 107, 115, -1, sizeof(::greptime::v1::meta::FlowStat_FlowLastExecTimeMapEntry_DoNotUse)},
|
||||
{ 117, -1, -1, sizeof(::greptime::v1::meta::FlowStat)},
|
||||
{ 125, -1, -1, sizeof(::greptime::v1::meta::HeartbeatResponse)},
|
||||
{ 134, 142, -1, sizeof(::greptime::v1::meta::GrantedRegion_ExtensionsEntry_DoNotUse)},
|
||||
{ 144, -1, -1, sizeof(::greptime::v1::meta::GrantedRegion)},
|
||||
{ 153, -1, -1, sizeof(::greptime::v1::meta::RegionLease)},
|
||||
{ 163, -1, -1, sizeof(::greptime::v1::meta::AskLeaderRequest)},
|
||||
{ 170, -1, -1, sizeof(::greptime::v1::meta::AskLeaderResponse)},
|
||||
{ 178, -1, -1, sizeof(::greptime::v1::meta::MailboxMessage)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
@@ -572,62 +574,62 @@ const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto[]
|
||||
"8\001B\020\n\016node_workloads\"\"\n\021DatanodeWorkload"
|
||||
"s\022\r\n\005types\030\001 \003(\005\"\"\n\021FrontendWorkloads\022\r\n"
|
||||
"\005types\030\001 \003(\005\"\"\n\021FlownodeWorkloads\022\r\n\005typ"
|
||||
"es\030\001 \003(\005\"j\n\010NodeInfo\022\017\n\007version\030\001 \001(\t\022\022\n"
|
||||
"es\030\001 \003(\005\"|\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"
|
||||
"\022\014\n\004cpus\030\004 \001(\r\022\024\n\014memory_bytes\030\005 \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.gr"
|
||||
"eptime.v1.meta.RegionRole\022@\n\nextensions\030"
|
||||
"c \003(\0132,.greptime.v1.meta.RegionStat.Exte"
|
||||
"nsionsEntry\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 "
|
||||
"\001(\t\022\r\n\005value\030\002 \001(\014:\0028\001\"a\n\tTopicStat\022\022\n\nt"
|
||||
"opic_name\030\001 \001(\t\022\023\n\013record_size\030\002 \001(\004\022\022\n\n"
|
||||
"record_num\030\003 \001(\004\022\027\n\017latest_entry_id\030\004 \001("
|
||||
"\004\"\227\002\n\010FlowStat\022D\n\016flow_stat_size\030\001 \003(\0132,"
|
||||
".greptime.v1.meta.FlowStat.FlowStatSizeE"
|
||||
"ntry\022T\n\027flow_last_exec_time_map\030\002 \003(\01323."
|
||||
"greptime.v1.meta.FlowStat.FlowLastExecTi"
|
||||
"meMapEntry\0323\n\021FlowStatSizeEntry\022\013\n\003key\030\001"
|
||||
" \001(\r\022\r\n\005value\030\002 \001(\004:\0028\001\032:\n\030FlowLastExecT"
|
||||
"imeMapEntry\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001(\003:"
|
||||
"\0028\001\"\265\001\n\021HeartbeatResponse\0220\n\006header\030\001 \001("
|
||||
"\0132 .greptime.v1.meta.ResponseHeader\0229\n\017m"
|
||||
"ailbox_message\030\002 \001(\0132 .greptime.v1.meta."
|
||||
"MailboxMessage\0223\n\014region_lease\030\003 \001(\0132\035.g"
|
||||
"reptime.v1.meta.RegionLease\"\306\001\n\rGrantedR"
|
||||
"egion\022\021\n\tregion_id\030\001 \001(\004\022*\n\004role\030\002 \001(\0162\034"
|
||||
".greptime.v1.meta.RegionRole\022C\n\nextensio"
|
||||
"ns\030c \003(\0132/.greptime.v1.meta.GrantedRegio"
|
||||
"n.ExtensionsEntry\0321\n\017ExtensionsEntry\022\013\n\003"
|
||||
"key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001\"\222\001\n\013RegionL"
|
||||
"ease\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_seconds\030\003 \001(\004\022\034\n\024closeable"
|
||||
"_region_ids\030\004 \003(\004\"C\n\020AskLeaderRequest\022/\n"
|
||||
"\006header\030\001 \001(\0132\037.greptime.v1.meta.Request"
|
||||
"Header\"m\n\021AskLeaderResponse\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\020timest"
|
||||
"amp_millis\030\005 \001(\003\022\016\n\004json\030\006 \001(\tH\000B\t\n\007payl"
|
||||
"oad*=\n\nRegionRole\022\n\n\006Leader\020\000\022\014\n\010Followe"
|
||||
"r\020\001\022\025\n\021DowngradingLeader\020\0022\277\001\n\tHeartbeat"
|
||||
"\022Z\n\tHeartbeat\022\".greptime.v1.meta.Heartbe"
|
||||
"atRequest\032#.greptime.v1.meta.HeartbeatRe"
|
||||
"sponse\"\000(\0010\001\022V\n\tAskLeader\022\".greptime.v1."
|
||||
"meta.AskLeaderRequest\032#.greptime.v1.meta"
|
||||
".AskLeaderResponse\"\000B<Z:github.com/Grept"
|
||||
"imeTeam/greptime-proto/go/greptime/v1/me"
|
||||
"tab\006proto3"
|
||||
"\022\014\n\004cpus\030\004 \001(\r\022\024\n\014memory_bytes\030\005 \001(\004\022\020\n\010"
|
||||
"hostname\030\006 \001(\t\"\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\021"
|
||||
"approximate_bytes\030\004 \001(\003\022\016\n\006engine\030\006 \001(\t\022"
|
||||
"*\n\004role\030\007 \001(\0162\034.greptime.v1.meta.RegionR"
|
||||
"ole\022@\n\nextensions\030c \003(\0132,.greptime.v1.me"
|
||||
"ta.RegionStat.ExtensionsEntry\0321\n\017Extensi"
|
||||
"onsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001"
|
||||
"\"a\n\tTopicStat\022\022\n\ntopic_name\030\001 \001(\t\022\023\n\013rec"
|
||||
"ord_size\030\002 \001(\004\022\022\n\nrecord_num\030\003 \001(\004\022\027\n\017la"
|
||||
"test_entry_id\030\004 \001(\004\"\227\002\n\010FlowStat\022D\n\016flow"
|
||||
"_stat_size\030\001 \003(\0132,.greptime.v1.meta.Flow"
|
||||
"Stat.FlowStatSizeEntry\022T\n\027flow_last_exec"
|
||||
"_time_map\030\002 \003(\01323.greptime.v1.meta.FlowS"
|
||||
"tat.FlowLastExecTimeMapEntry\0323\n\021FlowStat"
|
||||
"SizeEntry\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001(\004:\0028"
|
||||
"\001\032:\n\030FlowLastExecTimeMapEntry\022\013\n\003key\030\001 \001"
|
||||
"(\r\022\r\n\005value\030\002 \001(\003:\0028\001\"\265\001\n\021HeartbeatRespo"
|
||||
"nse\0220\n\006header\030\001 \001(\0132 .greptime.v1.meta.R"
|
||||
"esponseHeader\0229\n\017mailbox_message\030\002 \001(\0132 "
|
||||
".greptime.v1.meta.MailboxMessage\0223\n\014regi"
|
||||
"on_lease\030\003 \001(\0132\035.greptime.v1.meta.Region"
|
||||
"Lease\"\306\001\n\rGrantedRegion\022\021\n\tregion_id\030\001 \001"
|
||||
"(\004\022*\n\004role\030\002 \001(\0162\034.greptime.v1.meta.Regi"
|
||||
"onRole\022C\n\nextensions\030c \003(\0132/.greptime.v1"
|
||||
".meta.GrantedRegion.ExtensionsEntry\0321\n\017E"
|
||||
"xtensionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001"
|
||||
"(\014:\0028\001\"\222\001\n\013RegionLease\0220\n\007regions\030\001 \003(\0132"
|
||||
"\037.greptime.v1.meta.GrantedRegion\022\034\n\024dura"
|
||||
"tion_since_epoch\030\002 \001(\004\022\025\n\rlease_seconds\030"
|
||||
"\003 \001(\004\022\034\n\024closeable_region_ids\030\004 \003(\004\"C\n\020A"
|
||||
"skLeaderRequest\022/\n\006header\030\001 \001(\0132\037.grepti"
|
||||
"me.v1.meta.RequestHeader\"m\n\021AskLeaderRes"
|
||||
"ponse\0220\n\006header\030\001 \001(\0132 .greptime.v1.meta"
|
||||
".ResponseHeader\022&\n\006leader\030\002 \001(\0132\026.grepti"
|
||||
"me.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\002"
|
||||
"to\030\004 \001(\t\022\030\n\020timestamp_millis\030\005 \001(\003\022\016\n\004js"
|
||||
"on\030\006 \001(\tH\000B\t\n\007payload*=\n\nRegionRole\022\n\n\006L"
|
||||
"eader\020\000\022\014\n\010Follower\020\001\022\025\n\021DowngradingLead"
|
||||
"er\020\0022\277\001\n\tHeartbeat\022Z\n\tHeartbeat\022\".grepti"
|
||||
"me.v1.meta.HeartbeatRequest\032#.greptime.v"
|
||||
"1.meta.HeartbeatResponse\"\000(\0010\001\022V\n\tAskLea"
|
||||
"der\022\".greptime.v1.meta.AskLeaderRequest\032"
|
||||
"#.greptime.v1.meta.AskLeaderResponse\"\000B<"
|
||||
"Z:github.com/GreptimeTeam/greptime-proto"
|
||||
"/go/greptime/v1/metab\006proto3"
|
||||
;
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_deps[1] = {
|
||||
&::descriptor_table_greptime_2fv1_2fmeta_2fcommon_2eproto,
|
||||
};
|
||||
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto = {
|
||||
false, false, 2890, descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto,
|
||||
false, false, 2908, descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto,
|
||||
"greptime/v1/meta/heartbeat.proto",
|
||||
&descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_deps, 1, 19,
|
||||
schemas, file_default_instances, TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets,
|
||||
@@ -2089,6 +2091,7 @@ NodeInfo::NodeInfo(const NodeInfo& from)
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.version_){}
|
||||
, decltype(_impl_.git_commit_){}
|
||||
, decltype(_impl_.hostname_){}
|
||||
, decltype(_impl_.start_time_ms_){}
|
||||
, decltype(_impl_.memory_bytes_){}
|
||||
, decltype(_impl_.cpus_){}
|
||||
@@ -2111,6 +2114,14 @@ NodeInfo::NodeInfo(const NodeInfo& from)
|
||||
_this->_impl_.git_commit_.Set(from._internal_git_commit(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
_impl_.hostname_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.hostname_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (!from._internal_hostname().empty()) {
|
||||
_this->_impl_.hostname_.Set(from._internal_hostname(),
|
||||
_this->GetArenaForAllocation());
|
||||
}
|
||||
::memcpy(&_impl_.start_time_ms_, &from._impl_.start_time_ms_,
|
||||
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.cpus_) -
|
||||
reinterpret_cast<char*>(&_impl_.start_time_ms_)) + sizeof(_impl_.cpus_));
|
||||
@@ -2124,6 +2135,7 @@ inline void NodeInfo::SharedCtor(
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.version_){}
|
||||
, decltype(_impl_.git_commit_){}
|
||||
, decltype(_impl_.hostname_){}
|
||||
, decltype(_impl_.start_time_ms_){uint64_t{0u}}
|
||||
, decltype(_impl_.memory_bytes_){uint64_t{0u}}
|
||||
, decltype(_impl_.cpus_){0u}
|
||||
@@ -2137,6 +2149,10 @@ inline void NodeInfo::SharedCtor(
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.git_commit_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.hostname_.InitDefault();
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
_impl_.hostname_.Set("", GetArenaForAllocation());
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
}
|
||||
|
||||
NodeInfo::~NodeInfo() {
|
||||
@@ -2152,6 +2168,7 @@ inline void NodeInfo::SharedDtor() {
|
||||
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||
_impl_.version_.Destroy();
|
||||
_impl_.git_commit_.Destroy();
|
||||
_impl_.hostname_.Destroy();
|
||||
}
|
||||
|
||||
void NodeInfo::SetCachedSize(int size) const {
|
||||
@@ -2166,6 +2183,7 @@ void NodeInfo::Clear() {
|
||||
|
||||
_impl_.version_.ClearToEmpty();
|
||||
_impl_.git_commit_.ClearToEmpty();
|
||||
_impl_.hostname_.ClearToEmpty();
|
||||
::memset(&_impl_.start_time_ms_, 0, static_cast<size_t>(
|
||||
reinterpret_cast<char*>(&_impl_.cpus_) -
|
||||
reinterpret_cast<char*>(&_impl_.start_time_ms_)) + sizeof(_impl_.cpus_));
|
||||
@@ -2222,6 +2240,16 @@ const char* NodeInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// string hostname = 6;
|
||||
case 6:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
|
||||
auto str = _internal_mutable_hostname();
|
||||
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||
CHK_(ptr);
|
||||
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.meta.NodeInfo.hostname"));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
default:
|
||||
goto handle_unusual;
|
||||
} // switch
|
||||
@@ -2289,6 +2317,16 @@ uint8_t* NodeInfo::_InternalSerialize(
|
||||
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_memory_bytes(), target);
|
||||
}
|
||||
|
||||
// string hostname = 6;
|
||||
if (!this->_internal_hostname().empty()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||
this->_internal_hostname().data(), static_cast<int>(this->_internal_hostname().length()),
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||
"greptime.v1.meta.NodeInfo.hostname");
|
||||
target = stream->WriteStringMaybeAliased(
|
||||
6, this->_internal_hostname(), target);
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -2319,6 +2357,13 @@ size_t NodeInfo::ByteSizeLong() const {
|
||||
this->_internal_git_commit());
|
||||
}
|
||||
|
||||
// string hostname = 6;
|
||||
if (!this->_internal_hostname().empty()) {
|
||||
total_size += 1 +
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||
this->_internal_hostname());
|
||||
}
|
||||
|
||||
// uint64 start_time_ms = 3;
|
||||
if (this->_internal_start_time_ms() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_start_time_ms());
|
||||
@@ -2358,6 +2403,9 @@ void NodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTO
|
||||
if (!from._internal_git_commit().empty()) {
|
||||
_this->_internal_set_git_commit(from._internal_git_commit());
|
||||
}
|
||||
if (!from._internal_hostname().empty()) {
|
||||
_this->_internal_set_hostname(from._internal_hostname());
|
||||
}
|
||||
if (from._internal_start_time_ms() != 0) {
|
||||
_this->_internal_set_start_time_ms(from._internal_start_time_ms());
|
||||
}
|
||||
@@ -2394,6 +2442,10 @@ void NodeInfo::InternalSwap(NodeInfo* other) {
|
||||
&_impl_.git_commit_, lhs_arena,
|
||||
&other->_impl_.git_commit_, rhs_arena
|
||||
);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||
&_impl_.hostname_, lhs_arena,
|
||||
&other->_impl_.hostname_, rhs_arena
|
||||
);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||||
PROTOBUF_FIELD_OFFSET(NodeInfo, _impl_.cpus_)
|
||||
+ sizeof(NodeInfo::_impl_.cpus_)
|
||||
|
||||
@@ -1226,6 +1226,7 @@ class NodeInfo final :
|
||||
enum : int {
|
||||
kVersionFieldNumber = 1,
|
||||
kGitCommitFieldNumber = 2,
|
||||
kHostnameFieldNumber = 6,
|
||||
kStartTimeMsFieldNumber = 3,
|
||||
kMemoryBytesFieldNumber = 5,
|
||||
kCpusFieldNumber = 4,
|
||||
@@ -1258,6 +1259,20 @@ class NodeInfo final :
|
||||
std::string* _internal_mutable_git_commit();
|
||||
public:
|
||||
|
||||
// string hostname = 6;
|
||||
void clear_hostname();
|
||||
const std::string& hostname() const;
|
||||
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
void set_hostname(ArgT0&& arg0, ArgT... args);
|
||||
std::string* mutable_hostname();
|
||||
PROTOBUF_NODISCARD std::string* release_hostname();
|
||||
void set_allocated_hostname(std::string* hostname);
|
||||
private:
|
||||
const std::string& _internal_hostname() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_hostname(const std::string& value);
|
||||
std::string* _internal_mutable_hostname();
|
||||
public:
|
||||
|
||||
// uint64 start_time_ms = 3;
|
||||
void clear_start_time_ms();
|
||||
uint64_t start_time_ms() const;
|
||||
@@ -1295,6 +1310,7 @@ class NodeInfo final :
|
||||
struct Impl_ {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr git_commit_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hostname_;
|
||||
uint64_t start_time_ms_;
|
||||
uint64_t memory_bytes_;
|
||||
uint32_t cpus_;
|
||||
@@ -4408,6 +4424,56 @@ inline void NodeInfo::set_memory_bytes(uint64_t value) {
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.meta.NodeInfo.memory_bytes)
|
||||
}
|
||||
|
||||
// string hostname = 6;
|
||||
inline void NodeInfo::clear_hostname() {
|
||||
_impl_.hostname_.ClearToEmpty();
|
||||
}
|
||||
inline const std::string& NodeInfo::hostname() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.meta.NodeInfo.hostname)
|
||||
return _internal_hostname();
|
||||
}
|
||||
template <typename ArgT0, typename... ArgT>
|
||||
inline PROTOBUF_ALWAYS_INLINE
|
||||
void NodeInfo::set_hostname(ArgT0&& arg0, ArgT... args) {
|
||||
|
||||
_impl_.hostname_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.meta.NodeInfo.hostname)
|
||||
}
|
||||
inline std::string* NodeInfo::mutable_hostname() {
|
||||
std::string* _s = _internal_mutable_hostname();
|
||||
// @@protoc_insertion_point(field_mutable:greptime.v1.meta.NodeInfo.hostname)
|
||||
return _s;
|
||||
}
|
||||
inline const std::string& NodeInfo::_internal_hostname() const {
|
||||
return _impl_.hostname_.Get();
|
||||
}
|
||||
inline void NodeInfo::_internal_set_hostname(const std::string& value) {
|
||||
|
||||
_impl_.hostname_.Set(value, GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* NodeInfo::_internal_mutable_hostname() {
|
||||
|
||||
return _impl_.hostname_.Mutable(GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* NodeInfo::release_hostname() {
|
||||
// @@protoc_insertion_point(field_release:greptime.v1.meta.NodeInfo.hostname)
|
||||
return _impl_.hostname_.Release();
|
||||
}
|
||||
inline void NodeInfo::set_allocated_hostname(std::string* hostname) {
|
||||
if (hostname != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
_impl_.hostname_.SetAllocated(hostname, GetArenaForAllocation());
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (_impl_.hostname_.IsDefault()) {
|
||||
_impl_.hostname_.Set("", GetArenaForAllocation());
|
||||
}
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.NodeInfo.hostname)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user