From b27d5d0f6b88b0416ee622623f25b99b81a742ac Mon Sep 17 00:00:00 2001 From: WenyXu Date: Wed, 4 Sep 2024 06:27:16 +0000 Subject: [PATCH] chore: simplify `Mutation` --- c++/greptime/v1/wal.pb.cc | 286 ++++----- c++/greptime/v1/wal.pb.h | 351 ++++------- go/greptime/v1/wal.pb.go | 146 ++--- java/src/main/java/greptime/v1/Wal.java | 749 ++++++++---------------- proto/greptime/v1/wal.proto | 18 +- 5 files changed, 526 insertions(+), 1024 deletions(-) diff --git a/c++/greptime/v1/wal.pb.cc b/c++/greptime/v1/wal.pb.cc index ab4bac45..ada312e4 100644 --- a/c++/greptime/v1/wal.pb.cc +++ b/c++/greptime/v1/wal.pb.cc @@ -22,25 +22,23 @@ namespace _pbi = _pb::internal; namespace greptime { namespace v1 { -PROTOBUF_CONSTEXPR ManifestActionList::ManifestActionList( +PROTOBUF_CONSTEXPR ManifestNotification::ManifestNotification( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.manifest_version_)*/uint64_t{0u} - , /*decltype(_impl_.data_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{}} {} -struct ManifestActionListDefaultTypeInternal { - PROTOBUF_CONSTEXPR ManifestActionListDefaultTypeInternal() + /*decltype(_impl_.version_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ManifestNotificationDefaultTypeInternal { + PROTOBUF_CONSTEXPR ManifestNotificationDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~ManifestActionListDefaultTypeInternal() {} + ~ManifestNotificationDefaultTypeInternal() {} union { - ManifestActionList _instance; + ManifestNotification _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ManifestActionListDefaultTypeInternal _ManifestActionList_default_instance_; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ManifestNotificationDefaultTypeInternal _ManifestNotification_default_instance_; PROTOBUF_CONSTEXPR Mutation::Mutation( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.rows_)*/nullptr - , /*decltype(_impl_.action_list_)*/nullptr + , /*decltype(_impl_.manifest_notification_)*/nullptr , /*decltype(_impl_.sequence_)*/uint64_t{0u} , /*decltype(_impl_.op_type_)*/0 , /*decltype(_impl_._cached_size_)*/{}} {} @@ -74,14 +72,12 @@ static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors const uint32_t TableStruct_greptime_2fv1_2fwal_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestActionList, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestNotification, _internal_metadata_), ~0u, // no _extensions_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestActionList, _impl_._oneof_case_[0]), + ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestActionList, _impl_.manifest_version_), - ::_pbi::kInvalidFieldOffsetTag, - PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestActionList, _impl_.data_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestNotification, _impl_.version_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::Mutation, _internal_metadata_), ~0u, // no _extensions_ @@ -91,7 +87,7 @@ const uint32_t TableStruct_greptime_2fv1_2fwal_2eproto::offsets[] PROTOBUF_SECTI PROTOBUF_FIELD_OFFSET(::greptime::v1::Mutation, _impl_.op_type_), PROTOBUF_FIELD_OFFSET(::greptime::v1::Mutation, _impl_.sequence_), PROTOBUF_FIELD_OFFSET(::greptime::v1::Mutation, _impl_.rows_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::Mutation, _impl_.action_list_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::Mutation, _impl_.manifest_notification_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::WalEntry, _internal_metadata_), ~0u, // no _extensions_ @@ -101,37 +97,36 @@ const uint32_t TableStruct_greptime_2fv1_2fwal_2eproto::offsets[] PROTOBUF_SECTI PROTOBUF_FIELD_OFFSET(::greptime::v1::WalEntry, _impl_.mutations_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::greptime::v1::ManifestActionList)}, - { 9, -1, -1, sizeof(::greptime::v1::Mutation)}, - { 19, -1, -1, sizeof(::greptime::v1::WalEntry)}, + { 0, -1, -1, sizeof(::greptime::v1::ManifestNotification)}, + { 7, -1, -1, sizeof(::greptime::v1::Mutation)}, + { 17, -1, -1, sizeof(::greptime::v1::WalEntry)}, }; static const ::_pb::Message* const file_default_instances[] = { - &::greptime::v1::_ManifestActionList_default_instance_._instance, + &::greptime::v1::_ManifestNotification_default_instance_._instance, &::greptime::v1::_Mutation_default_instance_._instance, &::greptime::v1::_WalEntry_default_instance_._instance, }; const char descriptor_table_protodef_greptime_2fv1_2fwal_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\025greptime/v1/wal.proto\022\013greptime.v1\032\025gr" - "eptime/v1/row.proto\"F\n\022ManifestActionLis" - "t\022\030\n\020manifest_version\030\001 \001(\004\022\016\n\004json\030\002 \001(" - "\tH\000B\006\n\004data\"\231\001\n\010Mutation\022$\n\007op_type\030\001 \001(" - "\0162\023.greptime.v1.OpType\022\020\n\010sequence\030\002 \001(\004" - "\022\037\n\004rows\030\003 \001(\0132\021.greptime.v1.Rows\0224\n\013act" - "ion_list\030\004 \001(\0132\037.greptime.v1.ManifestAct" - "ionList\"4\n\010WalEntry\022(\n\tmutations\030\001 \003(\0132\025" - ".greptime.v1.Mutation*+\n\006OpType\022\n\n\006DELET" - "E\020\000\022\007\n\003PUT\020\001\022\014\n\010MANIFEST\020\002B7Z5github.com" - "/GreptimeTeam/greptime-proto/go/greptime" - "/v1b\006proto3" + "eptime/v1/row.proto\"\'\n\024ManifestNotificat" + "ion\022\017\n\007version\030\001 \001(\004\"\245\001\n\010Mutation\022$\n\007op_" + "type\030\001 \001(\0162\023.greptime.v1.OpType\022\020\n\010seque" + "nce\030\002 \001(\004\022\037\n\004rows\030\003 \001(\0132\021.greptime.v1.Ro" + "ws\022@\n\025manifest_notification\030\004 \001(\0132!.grep" + "time.v1.ManifestNotification\"4\n\010WalEntry" + "\022(\n\tmutations\030\001 \003(\0132\025.greptime.v1.Mutati" + "on*)\n\006OpType\022\n\n\006DELETE\020\000\022\007\n\003PUT\020\001\022\n\n\006NOT" + "IFY\020\002B7Z5github.com/GreptimeTeam/greptim" + "e-proto/go/greptime/v1b\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fwal_2eproto_deps[1] = { &::descriptor_table_greptime_2fv1_2frow_2eproto, }; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fwal_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fwal_2eproto = { - false, false, 451, descriptor_table_protodef_greptime_2fv1_2fwal_2eproto, + false, false, 430, descriptor_table_protodef_greptime_2fv1_2fwal_2eproto, "greptime/v1/wal.proto", &descriptor_table_greptime_2fv1_2fwal_2eproto_once, descriptor_table_greptime_2fv1_2fwal_2eproto_deps, 1, 3, schemas, file_default_instances, TableStruct_greptime_2fv1_2fwal_2eproto::offsets, @@ -164,55 +159,40 @@ bool OpType_IsValid(int value) { // =================================================================== -class ManifestActionList::_Internal { +class ManifestNotification::_Internal { public: }; -ManifestActionList::ManifestActionList(::PROTOBUF_NAMESPACE_ID::Arena* arena, +ManifestNotification::ManifestNotification(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:greptime.v1.ManifestActionList) + // @@protoc_insertion_point(arena_constructor:greptime.v1.ManifestNotification) } -ManifestActionList::ManifestActionList(const ManifestActionList& from) +ManifestNotification::ManifestNotification(const ManifestNotification& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - ManifestActionList* const _this = this; (void)_this; + ManifestNotification* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.manifest_version_){} - , decltype(_impl_.data_){} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{}}; + decltype(_impl_.version_){} + , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.manifest_version_ = from._impl_.manifest_version_; - clear_has_data(); - switch (from.data_case()) { - case kJson: { - _this->_internal_set_json(from._internal_json()); - break; - } - case DATA_NOT_SET: { - break; - } - } - // @@protoc_insertion_point(copy_constructor:greptime.v1.ManifestActionList) + _this->_impl_.version_ = from._impl_.version_; + // @@protoc_insertion_point(copy_constructor:greptime.v1.ManifestNotification) } -inline void ManifestActionList::SharedCtor( +inline void ManifestNotification::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.manifest_version_){uint64_t{0u}} - , decltype(_impl_.data_){} + decltype(_impl_.version_){uint64_t{0u}} , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{} }; - clear_has_data(); } -ManifestActionList::~ManifestActionList() { - // @@protoc_insertion_point(destructor:greptime.v1.ManifestActionList) +ManifestNotification::~ManifestNotification() { + // @@protoc_insertion_point(destructor:greptime.v1.ManifestNotification) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; return; @@ -220,67 +200,38 @@ ManifestActionList::~ManifestActionList() { SharedDtor(); } -inline void ManifestActionList::SharedDtor() { +inline void ManifestNotification::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (has_data()) { - clear_data(); - } } -void ManifestActionList::SetCachedSize(int size) const { +void ManifestNotification::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void ManifestActionList::clear_data() { -// @@protoc_insertion_point(one_of_clear_start:greptime.v1.ManifestActionList) - switch (data_case()) { - case kJson: { - _impl_.data_.json_.Destroy(); - break; - } - case DATA_NOT_SET: { - break; - } - } - _impl_._oneof_case_[0] = DATA_NOT_SET; -} - - -void ManifestActionList::Clear() { -// @@protoc_insertion_point(message_clear_start:greptime.v1.ManifestActionList) +void ManifestNotification::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.ManifestNotification) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.manifest_version_ = uint64_t{0u}; - clear_data(); + _impl_.version_ = uint64_t{0u}; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* ManifestActionList::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +const char* ManifestNotification::_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) { - // uint64 manifest_version = 1; + // uint64 version = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.manifest_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _impl_.version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // string json = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_json(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.ManifestActionList.json")); - } else - goto handle_unusual; - continue; default: goto handle_unusual; } // switch @@ -304,114 +255,81 @@ const char* ManifestActionList::_InternalParse(const char* ptr, ::_pbi::ParseCon #undef CHK_ } -uint8_t* ManifestActionList::_InternalSerialize( +uint8_t* ManifestNotification::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.ManifestActionList) + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.ManifestNotification) uint32_t cached_has_bits = 0; (void) cached_has_bits; - // uint64 manifest_version = 1; - if (this->_internal_manifest_version() != 0) { + // uint64 version = 1; + if (this->_internal_version() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_manifest_version(), target); - } - - // string json = 2; - if (_internal_has_json()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_json().data(), static_cast(this->_internal_json().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "greptime.v1.ManifestActionList.json"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_json(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_version(), 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); } - // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.ManifestActionList) + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.ManifestNotification) return target; } -size_t ManifestActionList::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:greptime.v1.ManifestActionList) +size_t ManifestNotification::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.ManifestNotification) size_t total_size = 0; uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // uint64 manifest_version = 1; - if (this->_internal_manifest_version() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_manifest_version()); + // uint64 version = 1; + if (this->_internal_version() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_version()); } - switch (data_case()) { - // string json = 2; - case kJson: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_json()); - break; - } - case DATA_NOT_SET: { - break; - } - } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ManifestActionList::_class_data_ = { +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ManifestNotification::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ManifestActionList::MergeImpl + ManifestNotification::MergeImpl }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ManifestActionList::GetClassData() const { return &_class_data_; } +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ManifestNotification::GetClassData() const { return &_class_data_; } -void ManifestActionList::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.ManifestActionList) +void ManifestNotification::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.ManifestNotification) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_manifest_version() != 0) { - _this->_internal_set_manifest_version(from._internal_manifest_version()); - } - switch (from.data_case()) { - case kJson: { - _this->_internal_set_json(from._internal_json()); - break; - } - case DATA_NOT_SET: { - break; - } + if (from._internal_version() != 0) { + _this->_internal_set_version(from._internal_version()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } -void ManifestActionList::CopyFrom(const ManifestActionList& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.ManifestActionList) +void ManifestNotification::CopyFrom(const ManifestNotification& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.ManifestNotification) if (&from == this) return; Clear(); MergeFrom(from); } -bool ManifestActionList::IsInitialized() const { +bool ManifestNotification::IsInitialized() const { return true; } -void ManifestActionList::InternalSwap(ManifestActionList* other) { +void ManifestNotification::InternalSwap(ManifestNotification* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.manifest_version_, other->_impl_.manifest_version_); - swap(_impl_.data_, other->_impl_.data_); - swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_.version_, other->_impl_.version_); } -::PROTOBUF_NAMESPACE_ID::Metadata ManifestActionList::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata ManifestNotification::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fwal_2eproto_getter, &descriptor_table_greptime_2fv1_2fwal_2eproto_once, file_level_metadata_greptime_2fv1_2fwal_2eproto[0]); @@ -422,16 +340,16 @@ ::PROTOBUF_NAMESPACE_ID::Metadata ManifestActionList::GetMetadata() const { class Mutation::_Internal { public: static const ::greptime::v1::Rows& rows(const Mutation* msg); - static const ::greptime::v1::ManifestActionList& action_list(const Mutation* msg); + static const ::greptime::v1::ManifestNotification& manifest_notification(const Mutation* msg); }; const ::greptime::v1::Rows& Mutation::_Internal::rows(const Mutation* msg) { return *msg->_impl_.rows_; } -const ::greptime::v1::ManifestActionList& -Mutation::_Internal::action_list(const Mutation* msg) { - return *msg->_impl_.action_list_; +const ::greptime::v1::ManifestNotification& +Mutation::_Internal::manifest_notification(const Mutation* msg) { + return *msg->_impl_.manifest_notification_; } void Mutation::clear_rows() { if (GetArenaForAllocation() == nullptr && _impl_.rows_ != nullptr) { @@ -450,7 +368,7 @@ Mutation::Mutation(const Mutation& from) Mutation* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.rows_){nullptr} - , decltype(_impl_.action_list_){nullptr} + , decltype(_impl_.manifest_notification_){nullptr} , decltype(_impl_.sequence_){} , decltype(_impl_.op_type_){} , /*decltype(_impl_._cached_size_)*/{}}; @@ -459,8 +377,8 @@ Mutation::Mutation(const Mutation& from) if (from._internal_has_rows()) { _this->_impl_.rows_ = new ::greptime::v1::Rows(*from._impl_.rows_); } - if (from._internal_has_action_list()) { - _this->_impl_.action_list_ = new ::greptime::v1::ManifestActionList(*from._impl_.action_list_); + if (from._internal_has_manifest_notification()) { + _this->_impl_.manifest_notification_ = new ::greptime::v1::ManifestNotification(*from._impl_.manifest_notification_); } ::memcpy(&_impl_.sequence_, &from._impl_.sequence_, static_cast(reinterpret_cast(&_impl_.op_type_) - @@ -474,7 +392,7 @@ inline void Mutation::SharedCtor( (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.rows_){nullptr} - , decltype(_impl_.action_list_){nullptr} + , decltype(_impl_.manifest_notification_){nullptr} , decltype(_impl_.sequence_){uint64_t{0u}} , decltype(_impl_.op_type_){0} , /*decltype(_impl_._cached_size_)*/{} @@ -493,7 +411,7 @@ Mutation::~Mutation() { inline void Mutation::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); if (this != internal_default_instance()) delete _impl_.rows_; - if (this != internal_default_instance()) delete _impl_.action_list_; + if (this != internal_default_instance()) delete _impl_.manifest_notification_; } void Mutation::SetCachedSize(int size) const { @@ -510,10 +428,10 @@ void Mutation::Clear() { delete _impl_.rows_; } _impl_.rows_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.action_list_ != nullptr) { - delete _impl_.action_list_; + if (GetArenaForAllocation() == nullptr && _impl_.manifest_notification_ != nullptr) { + delete _impl_.manifest_notification_; } - _impl_.action_list_ = nullptr; + _impl_.manifest_notification_ = nullptr; ::memset(&_impl_.sequence_, 0, static_cast( reinterpret_cast(&_impl_.op_type_) - reinterpret_cast(&_impl_.sequence_)) + sizeof(_impl_.op_type_)); @@ -551,10 +469,10 @@ const char* Mutation::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) } else goto handle_unusual; continue; - // .greptime.v1.ManifestActionList action_list = 4; + // .greptime.v1.ManifestNotification manifest_notification = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_action_list(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_manifest_notification(), ptr); CHK_(ptr); } else goto handle_unusual; @@ -608,11 +526,11 @@ uint8_t* Mutation::_InternalSerialize( _Internal::rows(this).GetCachedSize(), target, stream); } - // .greptime.v1.ManifestActionList action_list = 4; - if (this->_internal_has_action_list()) { + // .greptime.v1.ManifestNotification manifest_notification = 4; + if (this->_internal_has_manifest_notification()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(4, _Internal::action_list(this), - _Internal::action_list(this).GetCachedSize(), target, stream); + InternalWriteMessage(4, _Internal::manifest_notification(this), + _Internal::manifest_notification(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -638,11 +556,11 @@ size_t Mutation::ByteSizeLong() const { *_impl_.rows_); } - // .greptime.v1.ManifestActionList action_list = 4; - if (this->_internal_has_action_list()) { + // .greptime.v1.ManifestNotification manifest_notification = 4; + if (this->_internal_has_manifest_notification()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.action_list_); + *_impl_.manifest_notification_); } // uint64 sequence = 2; @@ -678,9 +596,9 @@ void Mutation::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTO _this->_internal_mutable_rows()->::greptime::v1::Rows::MergeFrom( from._internal_rows()); } - if (from._internal_has_action_list()) { - _this->_internal_mutable_action_list()->::greptime::v1::ManifestActionList::MergeFrom( - from._internal_action_list()); + if (from._internal_has_manifest_notification()) { + _this->_internal_mutable_manifest_notification()->::greptime::v1::ManifestNotification::MergeFrom( + from._internal_manifest_notification()); } if (from._internal_sequence() != 0) { _this->_internal_set_sequence(from._internal_sequence()); @@ -908,9 +826,9 @@ ::PROTOBUF_NAMESPACE_ID::Metadata WalEntry::GetMetadata() const { } // namespace v1 } // namespace greptime PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::greptime::v1::ManifestActionList* -Arena::CreateMaybeMessage< ::greptime::v1::ManifestActionList >(Arena* arena) { - return Arena::CreateMessageInternal< ::greptime::v1::ManifestActionList >(arena); +template<> PROTOBUF_NOINLINE ::greptime::v1::ManifestNotification* +Arena::CreateMaybeMessage< ::greptime::v1::ManifestNotification >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::ManifestNotification >(arena); } template<> PROTOBUF_NOINLINE ::greptime::v1::Mutation* Arena::CreateMaybeMessage< ::greptime::v1::Mutation >(Arena* arena) { diff --git a/c++/greptime/v1/wal.pb.h b/c++/greptime/v1/wal.pb.h index e9a5a046..f1592c8a 100644 --- a/c++/greptime/v1/wal.pb.h +++ b/c++/greptime/v1/wal.pb.h @@ -48,9 +48,9 @@ struct TableStruct_greptime_2fv1_2fwal_2eproto { extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_greptime_2fv1_2fwal_2eproto; namespace greptime { namespace v1 { -class ManifestActionList; -struct ManifestActionListDefaultTypeInternal; -extern ManifestActionListDefaultTypeInternal _ManifestActionList_default_instance_; +class ManifestNotification; +struct ManifestNotificationDefaultTypeInternal; +extern ManifestNotificationDefaultTypeInternal _ManifestNotification_default_instance_; class Mutation; struct MutationDefaultTypeInternal; extern MutationDefaultTypeInternal _Mutation_default_instance_; @@ -60,7 +60,7 @@ extern WalEntryDefaultTypeInternal _WalEntry_default_instance_; } // namespace v1 } // namespace greptime PROTOBUF_NAMESPACE_OPEN -template<> ::greptime::v1::ManifestActionList* Arena::CreateMaybeMessage<::greptime::v1::ManifestActionList>(Arena*); +template<> ::greptime::v1::ManifestNotification* Arena::CreateMaybeMessage<::greptime::v1::ManifestNotification>(Arena*); template<> ::greptime::v1::Mutation* Arena::CreateMaybeMessage<::greptime::v1::Mutation>(Arena*); template<> ::greptime::v1::WalEntry* Arena::CreateMaybeMessage<::greptime::v1::WalEntry>(Arena*); PROTOBUF_NAMESPACE_CLOSE @@ -70,13 +70,13 @@ namespace v1 { enum OpType : int { DELETE = 0, PUT = 1, - MANIFEST = 2, + NOTIFY = 2, OpType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), OpType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() }; bool OpType_IsValid(int value); constexpr OpType OpType_MIN = DELETE; -constexpr OpType OpType_MAX = MANIFEST; +constexpr OpType OpType_MAX = NOTIFY; constexpr int OpType_ARRAYSIZE = OpType_MAX + 1; const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* OpType_descriptor(); @@ -95,24 +95,24 @@ inline bool OpType_Parse( } // =================================================================== -class ManifestActionList final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.ManifestActionList) */ { +class ManifestNotification final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.ManifestNotification) */ { public: - inline ManifestActionList() : ManifestActionList(nullptr) {} - ~ManifestActionList() override; - explicit PROTOBUF_CONSTEXPR ManifestActionList(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline ManifestNotification() : ManifestNotification(nullptr) {} + ~ManifestNotification() override; + explicit PROTOBUF_CONSTEXPR ManifestNotification(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - ManifestActionList(const ManifestActionList& from); - ManifestActionList(ManifestActionList&& from) noexcept - : ManifestActionList() { + ManifestNotification(const ManifestNotification& from); + ManifestNotification(ManifestNotification&& from) noexcept + : ManifestNotification() { *this = ::std::move(from); } - inline ManifestActionList& operator=(const ManifestActionList& from) { + inline ManifestNotification& operator=(const ManifestNotification& from) { CopyFrom(from); return *this; } - inline ManifestActionList& operator=(ManifestActionList&& from) noexcept { + inline ManifestNotification& operator=(ManifestNotification&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -135,25 +135,20 @@ class ManifestActionList final : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const ManifestActionList& default_instance() { + static const ManifestNotification& default_instance() { return *internal_default_instance(); } - enum DataCase { - kJson = 2, - DATA_NOT_SET = 0, - }; - - static inline const ManifestActionList* internal_default_instance() { - return reinterpret_cast( - &_ManifestActionList_default_instance_); + static inline const ManifestNotification* internal_default_instance() { + return reinterpret_cast( + &_ManifestNotification_default_instance_); } static constexpr int kIndexInFileMessages = 0; - friend void swap(ManifestActionList& a, ManifestActionList& b) { + friend void swap(ManifestNotification& a, ManifestNotification& b) { a.Swap(&b); } - inline void Swap(ManifestActionList* other) { + inline void Swap(ManifestNotification* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -166,7 +161,7 @@ class ManifestActionList final : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ManifestActionList* other) { + void UnsafeArenaSwap(ManifestNotification* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -174,14 +169,14 @@ class ManifestActionList final : // implements Message ---------------------------------------------- - ManifestActionList* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + ManifestNotification* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ManifestActionList& from); + void CopyFrom(const ManifestNotification& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ManifestActionList& from) { - ManifestActionList::MergeImpl(*this, from); + void MergeFrom( const ManifestNotification& from) { + ManifestNotification::MergeImpl(*this, from); } private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); @@ -199,15 +194,15 @@ class ManifestActionList final : void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(ManifestActionList* other); + void InternalSwap(ManifestNotification* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "greptime.v1.ManifestActionList"; + return "greptime.v1.ManifestNotification"; } protected: - explicit ManifestActionList(::PROTOBUF_NAMESPACE_ID::Arena* arena, + explicit ManifestNotification(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: @@ -221,59 +216,27 @@ class ManifestActionList final : // accessors ------------------------------------------------------- enum : int { - kManifestVersionFieldNumber = 1, - kJsonFieldNumber = 2, + kVersionFieldNumber = 1, }; - // uint64 manifest_version = 1; - void clear_manifest_version(); - uint64_t manifest_version() const; - void set_manifest_version(uint64_t value); + // uint64 version = 1; + void clear_version(); + uint64_t version() const; + void set_version(uint64_t value); private: - uint64_t _internal_manifest_version() const; - void _internal_set_manifest_version(uint64_t value); + uint64_t _internal_version() const; + void _internal_set_version(uint64_t value); public: - // string json = 2; - bool has_json() const; - private: - bool _internal_has_json() const; - public: - void clear_json(); - const std::string& json() const; - template - void set_json(ArgT0&& arg0, ArgT... args); - std::string* mutable_json(); - PROTOBUF_NODISCARD std::string* release_json(); - void set_allocated_json(std::string* json); - private: - const std::string& _internal_json() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_json(const std::string& value); - std::string* _internal_mutable_json(); - public: - - void clear_data(); - DataCase data_case() const; - // @@protoc_insertion_point(class_scope:greptime.v1.ManifestActionList) + // @@protoc_insertion_point(class_scope:greptime.v1.ManifestNotification) private: class _Internal; - void set_has_json(); - - inline bool has_data() const; - inline void clear_has_data(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - uint64_t manifest_version_; - union DataUnion { - constexpr DataUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_; - } data_; + uint64_t version_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t _oneof_case_[1]; - }; union { Impl_ _impl_; }; friend struct ::TableStruct_greptime_2fv1_2fwal_2eproto; @@ -402,7 +365,7 @@ class Mutation final : enum : int { kRowsFieldNumber = 3, - kActionListFieldNumber = 4, + kManifestNotificationFieldNumber = 4, kSequenceFieldNumber = 2, kOpTypeFieldNumber = 1, }; @@ -424,23 +387,23 @@ class Mutation final : ::greptime::v1::Rows* rows); ::greptime::v1::Rows* unsafe_arena_release_rows(); - // .greptime.v1.ManifestActionList action_list = 4; - bool has_action_list() const; + // .greptime.v1.ManifestNotification manifest_notification = 4; + bool has_manifest_notification() const; private: - bool _internal_has_action_list() const; + bool _internal_has_manifest_notification() const; public: - void clear_action_list(); - const ::greptime::v1::ManifestActionList& action_list() const; - PROTOBUF_NODISCARD ::greptime::v1::ManifestActionList* release_action_list(); - ::greptime::v1::ManifestActionList* mutable_action_list(); - void set_allocated_action_list(::greptime::v1::ManifestActionList* action_list); + void clear_manifest_notification(); + const ::greptime::v1::ManifestNotification& manifest_notification() const; + PROTOBUF_NODISCARD ::greptime::v1::ManifestNotification* release_manifest_notification(); + ::greptime::v1::ManifestNotification* mutable_manifest_notification(); + void set_allocated_manifest_notification(::greptime::v1::ManifestNotification* manifest_notification); private: - const ::greptime::v1::ManifestActionList& _internal_action_list() const; - ::greptime::v1::ManifestActionList* _internal_mutable_action_list(); + const ::greptime::v1::ManifestNotification& _internal_manifest_notification() const; + ::greptime::v1::ManifestNotification* _internal_mutable_manifest_notification(); public: - void unsafe_arena_set_allocated_action_list( - ::greptime::v1::ManifestActionList* action_list); - ::greptime::v1::ManifestActionList* unsafe_arena_release_action_list(); + void unsafe_arena_set_allocated_manifest_notification( + ::greptime::v1::ManifestNotification* manifest_notification); + ::greptime::v1::ManifestNotification* unsafe_arena_release_manifest_notification(); // uint64 sequence = 2; void clear_sequence(); @@ -469,7 +432,7 @@ class Mutation final : typedef void DestructorSkippable_; struct Impl_ { ::greptime::v1::Rows* rows_; - ::greptime::v1::ManifestActionList* action_list_; + ::greptime::v1::ManifestNotification* manifest_notification_; uint64_t sequence_; int op_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -643,114 +606,28 @@ class WalEntry final : #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ -// ManifestActionList +// ManifestNotification -// uint64 manifest_version = 1; -inline void ManifestActionList::clear_manifest_version() { - _impl_.manifest_version_ = uint64_t{0u}; +// uint64 version = 1; +inline void ManifestNotification::clear_version() { + _impl_.version_ = uint64_t{0u}; } -inline uint64_t ManifestActionList::_internal_manifest_version() const { - return _impl_.manifest_version_; +inline uint64_t ManifestNotification::_internal_version() const { + return _impl_.version_; } -inline uint64_t ManifestActionList::manifest_version() const { - // @@protoc_insertion_point(field_get:greptime.v1.ManifestActionList.manifest_version) - return _internal_manifest_version(); +inline uint64_t ManifestNotification::version() const { + // @@protoc_insertion_point(field_get:greptime.v1.ManifestNotification.version) + return _internal_version(); } -inline void ManifestActionList::_internal_set_manifest_version(uint64_t value) { +inline void ManifestNotification::_internal_set_version(uint64_t value) { - _impl_.manifest_version_ = value; -} -inline void ManifestActionList::set_manifest_version(uint64_t value) { - _internal_set_manifest_version(value); - // @@protoc_insertion_point(field_set:greptime.v1.ManifestActionList.manifest_version) -} - -// string json = 2; -inline bool ManifestActionList::_internal_has_json() const { - return data_case() == kJson; -} -inline bool ManifestActionList::has_json() const { - return _internal_has_json(); -} -inline void ManifestActionList::set_has_json() { - _impl_._oneof_case_[0] = kJson; -} -inline void ManifestActionList::clear_json() { - if (_internal_has_json()) { - _impl_.data_.json_.Destroy(); - clear_has_data(); - } -} -inline const std::string& ManifestActionList::json() const { - // @@protoc_insertion_point(field_get:greptime.v1.ManifestActionList.json) - return _internal_json(); + _impl_.version_ = value; } -template -inline void ManifestActionList::set_json(ArgT0&& arg0, ArgT... args) { - if (!_internal_has_json()) { - clear_data(); - set_has_json(); - _impl_.data_.json_.InitDefault(); - } - _impl_.data_.json_.Set( static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:greptime.v1.ManifestActionList.json) -} -inline std::string* ManifestActionList::mutable_json() { - std::string* _s = _internal_mutable_json(); - // @@protoc_insertion_point(field_mutable:greptime.v1.ManifestActionList.json) - return _s; -} -inline const std::string& ManifestActionList::_internal_json() const { - if (_internal_has_json()) { - return _impl_.data_.json_.Get(); - } - return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); -} -inline void ManifestActionList::_internal_set_json(const std::string& value) { - if (!_internal_has_json()) { - clear_data(); - set_has_json(); - _impl_.data_.json_.InitDefault(); - } - _impl_.data_.json_.Set(value, GetArenaForAllocation()); -} -inline std::string* ManifestActionList::_internal_mutable_json() { - if (!_internal_has_json()) { - clear_data(); - set_has_json(); - _impl_.data_.json_.InitDefault(); - } - return _impl_.data_.json_.Mutable( GetArenaForAllocation()); -} -inline std::string* ManifestActionList::release_json() { - // @@protoc_insertion_point(field_release:greptime.v1.ManifestActionList.json) - if (_internal_has_json()) { - clear_has_data(); - return _impl_.data_.json_.Release(); - } else { - return nullptr; - } -} -inline void ManifestActionList::set_allocated_json(std::string* json) { - if (has_data()) { - clear_data(); - } - if (json != nullptr) { - set_has_json(); - _impl_.data_.json_.InitAllocated(json, GetArenaForAllocation()); - } - // @@protoc_insertion_point(field_set_allocated:greptime.v1.ManifestActionList.json) +inline void ManifestNotification::set_version(uint64_t value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:greptime.v1.ManifestNotification.version) } -inline bool ManifestActionList::has_data() const { - return data_case() != DATA_NOT_SET; -} -inline void ManifestActionList::clear_has_data() { - _impl_._oneof_case_[0] = DATA_NOT_SET; -} -inline ManifestActionList::DataCase ManifestActionList::data_case() const { - return ManifestActionList::DataCase(_impl_._oneof_case_[0]); -} // ------------------------------------------------------------------- // Mutation @@ -880,45 +757,45 @@ inline void Mutation::set_allocated_rows(::greptime::v1::Rows* rows) { // @@protoc_insertion_point(field_set_allocated:greptime.v1.Mutation.rows) } -// .greptime.v1.ManifestActionList action_list = 4; -inline bool Mutation::_internal_has_action_list() const { - return this != internal_default_instance() && _impl_.action_list_ != nullptr; +// .greptime.v1.ManifestNotification manifest_notification = 4; +inline bool Mutation::_internal_has_manifest_notification() const { + return this != internal_default_instance() && _impl_.manifest_notification_ != nullptr; } -inline bool Mutation::has_action_list() const { - return _internal_has_action_list(); +inline bool Mutation::has_manifest_notification() const { + return _internal_has_manifest_notification(); } -inline void Mutation::clear_action_list() { - if (GetArenaForAllocation() == nullptr && _impl_.action_list_ != nullptr) { - delete _impl_.action_list_; +inline void Mutation::clear_manifest_notification() { + if (GetArenaForAllocation() == nullptr && _impl_.manifest_notification_ != nullptr) { + delete _impl_.manifest_notification_; } - _impl_.action_list_ = nullptr; + _impl_.manifest_notification_ = nullptr; } -inline const ::greptime::v1::ManifestActionList& Mutation::_internal_action_list() const { - const ::greptime::v1::ManifestActionList* p = _impl_.action_list_; - return p != nullptr ? *p : reinterpret_cast( - ::greptime::v1::_ManifestActionList_default_instance_); +inline const ::greptime::v1::ManifestNotification& Mutation::_internal_manifest_notification() const { + const ::greptime::v1::ManifestNotification* p = _impl_.manifest_notification_; + return p != nullptr ? *p : reinterpret_cast( + ::greptime::v1::_ManifestNotification_default_instance_); } -inline const ::greptime::v1::ManifestActionList& Mutation::action_list() const { - // @@protoc_insertion_point(field_get:greptime.v1.Mutation.action_list) - return _internal_action_list(); +inline const ::greptime::v1::ManifestNotification& Mutation::manifest_notification() const { + // @@protoc_insertion_point(field_get:greptime.v1.Mutation.manifest_notification) + return _internal_manifest_notification(); } -inline void Mutation::unsafe_arena_set_allocated_action_list( - ::greptime::v1::ManifestActionList* action_list) { +inline void Mutation::unsafe_arena_set_allocated_manifest_notification( + ::greptime::v1::ManifestNotification* manifest_notification) { if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.action_list_); + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.manifest_notification_); } - _impl_.action_list_ = action_list; - if (action_list) { + _impl_.manifest_notification_ = manifest_notification; + if (manifest_notification) { } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.Mutation.action_list) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.Mutation.manifest_notification) } -inline ::greptime::v1::ManifestActionList* Mutation::release_action_list() { +inline ::greptime::v1::ManifestNotification* Mutation::release_manifest_notification() { - ::greptime::v1::ManifestActionList* temp = _impl_.action_list_; - _impl_.action_list_ = nullptr; + ::greptime::v1::ManifestNotification* temp = _impl_.manifest_notification_; + _impl_.manifest_notification_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); @@ -930,44 +807,44 @@ inline ::greptime::v1::ManifestActionList* Mutation::release_action_list() { #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } -inline ::greptime::v1::ManifestActionList* Mutation::unsafe_arena_release_action_list() { - // @@protoc_insertion_point(field_release:greptime.v1.Mutation.action_list) +inline ::greptime::v1::ManifestNotification* Mutation::unsafe_arena_release_manifest_notification() { + // @@protoc_insertion_point(field_release:greptime.v1.Mutation.manifest_notification) - ::greptime::v1::ManifestActionList* temp = _impl_.action_list_; - _impl_.action_list_ = nullptr; + ::greptime::v1::ManifestNotification* temp = _impl_.manifest_notification_; + _impl_.manifest_notification_ = nullptr; return temp; } -inline ::greptime::v1::ManifestActionList* Mutation::_internal_mutable_action_list() { +inline ::greptime::v1::ManifestNotification* Mutation::_internal_mutable_manifest_notification() { - if (_impl_.action_list_ == nullptr) { - auto* p = CreateMaybeMessage<::greptime::v1::ManifestActionList>(GetArenaForAllocation()); - _impl_.action_list_ = p; + if (_impl_.manifest_notification_ == nullptr) { + auto* p = CreateMaybeMessage<::greptime::v1::ManifestNotification>(GetArenaForAllocation()); + _impl_.manifest_notification_ = p; } - return _impl_.action_list_; + return _impl_.manifest_notification_; } -inline ::greptime::v1::ManifestActionList* Mutation::mutable_action_list() { - ::greptime::v1::ManifestActionList* _msg = _internal_mutable_action_list(); - // @@protoc_insertion_point(field_mutable:greptime.v1.Mutation.action_list) +inline ::greptime::v1::ManifestNotification* Mutation::mutable_manifest_notification() { + ::greptime::v1::ManifestNotification* _msg = _internal_mutable_manifest_notification(); + // @@protoc_insertion_point(field_mutable:greptime.v1.Mutation.manifest_notification) return _msg; } -inline void Mutation::set_allocated_action_list(::greptime::v1::ManifestActionList* action_list) { +inline void Mutation::set_allocated_manifest_notification(::greptime::v1::ManifestNotification* manifest_notification) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { - delete _impl_.action_list_; + delete _impl_.manifest_notification_; } - if (action_list) { + if (manifest_notification) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(action_list); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(manifest_notification); if (message_arena != submessage_arena) { - action_list = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, action_list, submessage_arena); + manifest_notification = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, manifest_notification, submessage_arena); } } else { } - _impl_.action_list_ = action_list; - // @@protoc_insertion_point(field_set_allocated:greptime.v1.Mutation.action_list) + _impl_.manifest_notification_ = manifest_notification; + // @@protoc_insertion_point(field_set_allocated:greptime.v1.Mutation.manifest_notification) } // ------------------------------------------------------------------- diff --git a/go/greptime/v1/wal.pb.go b/go/greptime/v1/wal.pb.go index a94bec4a..de3a8184 100644 --- a/go/greptime/v1/wal.pb.go +++ b/go/greptime/v1/wal.pb.go @@ -42,8 +42,8 @@ const ( OpType_DELETE OpType = 0 // Put rows. OpType_PUT OpType = 1 - // Manifest actions. - OpType_MANIFEST OpType = 2 + // Notify manifest changes. + OpType_NOTIFY OpType = 2 ) // Enum value maps for OpType. @@ -51,12 +51,12 @@ var ( OpType_name = map[int32]string{ 0: "DELETE", 1: "PUT", - 2: "MANIFEST", + 2: "NOTIFY", } OpType_value = map[string]int32{ - "DELETE": 0, - "PUT": 1, - "MANIFEST": 2, + "DELETE": 0, + "PUT": 1, + "NOTIFY": 2, } ) @@ -87,20 +87,17 @@ func (OpType) EnumDescriptor() ([]byte, []int) { return file_greptime_v1_wal_proto_rawDescGZIP(), []int{0} } -type ManifestActionList struct { +// The manfeist notification content. +type ManifestNotification struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ManifestVersion uint64 `protobuf:"varint,1,opt,name=manifest_version,json=manifestVersion,proto3" json:"manifest_version,omitempty"` - // Types that are assignable to Data: - // - // *ManifestActionList_Json - Data isManifestActionList_Data `protobuf_oneof:"data"` + Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` } -func (x *ManifestActionList) Reset() { - *x = ManifestActionList{} +func (x *ManifestNotification) Reset() { + *x = ManifestNotification{} if protoimpl.UnsafeEnabled { mi := &file_greptime_v1_wal_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -108,13 +105,13 @@ func (x *ManifestActionList) Reset() { } } -func (x *ManifestActionList) String() string { +func (x *ManifestNotification) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ManifestActionList) ProtoMessage() {} +func (*ManifestNotification) ProtoMessage() {} -func (x *ManifestActionList) ProtoReflect() protoreflect.Message { +func (x *ManifestNotification) ProtoReflect() protoreflect.Message { mi := &file_greptime_v1_wal_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -126,42 +123,18 @@ func (x *ManifestActionList) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ManifestActionList.ProtoReflect.Descriptor instead. -func (*ManifestActionList) Descriptor() ([]byte, []int) { +// Deprecated: Use ManifestNotification.ProtoReflect.Descriptor instead. +func (*ManifestNotification) Descriptor() ([]byte, []int) { return file_greptime_v1_wal_proto_rawDescGZIP(), []int{0} } -func (x *ManifestActionList) GetManifestVersion() uint64 { +func (x *ManifestNotification) GetVersion() uint64 { if x != nil { - return x.ManifestVersion + return x.Version } return 0 } -func (m *ManifestActionList) GetData() isManifestActionList_Data { - if m != nil { - return m.Data - } - return nil -} - -func (x *ManifestActionList) GetJson() string { - if x, ok := x.GetData().(*ManifestActionList_Json); ok { - return x.Json - } - return "" -} - -type isManifestActionList_Data interface { - isManifestActionList_Data() -} - -type ManifestActionList_Json struct { - Json string `protobuf:"bytes,2,opt,name=json,proto3,oneof"` -} - -func (*ManifestActionList_Json) isManifestActionList_Data() {} - // Mutation contains updates to a set of rows. type Mutation struct { state protoimpl.MessageState @@ -174,8 +147,8 @@ type Mutation struct { Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // Row updates to write to the WAL. Rows *Rows `protobuf:"bytes,3,opt,name=rows,proto3" json:"rows,omitempty"` - // Manifest action list - ActionList *ManifestActionList `protobuf:"bytes,4,opt,name=action_list,json=actionList,proto3" json:"action_list,omitempty"` + // The manifest change notification + ManifestNotification *ManifestNotification `protobuf:"bytes,4,opt,name=manifest_notification,json=manifestNotification,proto3" json:"manifest_notification,omitempty"` } func (x *Mutation) Reset() { @@ -231,9 +204,9 @@ func (x *Mutation) GetRows() *Rows { return nil } -func (x *Mutation) GetActionList() *ManifestActionList { +func (x *Mutation) GetManifestNotification() *ManifestNotification { if x != nil { - return x.ActionList + return x.ManifestNotification } return nil } @@ -293,36 +266,34 @@ var file_greptime_v1_wal_proto_rawDesc = []byte{ 0x0a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, - 0x31, 0x2f, 0x72, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x12, 0x4d, - 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x04, - 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6a, 0x73, - 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xbd, 0x01, 0x0a, 0x08, 0x4d, - 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x07, 0x6f, 0x70, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x6f, - 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x12, 0x25, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, - 0x77, 0x73, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, 0x69, - 0x66, 0x65, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0a, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3f, 0x0a, 0x08, 0x57, 0x61, - 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x33, 0x0a, 0x09, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x09, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x2b, 0x0a, 0x06, 0x4f, - 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, - 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x41, - 0x4e, 0x49, 0x46, 0x45, 0x53, 0x54, 0x10, 0x02, 0x42, 0x37, 0x5a, 0x35, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2f, 0x72, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x30, 0x0a, 0x14, 0x4d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd3, 0x01, + 0x0a, 0x08, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x07, 0x6f, 0x70, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x67, 0x72, + 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x06, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x56, 0x0a, 0x15, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x3f, 0x0a, 0x08, 0x57, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x33, 0x0a, 0x09, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6d, 0x75, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x29, 0x0a, 0x06, 0x4f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, + 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, + 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x10, 0x02, 0x42, + 0x37, 0x5a, 0x35, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -340,16 +311,16 @@ func file_greptime_v1_wal_proto_rawDescGZIP() []byte { var file_greptime_v1_wal_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_greptime_v1_wal_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_greptime_v1_wal_proto_goTypes = []interface{}{ - (OpType)(0), // 0: greptime.v1.OpType - (*ManifestActionList)(nil), // 1: greptime.v1.ManifestActionList - (*Mutation)(nil), // 2: greptime.v1.Mutation - (*WalEntry)(nil), // 3: greptime.v1.WalEntry - (*Rows)(nil), // 4: greptime.v1.Rows + (OpType)(0), // 0: greptime.v1.OpType + (*ManifestNotification)(nil), // 1: greptime.v1.ManifestNotification + (*Mutation)(nil), // 2: greptime.v1.Mutation + (*WalEntry)(nil), // 3: greptime.v1.WalEntry + (*Rows)(nil), // 4: greptime.v1.Rows } var file_greptime_v1_wal_proto_depIdxs = []int32{ 0, // 0: greptime.v1.Mutation.op_type:type_name -> greptime.v1.OpType 4, // 1: greptime.v1.Mutation.rows:type_name -> greptime.v1.Rows - 1, // 2: greptime.v1.Mutation.action_list:type_name -> greptime.v1.ManifestActionList + 1, // 2: greptime.v1.Mutation.manifest_notification:type_name -> greptime.v1.ManifestNotification 2, // 3: greptime.v1.WalEntry.mutations:type_name -> greptime.v1.Mutation 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type @@ -366,7 +337,7 @@ func file_greptime_v1_wal_proto_init() { file_greptime_v1_row_proto_init() if !protoimpl.UnsafeEnabled { file_greptime_v1_wal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ManifestActionList); i { + switch v := v.(*ManifestNotification); i { case 0: return &v.state case 1: @@ -402,9 +373,6 @@ func file_greptime_v1_wal_proto_init() { } } } - file_greptime_v1_wal_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*ManifestActionList_Json)(nil), - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/java/src/main/java/greptime/v1/Wal.java b/java/src/main/java/greptime/v1/Wal.java index 65163c80..bc1e6a52 100644 --- a/java/src/main/java/greptime/v1/Wal.java +++ b/java/src/main/java/greptime/v1/Wal.java @@ -41,12 +41,12 @@ public enum OpType PUT(1), /** *
-     * Manifest actions.
+     * Notify manifest changes.
      * 
* - * MANIFEST = 2; + * NOTIFY = 2; */ - MANIFEST(2), + NOTIFY(2), UNRECOGNIZED(-1), ; @@ -68,12 +68,12 @@ public enum OpType public static final int PUT_VALUE = 1; /** *
-     * Manifest actions.
+     * Notify manifest changes.
      * 
* - * MANIFEST = 2; + * NOTIFY = 2; */ - public static final int MANIFEST_VALUE = 2; + public static final int NOTIFY_VALUE = 2; public final int getNumber() { @@ -102,7 +102,7 @@ public static OpType forNumber(int value) { switch (value) { case 0: return DELETE; case 1: return PUT; - case 2: return MANIFEST; + case 2: return NOTIFY; default: return null; } } @@ -159,55 +159,40 @@ private OpType(int value) { // @@protoc_insertion_point(enum_scope:greptime.v1.OpType) } - public interface ManifestActionListOrBuilder extends - // @@protoc_insertion_point(interface_extends:greptime.v1.ManifestActionList) + public interface ManifestNotificationOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.ManifestNotification) com.google.protobuf.MessageOrBuilder { /** - * uint64 manifest_version = 1; - * @return The manifestVersion. + * uint64 version = 1; + * @return The version. */ - long getManifestVersion(); - - /** - * string json = 2; - * @return Whether the json field is set. - */ - boolean hasJson(); - /** - * string json = 2; - * @return The json. - */ - java.lang.String getJson(); - /** - * string json = 2; - * @return The bytes for json. - */ - com.google.protobuf.ByteString - getJsonBytes(); - - public greptime.v1.Wal.ManifestActionList.DataCase getDataCase(); + long getVersion(); } /** - * Protobuf type {@code greptime.v1.ManifestActionList} + *
+   * The manfeist notification content.
+   * 
+ * + * Protobuf type {@code greptime.v1.ManifestNotification} */ - public static final class ManifestActionList extends + public static final class ManifestNotification extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:greptime.v1.ManifestActionList) - ManifestActionListOrBuilder { + // @@protoc_insertion_point(message_implements:greptime.v1.ManifestNotification) + ManifestNotificationOrBuilder { private static final long serialVersionUID = 0L; - // Use ManifestActionList.newBuilder() to construct. - private ManifestActionList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ManifestNotification.newBuilder() to construct. + private ManifestNotification(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ManifestActionList() { + private ManifestNotification() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new ManifestActionList(); + return new ManifestNotification(); } @java.lang.Override @@ -215,7 +200,7 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ManifestActionList( + private ManifestNotification( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -235,13 +220,7 @@ private ManifestActionList( break; case 8: { - manifestVersion_ = input.readUInt64(); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - dataCase_ = 2; - data_ = s; + version_ = input.readUInt64(); break; } default: { @@ -267,117 +246,26 @@ private ManifestActionList( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestActionList_descriptor; + return greptime.v1.Wal.internal_static_greptime_v1_ManifestNotification_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestActionList_fieldAccessorTable + return greptime.v1.Wal.internal_static_greptime_v1_ManifestNotification_fieldAccessorTable .ensureFieldAccessorsInitialized( - greptime.v1.Wal.ManifestActionList.class, greptime.v1.Wal.ManifestActionList.Builder.class); + greptime.v1.Wal.ManifestNotification.class, greptime.v1.Wal.ManifestNotification.Builder.class); } - private int dataCase_ = 0; - private java.lang.Object data_; - public enum DataCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - JSON(2), - DATA_NOT_SET(0); - private final int value; - private DataCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DataCase valueOf(int value) { - return forNumber(value); - } - - public static DataCase forNumber(int value) { - switch (value) { - case 2: return JSON; - case 0: return DATA_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DataCase - getDataCase() { - return DataCase.forNumber( - dataCase_); - } - - public static final int MANIFEST_VERSION_FIELD_NUMBER = 1; - private long manifestVersion_; + public static final int VERSION_FIELD_NUMBER = 1; + private long version_; /** - * uint64 manifest_version = 1; - * @return The manifestVersion. + * uint64 version = 1; + * @return The version. */ @java.lang.Override - public long getManifestVersion() { - return manifestVersion_; - } - - public static final int JSON_FIELD_NUMBER = 2; - /** - * string json = 2; - * @return Whether the json field is set. - */ - public boolean hasJson() { - return dataCase_ == 2; - } - /** - * string json = 2; - * @return The json. - */ - public java.lang.String getJson() { - java.lang.Object ref = ""; - if (dataCase_ == 2) { - ref = data_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (dataCase_ == 2) { - data_ = s; - } - return s; - } - } - /** - * string json = 2; - * @return The bytes for json. - */ - public com.google.protobuf.ByteString - getJsonBytes() { - java.lang.Object ref = ""; - if (dataCase_ == 2) { - ref = data_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (dataCase_ == 2) { - data_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public long getVersion() { + return version_; } private byte memoizedIsInitialized = -1; @@ -394,11 +282,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (manifestVersion_ != 0L) { - output.writeUInt64(1, manifestVersion_); - } - if (dataCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); + if (version_ != 0L) { + output.writeUInt64(1, version_); } unknownFields.writeTo(output); } @@ -409,12 +294,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (manifestVersion_ != 0L) { + if (version_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, manifestVersion_); - } - if (dataCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); + .computeUInt64Size(1, version_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -426,22 +308,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof greptime.v1.Wal.ManifestActionList)) { + if (!(obj instanceof greptime.v1.Wal.ManifestNotification)) { return super.equals(obj); } - greptime.v1.Wal.ManifestActionList other = (greptime.v1.Wal.ManifestActionList) obj; + greptime.v1.Wal.ManifestNotification other = (greptime.v1.Wal.ManifestNotification) obj; - if (getManifestVersion() - != other.getManifestVersion()) return false; - if (!getDataCase().equals(other.getDataCase())) return false; - switch (dataCase_) { - case 2: - if (!getJson() - .equals(other.getJson())) return false; - break; - case 0: - default: - } + if (getVersion() + != other.getVersion()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -453,85 +326,77 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MANIFEST_VERSION_FIELD_NUMBER; + hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getManifestVersion()); - switch (dataCase_) { - case 2: - hash = (37 * hash) + JSON_FIELD_NUMBER; - hash = (53 * hash) + getJson().hashCode(); - break; - case 0: - default: - } + getVersion()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static greptime.v1.Wal.ManifestActionList parseFrom( + public static greptime.v1.Wal.ManifestNotification parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static greptime.v1.Wal.ManifestActionList parseFrom( + public static greptime.v1.Wal.ManifestNotification parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static greptime.v1.Wal.ManifestActionList parseFrom( + public static greptime.v1.Wal.ManifestNotification parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static greptime.v1.Wal.ManifestActionList parseFrom( + public static greptime.v1.Wal.ManifestNotification 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.Wal.ManifestActionList parseFrom(byte[] data) + public static greptime.v1.Wal.ManifestNotification parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static greptime.v1.Wal.ManifestActionList parseFrom( + public static greptime.v1.Wal.ManifestNotification parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static greptime.v1.Wal.ManifestActionList parseFrom(java.io.InputStream input) + public static greptime.v1.Wal.ManifestNotification parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static greptime.v1.Wal.ManifestActionList parseFrom( + public static greptime.v1.Wal.ManifestNotification 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.Wal.ManifestActionList parseDelimitedFrom(java.io.InputStream input) + public static greptime.v1.Wal.ManifestNotification parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static greptime.v1.Wal.ManifestActionList parseDelimitedFrom( + public static greptime.v1.Wal.ManifestNotification 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.Wal.ManifestActionList parseFrom( + public static greptime.v1.Wal.ManifestNotification parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static greptime.v1.Wal.ManifestActionList parseFrom( + public static greptime.v1.Wal.ManifestNotification parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -544,7 +409,7 @@ public static greptime.v1.Wal.ManifestActionList parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(greptime.v1.Wal.ManifestActionList prototype) { + public static Builder newBuilder(greptime.v1.Wal.ManifestNotification prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -560,26 +425,30 @@ protected Builder newBuilderForType( return builder; } /** - * Protobuf type {@code greptime.v1.ManifestActionList} + *
+     * The manfeist notification content.
+     * 
+ * + * Protobuf type {@code greptime.v1.ManifestNotification} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:greptime.v1.ManifestActionList) - greptime.v1.Wal.ManifestActionListOrBuilder { + // @@protoc_insertion_point(builder_implements:greptime.v1.ManifestNotification) + greptime.v1.Wal.ManifestNotificationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestActionList_descriptor; + return greptime.v1.Wal.internal_static_greptime_v1_ManifestNotification_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestActionList_fieldAccessorTable + return greptime.v1.Wal.internal_static_greptime_v1_ManifestNotification_fieldAccessorTable .ensureFieldAccessorsInitialized( - greptime.v1.Wal.ManifestActionList.class, greptime.v1.Wal.ManifestActionList.Builder.class); + greptime.v1.Wal.ManifestNotification.class, greptime.v1.Wal.ManifestNotification.Builder.class); } - // Construct using greptime.v1.Wal.ManifestActionList.newBuilder() + // Construct using greptime.v1.Wal.ManifestNotification.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -597,27 +466,25 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - manifestVersion_ = 0L; + version_ = 0L; - dataCase_ = 0; - data_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestActionList_descriptor; + return greptime.v1.Wal.internal_static_greptime_v1_ManifestNotification_descriptor; } @java.lang.Override - public greptime.v1.Wal.ManifestActionList getDefaultInstanceForType() { - return greptime.v1.Wal.ManifestActionList.getDefaultInstance(); + public greptime.v1.Wal.ManifestNotification getDefaultInstanceForType() { + return greptime.v1.Wal.ManifestNotification.getDefaultInstance(); } @java.lang.Override - public greptime.v1.Wal.ManifestActionList build() { - greptime.v1.Wal.ManifestActionList result = buildPartial(); + public greptime.v1.Wal.ManifestNotification build() { + greptime.v1.Wal.ManifestNotification result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -625,13 +492,9 @@ public greptime.v1.Wal.ManifestActionList build() { } @java.lang.Override - public greptime.v1.Wal.ManifestActionList buildPartial() { - greptime.v1.Wal.ManifestActionList result = new greptime.v1.Wal.ManifestActionList(this); - result.manifestVersion_ = manifestVersion_; - if (dataCase_ == 2) { - result.data_ = data_; - } - result.dataCase_ = dataCase_; + public greptime.v1.Wal.ManifestNotification buildPartial() { + greptime.v1.Wal.ManifestNotification result = new greptime.v1.Wal.ManifestNotification(this); + result.version_ = version_; onBuilt(); return result; } @@ -670,29 +533,18 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof greptime.v1.Wal.ManifestActionList) { - return mergeFrom((greptime.v1.Wal.ManifestActionList)other); + if (other instanceof greptime.v1.Wal.ManifestNotification) { + return mergeFrom((greptime.v1.Wal.ManifestNotification)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(greptime.v1.Wal.ManifestActionList other) { - if (other == greptime.v1.Wal.ManifestActionList.getDefaultInstance()) return this; - if (other.getManifestVersion() != 0L) { - setManifestVersion(other.getManifestVersion()); - } - switch (other.getDataCase()) { - case JSON: { - dataCase_ = 2; - data_ = other.data_; - onChanged(); - break; - } - case DATA_NOT_SET: { - break; - } + public Builder mergeFrom(greptime.v1.Wal.ManifestNotification other) { + if (other == greptime.v1.Wal.ManifestNotification.getDefaultInstance()) return this; + if (other.getVersion() != 0L) { + setVersion(other.getVersion()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -709,11 +561,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - greptime.v1.Wal.ManifestActionList parsedMessage = null; + greptime.v1.Wal.ManifestNotification parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (greptime.v1.Wal.ManifestActionList) e.getUnfinishedMessage(); + parsedMessage = (greptime.v1.Wal.ManifestNotification) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -722,146 +574,34 @@ public Builder mergeFrom( } return this; } - private int dataCase_ = 0; - private java.lang.Object data_; - public DataCase - getDataCase() { - return DataCase.forNumber( - dataCase_); - } - public Builder clearData() { - dataCase_ = 0; - data_ = null; - onChanged(); - return this; - } - - - private long manifestVersion_ ; + private long version_ ; /** - * uint64 manifest_version = 1; - * @return The manifestVersion. + * uint64 version = 1; + * @return The version. */ @java.lang.Override - public long getManifestVersion() { - return manifestVersion_; + public long getVersion() { + return version_; } /** - * uint64 manifest_version = 1; - * @param value The manifestVersion to set. + * uint64 version = 1; + * @param value The version to set. * @return This builder for chaining. */ - public Builder setManifestVersion(long value) { + public Builder setVersion(long value) { - manifestVersion_ = value; + version_ = value; onChanged(); return this; } /** - * uint64 manifest_version = 1; + * uint64 version = 1; * @return This builder for chaining. */ - public Builder clearManifestVersion() { + public Builder clearVersion() { - manifestVersion_ = 0L; - onChanged(); - return this; - } - - /** - * string json = 2; - * @return Whether the json field is set. - */ - @java.lang.Override - public boolean hasJson() { - return dataCase_ == 2; - } - /** - * string json = 2; - * @return The json. - */ - @java.lang.Override - public java.lang.String getJson() { - java.lang.Object ref = ""; - if (dataCase_ == 2) { - ref = data_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (dataCase_ == 2) { - data_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string json = 2; - * @return The bytes for json. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getJsonBytes() { - java.lang.Object ref = ""; - if (dataCase_ == 2) { - ref = data_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (dataCase_ == 2) { - data_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string json = 2; - * @param value The json to set. - * @return This builder for chaining. - */ - public Builder setJson( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - dataCase_ = 2; - data_ = value; - onChanged(); - return this; - } - /** - * string json = 2; - * @return This builder for chaining. - */ - public Builder clearJson() { - if (dataCase_ == 2) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - return this; - } - /** - * string json = 2; - * @param value The bytes for json to set. - * @return This builder for chaining. - */ - public Builder setJsonBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - dataCase_ = 2; - data_ = value; + version_ = 0L; onChanged(); return this; } @@ -878,41 +618,41 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:greptime.v1.ManifestActionList) + // @@protoc_insertion_point(builder_scope:greptime.v1.ManifestNotification) } - // @@protoc_insertion_point(class_scope:greptime.v1.ManifestActionList) - private static final greptime.v1.Wal.ManifestActionList DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:greptime.v1.ManifestNotification) + private static final greptime.v1.Wal.ManifestNotification DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new greptime.v1.Wal.ManifestActionList(); + DEFAULT_INSTANCE = new greptime.v1.Wal.ManifestNotification(); } - public static greptime.v1.Wal.ManifestActionList getDefaultInstance() { + public static greptime.v1.Wal.ManifestNotification getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public ManifestActionList parsePartialFrom( + public ManifestNotification parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ManifestActionList(input, extensionRegistry); + return new ManifestNotification(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public greptime.v1.Wal.ManifestActionList getDefaultInstanceForType() { + public greptime.v1.Wal.ManifestNotification getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -980,30 +720,30 @@ public interface MutationOrBuilder extends /** *
-     * Manifest action list
+     * The manifest change notification
      * 
* - * .greptime.v1.ManifestActionList action_list = 4; - * @return Whether the actionList field is set. + * .greptime.v1.ManifestNotification manifest_notification = 4; + * @return Whether the manifestNotification field is set. */ - boolean hasActionList(); + boolean hasManifestNotification(); /** *
-     * Manifest action list
+     * The manifest change notification
      * 
* - * .greptime.v1.ManifestActionList action_list = 4; - * @return The actionList. + * .greptime.v1.ManifestNotification manifest_notification = 4; + * @return The manifestNotification. */ - greptime.v1.Wal.ManifestActionList getActionList(); + greptime.v1.Wal.ManifestNotification getManifestNotification(); /** *
-     * Manifest action list
+     * The manifest change notification
      * 
* - * .greptime.v1.ManifestActionList action_list = 4; + * .greptime.v1.ManifestNotification manifest_notification = 4; */ - greptime.v1.Wal.ManifestActionListOrBuilder getActionListOrBuilder(); + greptime.v1.Wal.ManifestNotificationOrBuilder getManifestNotificationOrBuilder(); } /** *
@@ -1080,14 +820,14 @@ private Mutation(
               break;
             }
             case 34: {
-              greptime.v1.Wal.ManifestActionList.Builder subBuilder = null;
-              if (actionList_ != null) {
-                subBuilder = actionList_.toBuilder();
+              greptime.v1.Wal.ManifestNotification.Builder subBuilder = null;
+              if (manifestNotification_ != null) {
+                subBuilder = manifestNotification_.toBuilder();
               }
-              actionList_ = input.readMessage(greptime.v1.Wal.ManifestActionList.parser(), extensionRegistry);
+              manifestNotification_ = input.readMessage(greptime.v1.Wal.ManifestNotification.parser(), extensionRegistry);
               if (subBuilder != null) {
-                subBuilder.mergeFrom(actionList_);
-                actionList_ = subBuilder.buildPartial();
+                subBuilder.mergeFrom(manifestNotification_);
+                manifestNotification_ = subBuilder.buildPartial();
               }
 
               break;
@@ -1206,42 +946,42 @@ public io.greptime.v1.RowData.RowsOrBuilder getRowsOrBuilder() {
       return getRows();
     }
 
-    public static final int ACTION_LIST_FIELD_NUMBER = 4;
-    private greptime.v1.Wal.ManifestActionList actionList_;
+    public static final int MANIFEST_NOTIFICATION_FIELD_NUMBER = 4;
+    private greptime.v1.Wal.ManifestNotification manifestNotification_;
     /**
      * 
-     * Manifest action list
+     * The manifest change notification
      * 
* - * .greptime.v1.ManifestActionList action_list = 4; - * @return Whether the actionList field is set. + * .greptime.v1.ManifestNotification manifest_notification = 4; + * @return Whether the manifestNotification field is set. */ @java.lang.Override - public boolean hasActionList() { - return actionList_ != null; + public boolean hasManifestNotification() { + return manifestNotification_ != null; } /** *
-     * Manifest action list
+     * The manifest change notification
      * 
* - * .greptime.v1.ManifestActionList action_list = 4; - * @return The actionList. + * .greptime.v1.ManifestNotification manifest_notification = 4; + * @return The manifestNotification. */ @java.lang.Override - public greptime.v1.Wal.ManifestActionList getActionList() { - return actionList_ == null ? greptime.v1.Wal.ManifestActionList.getDefaultInstance() : actionList_; + public greptime.v1.Wal.ManifestNotification getManifestNotification() { + return manifestNotification_ == null ? greptime.v1.Wal.ManifestNotification.getDefaultInstance() : manifestNotification_; } /** *
-     * Manifest action list
+     * The manifest change notification
      * 
* - * .greptime.v1.ManifestActionList action_list = 4; + * .greptime.v1.ManifestNotification manifest_notification = 4; */ @java.lang.Override - public greptime.v1.Wal.ManifestActionListOrBuilder getActionListOrBuilder() { - return getActionList(); + public greptime.v1.Wal.ManifestNotificationOrBuilder getManifestNotificationOrBuilder() { + return getManifestNotification(); } private byte memoizedIsInitialized = -1; @@ -1267,8 +1007,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (rows_ != null) { output.writeMessage(3, getRows()); } - if (actionList_ != null) { - output.writeMessage(4, getActionList()); + if (manifestNotification_ != null) { + output.writeMessage(4, getManifestNotification()); } unknownFields.writeTo(output); } @@ -1291,9 +1031,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getRows()); } - if (actionList_ != null) { + if (manifestNotification_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getActionList()); + .computeMessageSize(4, getManifestNotification()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -1318,10 +1058,10 @@ public boolean equals(final java.lang.Object obj) { if (!getRows() .equals(other.getRows())) return false; } - if (hasActionList() != other.hasActionList()) return false; - if (hasActionList()) { - if (!getActionList() - .equals(other.getActionList())) return false; + if (hasManifestNotification() != other.hasManifestNotification()) return false; + if (hasManifestNotification()) { + if (!getManifestNotification() + .equals(other.getManifestNotification())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -1343,9 +1083,9 @@ public int hashCode() { hash = (37 * hash) + ROWS_FIELD_NUMBER; hash = (53 * hash) + getRows().hashCode(); } - if (hasActionList()) { - hash = (37 * hash) + ACTION_LIST_FIELD_NUMBER; - hash = (53 * hash) + getActionList().hashCode(); + if (hasManifestNotification()) { + hash = (37 * hash) + MANIFEST_NOTIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getManifestNotification().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; @@ -1494,11 +1234,11 @@ public Builder clear() { rows_ = null; rowsBuilder_ = null; } - if (actionListBuilder_ == null) { - actionList_ = null; + if (manifestNotificationBuilder_ == null) { + manifestNotification_ = null; } else { - actionList_ = null; - actionListBuilder_ = null; + manifestNotification_ = null; + manifestNotificationBuilder_ = null; } return this; } @@ -1533,10 +1273,10 @@ public greptime.v1.Wal.Mutation buildPartial() { } else { result.rows_ = rowsBuilder_.build(); } - if (actionListBuilder_ == null) { - result.actionList_ = actionList_; + if (manifestNotificationBuilder_ == null) { + result.manifestNotification_ = manifestNotification_; } else { - result.actionList_ = actionListBuilder_.build(); + result.manifestNotification_ = manifestNotificationBuilder_.build(); } onBuilt(); return result; @@ -1595,8 +1335,8 @@ public Builder mergeFrom(greptime.v1.Wal.Mutation other) { if (other.hasRows()) { mergeRows(other.getRows()); } - if (other.hasActionList()) { - mergeActionList(other.getActionList()); + if (other.hasManifestNotification()) { + mergeManifestNotification(other.getManifestNotification()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -1899,159 +1639,159 @@ public io.greptime.v1.RowData.RowsOrBuilder getRowsOrBuilder() { return rowsBuilder_; } - private greptime.v1.Wal.ManifestActionList actionList_; + private greptime.v1.Wal.ManifestNotification manifestNotification_; private com.google.protobuf.SingleFieldBuilderV3< - greptime.v1.Wal.ManifestActionList, greptime.v1.Wal.ManifestActionList.Builder, greptime.v1.Wal.ManifestActionListOrBuilder> actionListBuilder_; + greptime.v1.Wal.ManifestNotification, greptime.v1.Wal.ManifestNotification.Builder, greptime.v1.Wal.ManifestNotificationOrBuilder> manifestNotificationBuilder_; /** *
-       * Manifest action list
+       * The manifest change notification
        * 
* - * .greptime.v1.ManifestActionList action_list = 4; - * @return Whether the actionList field is set. + * .greptime.v1.ManifestNotification manifest_notification = 4; + * @return Whether the manifestNotification field is set. */ - public boolean hasActionList() { - return actionListBuilder_ != null || actionList_ != null; + public boolean hasManifestNotification() { + return manifestNotificationBuilder_ != null || manifestNotification_ != null; } /** *
-       * Manifest action list
+       * The manifest change notification
        * 
* - * .greptime.v1.ManifestActionList action_list = 4; - * @return The actionList. + * .greptime.v1.ManifestNotification manifest_notification = 4; + * @return The manifestNotification. */ - public greptime.v1.Wal.ManifestActionList getActionList() { - if (actionListBuilder_ == null) { - return actionList_ == null ? greptime.v1.Wal.ManifestActionList.getDefaultInstance() : actionList_; + public greptime.v1.Wal.ManifestNotification getManifestNotification() { + if (manifestNotificationBuilder_ == null) { + return manifestNotification_ == null ? greptime.v1.Wal.ManifestNotification.getDefaultInstance() : manifestNotification_; } else { - return actionListBuilder_.getMessage(); + return manifestNotificationBuilder_.getMessage(); } } /** *
-       * Manifest action list
+       * The manifest change notification
        * 
* - * .greptime.v1.ManifestActionList action_list = 4; + * .greptime.v1.ManifestNotification manifest_notification = 4; */ - public Builder setActionList(greptime.v1.Wal.ManifestActionList value) { - if (actionListBuilder_ == null) { + public Builder setManifestNotification(greptime.v1.Wal.ManifestNotification value) { + if (manifestNotificationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - actionList_ = value; + manifestNotification_ = value; onChanged(); } else { - actionListBuilder_.setMessage(value); + manifestNotificationBuilder_.setMessage(value); } return this; } /** *
-       * Manifest action list
+       * The manifest change notification
        * 
* - * .greptime.v1.ManifestActionList action_list = 4; + * .greptime.v1.ManifestNotification manifest_notification = 4; */ - public Builder setActionList( - greptime.v1.Wal.ManifestActionList.Builder builderForValue) { - if (actionListBuilder_ == null) { - actionList_ = builderForValue.build(); + public Builder setManifestNotification( + greptime.v1.Wal.ManifestNotification.Builder builderForValue) { + if (manifestNotificationBuilder_ == null) { + manifestNotification_ = builderForValue.build(); onChanged(); } else { - actionListBuilder_.setMessage(builderForValue.build()); + manifestNotificationBuilder_.setMessage(builderForValue.build()); } return this; } /** *
-       * Manifest action list
+       * The manifest change notification
        * 
* - * .greptime.v1.ManifestActionList action_list = 4; + * .greptime.v1.ManifestNotification manifest_notification = 4; */ - public Builder mergeActionList(greptime.v1.Wal.ManifestActionList value) { - if (actionListBuilder_ == null) { - if (actionList_ != null) { - actionList_ = - greptime.v1.Wal.ManifestActionList.newBuilder(actionList_).mergeFrom(value).buildPartial(); + public Builder mergeManifestNotification(greptime.v1.Wal.ManifestNotification value) { + if (manifestNotificationBuilder_ == null) { + if (manifestNotification_ != null) { + manifestNotification_ = + greptime.v1.Wal.ManifestNotification.newBuilder(manifestNotification_).mergeFrom(value).buildPartial(); } else { - actionList_ = value; + manifestNotification_ = value; } onChanged(); } else { - actionListBuilder_.mergeFrom(value); + manifestNotificationBuilder_.mergeFrom(value); } return this; } /** *
-       * Manifest action list
+       * The manifest change notification
        * 
* - * .greptime.v1.ManifestActionList action_list = 4; + * .greptime.v1.ManifestNotification manifest_notification = 4; */ - public Builder clearActionList() { - if (actionListBuilder_ == null) { - actionList_ = null; + public Builder clearManifestNotification() { + if (manifestNotificationBuilder_ == null) { + manifestNotification_ = null; onChanged(); } else { - actionList_ = null; - actionListBuilder_ = null; + manifestNotification_ = null; + manifestNotificationBuilder_ = null; } return this; } /** *
-       * Manifest action list
+       * The manifest change notification
        * 
* - * .greptime.v1.ManifestActionList action_list = 4; + * .greptime.v1.ManifestNotification manifest_notification = 4; */ - public greptime.v1.Wal.ManifestActionList.Builder getActionListBuilder() { + public greptime.v1.Wal.ManifestNotification.Builder getManifestNotificationBuilder() { onChanged(); - return getActionListFieldBuilder().getBuilder(); + return getManifestNotificationFieldBuilder().getBuilder(); } /** *
-       * Manifest action list
+       * The manifest change notification
        * 
* - * .greptime.v1.ManifestActionList action_list = 4; + * .greptime.v1.ManifestNotification manifest_notification = 4; */ - public greptime.v1.Wal.ManifestActionListOrBuilder getActionListOrBuilder() { - if (actionListBuilder_ != null) { - return actionListBuilder_.getMessageOrBuilder(); + public greptime.v1.Wal.ManifestNotificationOrBuilder getManifestNotificationOrBuilder() { + if (manifestNotificationBuilder_ != null) { + return manifestNotificationBuilder_.getMessageOrBuilder(); } else { - return actionList_ == null ? - greptime.v1.Wal.ManifestActionList.getDefaultInstance() : actionList_; + return manifestNotification_ == null ? + greptime.v1.Wal.ManifestNotification.getDefaultInstance() : manifestNotification_; } } /** *
-       * Manifest action list
+       * The manifest change notification
        * 
* - * .greptime.v1.ManifestActionList action_list = 4; + * .greptime.v1.ManifestNotification manifest_notification = 4; */ private com.google.protobuf.SingleFieldBuilderV3< - greptime.v1.Wal.ManifestActionList, greptime.v1.Wal.ManifestActionList.Builder, greptime.v1.Wal.ManifestActionListOrBuilder> - getActionListFieldBuilder() { - if (actionListBuilder_ == null) { - actionListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - greptime.v1.Wal.ManifestActionList, greptime.v1.Wal.ManifestActionList.Builder, greptime.v1.Wal.ManifestActionListOrBuilder>( - getActionList(), + greptime.v1.Wal.ManifestNotification, greptime.v1.Wal.ManifestNotification.Builder, greptime.v1.Wal.ManifestNotificationOrBuilder> + getManifestNotificationFieldBuilder() { + if (manifestNotificationBuilder_ == null) { + manifestNotificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.Wal.ManifestNotification, greptime.v1.Wal.ManifestNotification.Builder, greptime.v1.Wal.ManifestNotificationOrBuilder>( + getManifestNotification(), getParentForChildren(), isClean()); - actionList_ = null; + manifestNotification_ = null; } - return actionListBuilder_; + return manifestNotificationBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -3022,10 +2762,10 @@ public greptime.v1.Wal.WalEntry getDefaultInstanceForType() { } private static final com.google.protobuf.Descriptors.Descriptor - internal_static_greptime_v1_ManifestActionList_descriptor; + internal_static_greptime_v1_ManifestNotification_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_greptime_v1_ManifestActionList_fieldAccessorTable; + internal_static_greptime_v1_ManifestNotification_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_Mutation_descriptor; private static final @@ -3046,35 +2786,34 @@ public greptime.v1.Wal.WalEntry getDefaultInstanceForType() { static { java.lang.String[] descriptorData = { "\n\025greptime/v1/wal.proto\022\013greptime.v1\032\025gr" + - "eptime/v1/row.proto\"F\n\022ManifestActionLis" + - "t\022\030\n\020manifest_version\030\001 \001(\004\022\016\n\004json\030\002 \001(" + - "\tH\000B\006\n\004data\"\231\001\n\010Mutation\022$\n\007op_type\030\001 \001(" + - "\0162\023.greptime.v1.OpType\022\020\n\010sequence\030\002 \001(\004" + - "\022\037\n\004rows\030\003 \001(\0132\021.greptime.v1.Rows\0224\n\013act" + - "ion_list\030\004 \001(\0132\037.greptime.v1.ManifestAct" + - "ionList\"4\n\010WalEntry\022(\n\tmutations\030\001 \003(\0132\025" + - ".greptime.v1.Mutation*+\n\006OpType\022\n\n\006DELET" + - "E\020\000\022\007\n\003PUT\020\001\022\014\n\010MANIFEST\020\002B7Z5github.com" + - "/GreptimeTeam/greptime-proto/go/greptime" + - "/v1b\006proto3" + "eptime/v1/row.proto\"\'\n\024ManifestNotificat" + + "ion\022\017\n\007version\030\001 \001(\004\"\245\001\n\010Mutation\022$\n\007op_" + + "type\030\001 \001(\0162\023.greptime.v1.OpType\022\020\n\010seque" + + "nce\030\002 \001(\004\022\037\n\004rows\030\003 \001(\0132\021.greptime.v1.Ro" + + "ws\022@\n\025manifest_notification\030\004 \001(\0132!.grep" + + "time.v1.ManifestNotification\"4\n\010WalEntry" + + "\022(\n\tmutations\030\001 \003(\0132\025.greptime.v1.Mutati" + + "on*)\n\006OpType\022\n\n\006DELETE\020\000\022\007\n\003PUT\020\001\022\n\n\006NOT" + + "IFY\020\002B7Z5github.com/GreptimeTeam/greptim" + + "e-proto/go/greptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { io.greptime.v1.RowData.getDescriptor(), }); - internal_static_greptime_v1_ManifestActionList_descriptor = + internal_static_greptime_v1_ManifestNotification_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_greptime_v1_ManifestActionList_fieldAccessorTable = new + internal_static_greptime_v1_ManifestNotification_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_greptime_v1_ManifestActionList_descriptor, - new java.lang.String[] { "ManifestVersion", "Json", "Data", }); + internal_static_greptime_v1_ManifestNotification_descriptor, + new java.lang.String[] { "Version", }); internal_static_greptime_v1_Mutation_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_greptime_v1_Mutation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_Mutation_descriptor, - new java.lang.String[] { "OpType", "Sequence", "Rows", "ActionList", }); + new java.lang.String[] { "OpType", "Sequence", "Rows", "ManifestNotification", }); internal_static_greptime_v1_WalEntry_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_greptime_v1_WalEntry_fieldAccessorTable = new diff --git a/proto/greptime/v1/wal.proto b/proto/greptime/v1/wal.proto index 5661fccd..e5185d8b 100644 --- a/proto/greptime/v1/wal.proto +++ b/proto/greptime/v1/wal.proto @@ -20,19 +20,19 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; import "greptime/v1/row.proto"; -message ManifestActionList { - uint64 manifest_version = 1; - oneof data { string json = 2; } -} - // Type of operation to rows. enum OpType { // Delete rows. DELETE = 0; // Put rows. PUT = 1; - // Manifest actions. - MANIFEST = 2; + // Notify manifest changes. + NOTIFY = 2; +} + +// The manfeist notification content. +message ManifestNotification { + uint64 version = 1; } // Mutation contains updates to a set of rows. @@ -43,8 +43,8 @@ message Mutation { uint64 sequence = 2; // Row updates to write to the WAL. Rows rows = 3; - // Manifest action list - ManifestActionList action_list = 4; + // The manifest change notification + ManifestNotification manifest_notification = 4; } // A WAL entry contains a list of mutations for a region to write.