diff --git a/c++/greptime/v1/wal.pb.cc b/c++/greptime/v1/wal.pb.cc index 858203bf..ab4bac45 100644 --- a/c++/greptime/v1/wal.pb.cc +++ b/c++/greptime/v1/wal.pb.cc @@ -22,25 +22,12 @@ namespace _pbi = _pb::internal; namespace greptime { namespace v1 { -PROTOBUF_CONSTEXPR ManifestAction::ManifestAction( +PROTOBUF_CONSTEXPR ManifestActionList::ManifestActionList( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.data_)*/{} + /*decltype(_impl_.manifest_version_)*/uint64_t{0u} + , /*decltype(_impl_.data_)*/{} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}} {} -struct ManifestActionDefaultTypeInternal { - PROTOBUF_CONSTEXPR ManifestActionDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~ManifestActionDefaultTypeInternal() {} - union { - ManifestAction _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ManifestActionDefaultTypeInternal _ManifestAction_default_instance_; -PROTOBUF_CONSTEXPR ManifestActionList::ManifestActionList( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.actions_)*/{} - , /*decltype(_impl_.manifest_version_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} struct ManifestActionListDefaultTypeInternal { PROTOBUF_CONSTEXPR ManifestActionListDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -81,27 +68,20 @@ struct WalEntryDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WalEntryDefaultTypeInternal _WalEntry_default_instance_; } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fwal_2eproto[4]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fwal_2eproto[3]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fwal_2eproto[1]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fwal_2eproto = nullptr; const uint32_t TableStruct_greptime_2fv1_2fwal_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestAction, _internal_metadata_), - ~0u, // no _extensions_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestAction, _impl_._oneof_case_[0]), - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - ::_pbi::kInvalidFieldOffsetTag, - PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestAction, _impl_.data_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestActionList, _internal_metadata_), ~0u, // no _extensions_ - ~0u, // no _oneof_case_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestActionList, _impl_._oneof_case_[0]), ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestActionList, _impl_.manifest_version_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestActionList, _impl_.actions_), + ::_pbi::kInvalidFieldOffsetTag, + PROTOBUF_FIELD_OFFSET(::greptime::v1::ManifestActionList, _impl_.data_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::Mutation, _internal_metadata_), ~0u, // no _extensions_ @@ -121,14 +101,12 @@ 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::ManifestAction)}, - { 8, -1, -1, sizeof(::greptime::v1::ManifestActionList)}, - { 16, -1, -1, sizeof(::greptime::v1::Mutation)}, - { 26, -1, -1, sizeof(::greptime::v1::WalEntry)}, + { 0, -1, -1, sizeof(::greptime::v1::ManifestActionList)}, + { 9, -1, -1, sizeof(::greptime::v1::Mutation)}, + { 19, -1, -1, sizeof(::greptime::v1::WalEntry)}, }; static const ::_pb::Message* const file_default_instances[] = { - &::greptime::v1::_ManifestAction_default_instance_._instance, &::greptime::v1::_ManifestActionList_default_instance_._instance, &::greptime::v1::_Mutation_default_instance_._instance, &::greptime::v1::_WalEntry_default_instance_._instance, @@ -136,27 +114,26 @@ static const ::_pb::Message* const file_default_instances[] = { 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\"(\n\016ManifestAction\022\016\n" - "\004json\030\001 \001(\tH\000B\006\n\004data\"\\\n\022ManifestActionL" - "ist\022\030\n\020manifest_version\030\001 \001(\004\022,\n\007actions" - "\030\002 \003(\0132\033.greptime.v1.ManifestAction\"\231\001\n\010" - "Mutation\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\013action_list\030\004 \001(\0132\037" - ".greptime.v1.ManifestActionList\"4\n\010WalEn" - "try\022(\n\tmutations\030\001 \003(\0132\025.greptime.v1.Mut" - "ation*+\n\006OpType\022\n\n\006DELETE\020\000\022\007\n\003PUT\020\001\022\014\n\010" - "MANIFEST\020\002B7Z5github.com/GreptimeTeam/gr" - "eptime-proto/go/greptime/v1b\006proto3" + "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" ; 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, 515, descriptor_table_protodef_greptime_2fv1_2fwal_2eproto, + false, false, 451, 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, 4, + &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, file_level_metadata_greptime_2fv1_2fwal_2eproto, file_level_enum_descriptors_greptime_2fv1_2fwal_2eproto, file_level_service_descriptors_greptime_2fv1_2fwal_2eproto, @@ -187,25 +164,27 @@ bool OpType_IsValid(int value) { // =================================================================== -class ManifestAction::_Internal { +class ManifestActionList::_Internal { public: }; -ManifestAction::ManifestAction(::PROTOBUF_NAMESPACE_ID::Arena* arena, +ManifestActionList::ManifestActionList(::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.ManifestAction) + // @@protoc_insertion_point(arena_constructor:greptime.v1.ManifestActionList) } -ManifestAction::ManifestAction(const ManifestAction& from) +ManifestActionList::ManifestActionList(const ManifestActionList& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - ManifestAction* const _this = this; (void)_this; + ManifestActionList* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.data_){} + decltype(_impl_.manifest_version_){} + , decltype(_impl_.data_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}}; _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: { @@ -216,23 +195,24 @@ ManifestAction::ManifestAction(const ManifestAction& from) break; } } - // @@protoc_insertion_point(copy_constructor:greptime.v1.ManifestAction) + // @@protoc_insertion_point(copy_constructor:greptime.v1.ManifestActionList) } -inline void ManifestAction::SharedCtor( +inline void ManifestActionList::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.data_){} + decltype(_impl_.manifest_version_){uint64_t{0u}} + , decltype(_impl_.data_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{} }; clear_has_data(); } -ManifestAction::~ManifestAction() { - // @@protoc_insertion_point(destructor:greptime.v1.ManifestAction) +ManifestActionList::~ManifestActionList() { + // @@protoc_insertion_point(destructor:greptime.v1.ManifestActionList) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; return; @@ -240,19 +220,19 @@ ManifestAction::~ManifestAction() { SharedDtor(); } -inline void ManifestAction::SharedDtor() { +inline void ManifestActionList::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); if (has_data()) { clear_data(); } } -void ManifestAction::SetCachedSize(int size) const { +void ManifestActionList::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void ManifestAction::clear_data() { -// @@protoc_insertion_point(one_of_clear_start:greptime.v1.ManifestAction) +void ManifestActionList::clear_data() { +// @@protoc_insertion_point(one_of_clear_start:greptime.v1.ManifestActionList) switch (data_case()) { case kJson: { _impl_.data_.json_.Destroy(); @@ -266,215 +246,14 @@ void ManifestAction::clear_data() { } -void ManifestAction::Clear() { -// @@protoc_insertion_point(message_clear_start:greptime.v1.ManifestAction) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - clear_data(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ManifestAction::_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) { - // string json = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_json(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.ManifestAction.json")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ManifestAction::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.ManifestAction) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string json = 1; - 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.ManifestAction.json"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_json(), 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.ManifestAction) - return target; -} - -size_t ManifestAction::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:greptime.v1.ManifestAction) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - switch (data_case()) { - // string json = 1; - 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 ManifestAction::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ManifestAction::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ManifestAction::GetClassData() const { return &_class_data_; } - - -void ManifestAction::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.ManifestAction) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - switch (from.data_case()) { - case kJson: { - _this->_internal_set_json(from._internal_json()); - break; - } - case DATA_NOT_SET: { - break; - } - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ManifestAction::CopyFrom(const ManifestAction& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.ManifestAction) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ManifestAction::IsInitialized() const { - return true; -} - -void ManifestAction::InternalSwap(ManifestAction* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.data_, other->_impl_.data_); - swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ManifestAction::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]); -} - -// =================================================================== - -class ManifestActionList::_Internal { - public: -}; - -ManifestActionList::ManifestActionList(::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) -} -ManifestActionList::ManifestActionList(const ManifestActionList& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - ManifestActionList* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.actions_){from._impl_.actions_} - , decltype(_impl_.manifest_version_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.manifest_version_ = from._impl_.manifest_version_; - // @@protoc_insertion_point(copy_constructor:greptime.v1.ManifestActionList) -} - -inline void ManifestActionList::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.actions_){arena} - , decltype(_impl_.manifest_version_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -ManifestActionList::~ManifestActionList() { - // @@protoc_insertion_point(destructor:greptime.v1.ManifestActionList) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void ManifestActionList::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.actions_.~RepeatedPtrField(); -} - -void ManifestActionList::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - void ManifestActionList::Clear() { // @@protoc_insertion_point(message_clear_start:greptime.v1.ManifestActionList) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.actions_.Clear(); _impl_.manifest_version_ = uint64_t{0u}; + clear_data(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -492,16 +271,13 @@ const char* ManifestActionList::_InternalParse(const char* ptr, ::_pbi::ParseCon } else goto handle_unusual; continue; - // repeated .greptime.v1.ManifestAction actions = 2; + // string json = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_actions(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + 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; @@ -540,12 +316,14 @@ uint8_t* ManifestActionList::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_manifest_version(), target); } - // repeated .greptime.v1.ManifestAction actions = 2; - for (unsigned i = 0, - n = static_cast(this->_internal_actions_size()); i < n; i++) { - const auto& repfield = this->_internal_actions(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + // 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); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -564,18 +342,23 @@ size_t ManifestActionList::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // repeated .greptime.v1.ManifestAction actions = 2; - total_size += 1UL * this->_internal_actions_size(); - for (const auto& msg : this->_impl_.actions_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - // uint64 manifest_version = 1; if (this->_internal_manifest_version() != 0) { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_manifest_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_); } @@ -594,10 +377,18 @@ void ManifestActionList::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, con uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.actions_.MergeFrom(from._impl_.actions_); 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; + } + } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -615,14 +406,15 @@ bool ManifestActionList::IsInitialized() const { void ManifestActionList::InternalSwap(ManifestActionList* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.actions_.InternalSwap(&other->_impl_.actions_); swap(_impl_.manifest_version_, other->_impl_.manifest_version_); + swap(_impl_.data_, other->_impl_.data_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); } ::PROTOBUF_NAMESPACE_ID::Metadata ManifestActionList::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[1]); + file_level_metadata_greptime_2fv1_2fwal_2eproto[0]); } // =================================================================== @@ -924,7 +716,7 @@ void Mutation::InternalSwap(Mutation* other) { ::PROTOBUF_NAMESPACE_ID::Metadata Mutation::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[2]); + file_level_metadata_greptime_2fv1_2fwal_2eproto[1]); } // =================================================================== @@ -1109,17 +901,13 @@ void WalEntry::InternalSwap(WalEntry* other) { ::PROTOBUF_NAMESPACE_ID::Metadata WalEntry::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[3]); + file_level_metadata_greptime_2fv1_2fwal_2eproto[2]); } // @@protoc_insertion_point(namespace_scope) } // namespace v1 } // namespace greptime PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::greptime::v1::ManifestAction* -Arena::CreateMaybeMessage< ::greptime::v1::ManifestAction >(Arena* arena) { - return Arena::CreateMessageInternal< ::greptime::v1::ManifestAction >(arena); -} template<> PROTOBUF_NOINLINE ::greptime::v1::ManifestActionList* Arena::CreateMaybeMessage< ::greptime::v1::ManifestActionList >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::ManifestActionList >(arena); diff --git a/c++/greptime/v1/wal.pb.h b/c++/greptime/v1/wal.pb.h index c81ff680..e9a5a046 100644 --- a/c++/greptime/v1/wal.pb.h +++ b/c++/greptime/v1/wal.pb.h @@ -48,9 +48,6 @@ struct TableStruct_greptime_2fv1_2fwal_2eproto { extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_greptime_2fv1_2fwal_2eproto; namespace greptime { namespace v1 { -class ManifestAction; -struct ManifestActionDefaultTypeInternal; -extern ManifestActionDefaultTypeInternal _ManifestAction_default_instance_; class ManifestActionList; struct ManifestActionListDefaultTypeInternal; extern ManifestActionListDefaultTypeInternal _ManifestActionList_default_instance_; @@ -63,7 +60,6 @@ extern WalEntryDefaultTypeInternal _WalEntry_default_instance_; } // namespace v1 } // namespace greptime PROTOBUF_NAMESPACE_OPEN -template<> ::greptime::v1::ManifestAction* Arena::CreateMaybeMessage<::greptime::v1::ManifestAction>(Arena*); template<> ::greptime::v1::ManifestActionList* Arena::CreateMaybeMessage<::greptime::v1::ManifestActionList>(Arena*); template<> ::greptime::v1::Mutation* Arena::CreateMaybeMessage<::greptime::v1::Mutation>(Arena*); template<> ::greptime::v1::WalEntry* Arena::CreateMaybeMessage<::greptime::v1::WalEntry>(Arena*); @@ -99,180 +95,6 @@ inline bool OpType_Parse( } // =================================================================== -class ManifestAction final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.ManifestAction) */ { - public: - inline ManifestAction() : ManifestAction(nullptr) {} - ~ManifestAction() override; - explicit PROTOBUF_CONSTEXPR ManifestAction(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ManifestAction(const ManifestAction& from); - ManifestAction(ManifestAction&& from) noexcept - : ManifestAction() { - *this = ::std::move(from); - } - - inline ManifestAction& operator=(const ManifestAction& from) { - CopyFrom(from); - return *this; - } - inline ManifestAction& operator=(ManifestAction&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ManifestAction& default_instance() { - return *internal_default_instance(); - } - enum DataCase { - kJson = 1, - DATA_NOT_SET = 0, - }; - - static inline const ManifestAction* internal_default_instance() { - return reinterpret_cast( - &_ManifestAction_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(ManifestAction& a, ManifestAction& b) { - a.Swap(&b); - } - inline void Swap(ManifestAction* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ManifestAction* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ManifestAction* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ManifestAction& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ManifestAction& from) { - ManifestAction::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ManifestAction* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "greptime.v1.ManifestAction"; - } - protected: - explicit ManifestAction(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kJsonFieldNumber = 1, - }; - // string json = 1; - 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.ManifestAction) - 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_ { - union DataUnion { - constexpr DataUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_; - } data_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t _oneof_case_[1]; - - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_greptime_2fv1_2fwal_2eproto; -}; -// ------------------------------------------------------------------- - class ManifestActionList final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.ManifestActionList) */ { public: @@ -316,12 +138,17 @@ class ManifestActionList final : static const ManifestActionList& 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 constexpr int kIndexInFileMessages = - 1; + 0; friend void swap(ManifestActionList& a, ManifestActionList& b) { a.Swap(&b); @@ -394,27 +221,9 @@ class ManifestActionList final : // accessors ------------------------------------------------------- enum : int { - kActionsFieldNumber = 2, kManifestVersionFieldNumber = 1, + kJsonFieldNumber = 2, }; - // repeated .greptime.v1.ManifestAction actions = 2; - int actions_size() const; - private: - int _internal_actions_size() const; - public: - void clear_actions(); - ::greptime::v1::ManifestAction* mutable_actions(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::ManifestAction >* - mutable_actions(); - private: - const ::greptime::v1::ManifestAction& _internal_actions(int index) const; - ::greptime::v1::ManifestAction* _internal_add_actions(); - public: - const ::greptime::v1::ManifestAction& actions(int index) const; - ::greptime::v1::ManifestAction* add_actions(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::ManifestAction >& - actions() const; - // uint64 manifest_version = 1; void clear_manifest_version(); uint64_t manifest_version() const; @@ -424,17 +233,47 @@ class ManifestActionList final : void _internal_set_manifest_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) 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_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::ManifestAction > actions_; uint64_t manifest_version_; + union DataUnion { + constexpr DataUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_; + } data_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_greptime_2fv1_2fwal_2eproto; @@ -489,7 +328,7 @@ class Mutation final : &_Mutation_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 1; friend void swap(Mutation& a, Mutation& b) { a.Swap(&b); @@ -688,7 +527,7 @@ class WalEntry final : &_WalEntry_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 2; friend void swap(WalEntry& a, WalEntry& b) { a.Swap(&b); @@ -804,50 +643,70 @@ class WalEntry final : #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ -// ManifestAction +// ManifestActionList -// string json = 1; -inline bool ManifestAction::_internal_has_json() const { +// uint64 manifest_version = 1; +inline void ManifestActionList::clear_manifest_version() { + _impl_.manifest_version_ = uint64_t{0u}; +} +inline uint64_t ManifestActionList::_internal_manifest_version() const { + return _impl_.manifest_version_; +} +inline uint64_t ManifestActionList::manifest_version() const { + // @@protoc_insertion_point(field_get:greptime.v1.ManifestActionList.manifest_version) + return _internal_manifest_version(); +} +inline void ManifestActionList::_internal_set_manifest_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 ManifestAction::has_json() const { +inline bool ManifestActionList::has_json() const { return _internal_has_json(); } -inline void ManifestAction::set_has_json() { +inline void ManifestActionList::set_has_json() { _impl_._oneof_case_[0] = kJson; } -inline void ManifestAction::clear_json() { +inline void ManifestActionList::clear_json() { if (_internal_has_json()) { _impl_.data_.json_.Destroy(); clear_has_data(); } } -inline const std::string& ManifestAction::json() const { - // @@protoc_insertion_point(field_get:greptime.v1.ManifestAction.json) +inline const std::string& ManifestActionList::json() const { + // @@protoc_insertion_point(field_get:greptime.v1.ManifestActionList.json) return _internal_json(); } template -inline void ManifestAction::set_json(ArgT0&& arg0, ArgT... args) { +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.ManifestAction.json) + // @@protoc_insertion_point(field_set:greptime.v1.ManifestActionList.json) } -inline std::string* ManifestAction::mutable_json() { +inline std::string* ManifestActionList::mutable_json() { std::string* _s = _internal_mutable_json(); - // @@protoc_insertion_point(field_mutable:greptime.v1.ManifestAction.json) + // @@protoc_insertion_point(field_mutable:greptime.v1.ManifestActionList.json) return _s; } -inline const std::string& ManifestAction::_internal_json() const { +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 ManifestAction::_internal_set_json(const std::string& value) { +inline void ManifestActionList::_internal_set_json(const std::string& value) { if (!_internal_has_json()) { clear_data(); set_has_json(); @@ -855,7 +714,7 @@ inline void ManifestAction::_internal_set_json(const std::string& value) { } _impl_.data_.json_.Set(value, GetArenaForAllocation()); } -inline std::string* ManifestAction::_internal_mutable_json() { +inline std::string* ManifestActionList::_internal_mutable_json() { if (!_internal_has_json()) { clear_data(); set_has_json(); @@ -863,8 +722,8 @@ inline std::string* ManifestAction::_internal_mutable_json() { } return _impl_.data_.json_.Mutable( GetArenaForAllocation()); } -inline std::string* ManifestAction::release_json() { - // @@protoc_insertion_point(field_release:greptime.v1.ManifestAction.json) +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(); @@ -872,7 +731,7 @@ inline std::string* ManifestAction::release_json() { return nullptr; } } -inline void ManifestAction::set_allocated_json(std::string* json) { +inline void ManifestActionList::set_allocated_json(std::string* json) { if (has_data()) { clear_data(); } @@ -880,82 +739,18 @@ inline void ManifestAction::set_allocated_json(std::string* json) { set_has_json(); _impl_.data_.json_.InitAllocated(json, GetArenaForAllocation()); } - // @@protoc_insertion_point(field_set_allocated:greptime.v1.ManifestAction.json) + // @@protoc_insertion_point(field_set_allocated:greptime.v1.ManifestActionList.json) } -inline bool ManifestAction::has_data() const { +inline bool ManifestActionList::has_data() const { return data_case() != DATA_NOT_SET; } -inline void ManifestAction::clear_has_data() { +inline void ManifestActionList::clear_has_data() { _impl_._oneof_case_[0] = DATA_NOT_SET; } -inline ManifestAction::DataCase ManifestAction::data_case() const { - return ManifestAction::DataCase(_impl_._oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// ManifestActionList - -// uint64 manifest_version = 1; -inline void ManifestActionList::clear_manifest_version() { - _impl_.manifest_version_ = uint64_t{0u}; -} -inline uint64_t ManifestActionList::_internal_manifest_version() const { - return _impl_.manifest_version_; -} -inline uint64_t ManifestActionList::manifest_version() const { - // @@protoc_insertion_point(field_get:greptime.v1.ManifestActionList.manifest_version) - return _internal_manifest_version(); -} -inline void ManifestActionList::_internal_set_manifest_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) +inline ManifestActionList::DataCase ManifestActionList::data_case() const { + return ManifestActionList::DataCase(_impl_._oneof_case_[0]); } - -// repeated .greptime.v1.ManifestAction actions = 2; -inline int ManifestActionList::_internal_actions_size() const { - return _impl_.actions_.size(); -} -inline int ManifestActionList::actions_size() const { - return _internal_actions_size(); -} -inline void ManifestActionList::clear_actions() { - _impl_.actions_.Clear(); -} -inline ::greptime::v1::ManifestAction* ManifestActionList::mutable_actions(int index) { - // @@protoc_insertion_point(field_mutable:greptime.v1.ManifestActionList.actions) - return _impl_.actions_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::ManifestAction >* -ManifestActionList::mutable_actions() { - // @@protoc_insertion_point(field_mutable_list:greptime.v1.ManifestActionList.actions) - return &_impl_.actions_; -} -inline const ::greptime::v1::ManifestAction& ManifestActionList::_internal_actions(int index) const { - return _impl_.actions_.Get(index); -} -inline const ::greptime::v1::ManifestAction& ManifestActionList::actions(int index) const { - // @@protoc_insertion_point(field_get:greptime.v1.ManifestActionList.actions) - return _internal_actions(index); -} -inline ::greptime::v1::ManifestAction* ManifestActionList::_internal_add_actions() { - return _impl_.actions_.Add(); -} -inline ::greptime::v1::ManifestAction* ManifestActionList::add_actions() { - ::greptime::v1::ManifestAction* _add = _internal_add_actions(); - // @@protoc_insertion_point(field_add:greptime.v1.ManifestActionList.actions) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::ManifestAction >& -ManifestActionList::actions() const { - // @@protoc_insertion_point(field_list:greptime.v1.ManifestActionList.actions) - return _impl_.actions_; -} - // ------------------------------------------------------------------- // Mutation @@ -1226,8 +1021,6 @@ WalEntry::mutations() const { // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) diff --git a/go/greptime/v1/wal.pb.go b/go/greptime/v1/wal.pb.go index 49def698..a94bec4a 100644 --- a/go/greptime/v1/wal.pb.go +++ b/go/greptime/v1/wal.pb.go @@ -87,19 +87,20 @@ func (OpType) EnumDescriptor() ([]byte, []int) { return file_greptime_v1_wal_proto_rawDescGZIP(), []int{0} } -type ManifestAction struct { +type ManifestActionList 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: // - // *ManifestAction_Json - Data isManifestAction_Data `protobuf_oneof:"data"` + // *ManifestActionList_Json + Data isManifestActionList_Data `protobuf_oneof:"data"` } -func (x *ManifestAction) Reset() { - *x = ManifestAction{} +func (x *ManifestActionList) Reset() { + *x = ManifestActionList{} if protoimpl.UnsafeEnabled { mi := &file_greptime_v1_wal_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -107,13 +108,13 @@ func (x *ManifestAction) Reset() { } } -func (x *ManifestAction) String() string { +func (x *ManifestActionList) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ManifestAction) ProtoMessage() {} +func (*ManifestActionList) ProtoMessage() {} -func (x *ManifestAction) ProtoReflect() protoreflect.Message { +func (x *ManifestActionList) ProtoReflect() protoreflect.Message { mi := &file_greptime_v1_wal_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -125,89 +126,41 @@ func (x *ManifestAction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ManifestAction.ProtoReflect.Descriptor instead. -func (*ManifestAction) Descriptor() ([]byte, []int) { +// Deprecated: Use ManifestActionList.ProtoReflect.Descriptor instead. +func (*ManifestActionList) Descriptor() ([]byte, []int) { return file_greptime_v1_wal_proto_rawDescGZIP(), []int{0} } -func (m *ManifestAction) GetData() isManifestAction_Data { +func (x *ManifestActionList) GetManifestVersion() uint64 { + if x != nil { + return x.ManifestVersion + } + return 0 +} + +func (m *ManifestActionList) GetData() isManifestActionList_Data { if m != nil { return m.Data } return nil } -func (x *ManifestAction) GetJson() string { - if x, ok := x.GetData().(*ManifestAction_Json); ok { +func (x *ManifestActionList) GetJson() string { + if x, ok := x.GetData().(*ManifestActionList_Json); ok { return x.Json } return "" } -type isManifestAction_Data interface { - isManifestAction_Data() +type isManifestActionList_Data interface { + isManifestActionList_Data() } -type ManifestAction_Json struct { - Json string `protobuf:"bytes,1,opt,name=json,proto3,oneof"` +type ManifestActionList_Json struct { + Json string `protobuf:"bytes,2,opt,name=json,proto3,oneof"` } -func (*ManifestAction_Json) isManifestAction_Data() {} - -type ManifestActionList 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"` - Actions []*ManifestAction `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"` -} - -func (x *ManifestActionList) Reset() { - *x = ManifestActionList{} - if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_wal_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ManifestActionList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ManifestActionList) ProtoMessage() {} - -func (x *ManifestActionList) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_wal_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ManifestActionList.ProtoReflect.Descriptor instead. -func (*ManifestActionList) Descriptor() ([]byte, []int) { - return file_greptime_v1_wal_proto_rawDescGZIP(), []int{1} -} - -func (x *ManifestActionList) GetManifestVersion() uint64 { - if x != nil { - return x.ManifestVersion - } - return 0 -} - -func (x *ManifestActionList) GetActions() []*ManifestAction { - if x != nil { - return x.Actions - } - return nil -} +func (*ManifestActionList_Json) isManifestActionList_Data() {} // Mutation contains updates to a set of rows. type Mutation struct { @@ -228,7 +181,7 @@ type Mutation struct { func (x *Mutation) Reset() { *x = Mutation{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_wal_proto_msgTypes[2] + mi := &file_greptime_v1_wal_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -241,7 +194,7 @@ func (x *Mutation) String() string { func (*Mutation) ProtoMessage() {} func (x *Mutation) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_wal_proto_msgTypes[2] + mi := &file_greptime_v1_wal_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -254,7 +207,7 @@ func (x *Mutation) ProtoReflect() protoreflect.Message { // Deprecated: Use Mutation.ProtoReflect.Descriptor instead. func (*Mutation) Descriptor() ([]byte, []int) { - return file_greptime_v1_wal_proto_rawDescGZIP(), []int{2} + return file_greptime_v1_wal_proto_rawDescGZIP(), []int{1} } func (x *Mutation) GetOpType() OpType { @@ -298,7 +251,7 @@ type WalEntry struct { func (x *WalEntry) Reset() { *x = WalEntry{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_wal_proto_msgTypes[3] + mi := &file_greptime_v1_wal_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -311,7 +264,7 @@ func (x *WalEntry) String() string { func (*WalEntry) ProtoMessage() {} func (x *WalEntry) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_wal_proto_msgTypes[3] + mi := &file_greptime_v1_wal_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -324,7 +277,7 @@ func (x *WalEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use WalEntry.ProtoReflect.Descriptor instead. func (*WalEntry) Descriptor() ([]byte, []int) { - return file_greptime_v1_wal_proto_rawDescGZIP(), []int{3} + return file_greptime_v1_wal_proto_rawDescGZIP(), []int{2} } func (x *WalEntry) GetMutations() []*Mutation { @@ -340,41 +293,36 @@ 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, 0x2e, 0x0a, 0x0e, 0x4d, - 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, - 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6a, - 0x73, 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x76, 0x0a, 0x12, 0x4d, + 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, 0x35, 0x0a, 0x07, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 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, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 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, + 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, } var ( @@ -390,26 +338,24 @@ 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, 4) +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 - (*ManifestAction)(nil), // 1: greptime.v1.ManifestAction - (*ManifestActionList)(nil), // 2: greptime.v1.ManifestActionList - (*Mutation)(nil), // 3: greptime.v1.Mutation - (*WalEntry)(nil), // 4: greptime.v1.WalEntry - (*Rows)(nil), // 5: greptime.v1.Rows + (*ManifestActionList)(nil), // 1: greptime.v1.ManifestActionList + (*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{ - 1, // 0: greptime.v1.ManifestActionList.actions:type_name -> greptime.v1.ManifestAction - 0, // 1: greptime.v1.Mutation.op_type:type_name -> greptime.v1.OpType - 5, // 2: greptime.v1.Mutation.rows:type_name -> greptime.v1.Rows - 2, // 3: greptime.v1.Mutation.action_list:type_name -> greptime.v1.ManifestActionList - 3, // 4: greptime.v1.WalEntry.mutations:type_name -> greptime.v1.Mutation - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 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 + 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 + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_greptime_v1_wal_proto_init() } @@ -420,18 +366,6 @@ 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.(*ManifestAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_greptime_v1_wal_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ManifestActionList); i { case 0: return &v.state @@ -443,7 +377,7 @@ func file_greptime_v1_wal_proto_init() { return nil } } - file_greptime_v1_wal_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_greptime_v1_wal_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Mutation); i { case 0: return &v.state @@ -455,7 +389,7 @@ func file_greptime_v1_wal_proto_init() { return nil } } - file_greptime_v1_wal_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_greptime_v1_wal_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WalEntry); i { case 0: return &v.state @@ -469,7 +403,7 @@ func file_greptime_v1_wal_proto_init() { } } file_greptime_v1_wal_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*ManifestAction_Json)(nil), + (*ManifestActionList_Json)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -477,7 +411,7 @@ func file_greptime_v1_wal_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_wal_proto_rawDesc, NumEnums: 1, - NumMessages: 4, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/java/src/main/java/greptime/v1/Wal.java b/java/src/main/java/greptime/v1/Wal.java index 2d41b041..65163c80 100644 --- a/java/src/main/java/greptime/v1/Wal.java +++ b/java/src/main/java/greptime/v1/Wal.java @@ -159,49 +159,55 @@ private OpType(int value) { // @@protoc_insertion_point(enum_scope:greptime.v1.OpType) } - public interface ManifestActionOrBuilder extends - // @@protoc_insertion_point(interface_extends:greptime.v1.ManifestAction) + public interface ManifestActionListOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.ManifestActionList) com.google.protobuf.MessageOrBuilder { /** - * string json = 1; + * uint64 manifest_version = 1; + * @return The manifestVersion. + */ + long getManifestVersion(); + + /** + * string json = 2; * @return Whether the json field is set. */ boolean hasJson(); /** - * string json = 1; + * string json = 2; * @return The json. */ java.lang.String getJson(); /** - * string json = 1; + * string json = 2; * @return The bytes for json. */ com.google.protobuf.ByteString getJsonBytes(); - public greptime.v1.Wal.ManifestAction.DataCase getDataCase(); + public greptime.v1.Wal.ManifestActionList.DataCase getDataCase(); } /** - * Protobuf type {@code greptime.v1.ManifestAction} + * Protobuf type {@code greptime.v1.ManifestActionList} */ - public static final class ManifestAction extends + public static final class ManifestActionList extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:greptime.v1.ManifestAction) - ManifestActionOrBuilder { + // @@protoc_insertion_point(message_implements:greptime.v1.ManifestActionList) + ManifestActionListOrBuilder { private static final long serialVersionUID = 0L; - // Use ManifestAction.newBuilder() to construct. - private ManifestAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ManifestActionList.newBuilder() to construct. + private ManifestActionList(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ManifestAction() { + private ManifestActionList() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new ManifestAction(); + return new ManifestActionList(); } @java.lang.Override @@ -209,7 +215,7 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ManifestAction( + private ManifestActionList( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -227,9 +233,14 @@ private ManifestAction( case 0: done = true; break; - case 10: { + case 8: { + + manifestVersion_ = input.readUInt64(); + break; + } + case 18: { java.lang.String s = input.readStringRequireUtf8(); - dataCase_ = 1; + dataCase_ = 2; data_ = s; break; } @@ -256,15 +267,15 @@ private ManifestAction( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestAction_descriptor; + return greptime.v1.Wal.internal_static_greptime_v1_ManifestActionList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestAction_fieldAccessorTable + return greptime.v1.Wal.internal_static_greptime_v1_ManifestActionList_fieldAccessorTable .ensureFieldAccessorsInitialized( - greptime.v1.Wal.ManifestAction.class, greptime.v1.Wal.ManifestAction.Builder.class); + greptime.v1.Wal.ManifestActionList.class, greptime.v1.Wal.ManifestActionList.Builder.class); } private int dataCase_ = 0; @@ -272,7 +283,7 @@ private ManifestAction( public enum DataCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { - JSON(1), + JSON(2), DATA_NOT_SET(0); private final int value; private DataCase(int value) { @@ -290,7 +301,7 @@ public static DataCase valueOf(int value) { public static DataCase forNumber(int value) { switch (value) { - case 1: return JSON; + case 2: return JSON; case 0: return DATA_NOT_SET; default: return null; } @@ -306,728 +317,67 @@ public int getNumber() { dataCase_); } - public static final int JSON_FIELD_NUMBER = 1; - /** - * string json = 1; - * @return Whether the json field is set. - */ - public boolean hasJson() { - return dataCase_ == 1; - } - /** - * string json = 1; - * @return The json. - */ - public java.lang.String getJson() { - java.lang.Object ref = ""; - if (dataCase_ == 1) { - 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_ == 1) { - data_ = s; - } - return s; - } - } - /** - * string json = 1; - * @return The bytes for json. - */ - public com.google.protobuf.ByteString - getJsonBytes() { - java.lang.Object ref = ""; - if (dataCase_ == 1) { - ref = data_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (dataCase_ == 1) { - data_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (dataCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, data_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dataCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, data_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof greptime.v1.Wal.ManifestAction)) { - return super.equals(obj); - } - greptime.v1.Wal.ManifestAction other = (greptime.v1.Wal.ManifestAction) obj; - - if (!getDataCase().equals(other.getDataCase())) return false; - switch (dataCase_) { - case 1: - if (!getJson() - .equals(other.getJson())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (dataCase_) { - case 1: - hash = (37 * hash) + JSON_FIELD_NUMBER; - hash = (53 * hash) + getJson().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static greptime.v1.Wal.ManifestAction parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static greptime.v1.Wal.ManifestAction 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.ManifestAction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static greptime.v1.Wal.ManifestAction 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.ManifestAction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static greptime.v1.Wal.ManifestAction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static greptime.v1.Wal.ManifestAction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static greptime.v1.Wal.ManifestAction 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.ManifestAction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static greptime.v1.Wal.ManifestAction 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.ManifestAction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static greptime.v1.Wal.ManifestAction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(greptime.v1.Wal.ManifestAction prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code greptime.v1.ManifestAction} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:greptime.v1.ManifestAction) - greptime.v1.Wal.ManifestActionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestAction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - greptime.v1.Wal.ManifestAction.class, greptime.v1.Wal.ManifestAction.Builder.class); - } - - // Construct using greptime.v1.Wal.ManifestAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - dataCase_ = 0; - data_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestAction_descriptor; - } - - @java.lang.Override - public greptime.v1.Wal.ManifestAction getDefaultInstanceForType() { - return greptime.v1.Wal.ManifestAction.getDefaultInstance(); - } - - @java.lang.Override - public greptime.v1.Wal.ManifestAction build() { - greptime.v1.Wal.ManifestAction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public greptime.v1.Wal.ManifestAction buildPartial() { - greptime.v1.Wal.ManifestAction result = new greptime.v1.Wal.ManifestAction(this); - if (dataCase_ == 1) { - result.data_ = data_; - } - result.dataCase_ = dataCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof greptime.v1.Wal.ManifestAction) { - return mergeFrom((greptime.v1.Wal.ManifestAction)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(greptime.v1.Wal.ManifestAction other) { - if (other == greptime.v1.Wal.ManifestAction.getDefaultInstance()) return this; - switch (other.getDataCase()) { - case JSON: { - dataCase_ = 1; - data_ = other.data_; - onChanged(); - break; - } - case DATA_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - greptime.v1.Wal.ManifestAction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (greptime.v1.Wal.ManifestAction) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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; - } - - - /** - * string json = 1; - * @return Whether the json field is set. - */ - @java.lang.Override - public boolean hasJson() { - return dataCase_ == 1; - } - /** - * string json = 1; - * @return The json. - */ - @java.lang.Override - public java.lang.String getJson() { - java.lang.Object ref = ""; - if (dataCase_ == 1) { - 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_ == 1) { - data_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string json = 1; - * @return The bytes for json. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getJsonBytes() { - java.lang.Object ref = ""; - if (dataCase_ == 1) { - ref = data_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (dataCase_ == 1) { - data_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string json = 1; - * @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_ = 1; - data_ = value; - onChanged(); - return this; - } - /** - * string json = 1; - * @return This builder for chaining. - */ - public Builder clearJson() { - if (dataCase_ == 1) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - return this; - } - /** - * string json = 1; - * @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_ = 1; - data_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:greptime.v1.ManifestAction) - } - - // @@protoc_insertion_point(class_scope:greptime.v1.ManifestAction) - private static final greptime.v1.Wal.ManifestAction DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new greptime.v1.Wal.ManifestAction(); - } - - public static greptime.v1.Wal.ManifestAction getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ManifestAction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ManifestAction(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public greptime.v1.Wal.ManifestAction getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ManifestActionListOrBuilder extends - // @@protoc_insertion_point(interface_extends:greptime.v1.ManifestActionList) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 manifest_version = 1; - * @return The manifestVersion. - */ - long getManifestVersion(); - - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - java.util.List - getActionsList(); - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - greptime.v1.Wal.ManifestAction getActions(int index); - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - int getActionsCount(); - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - java.util.List - getActionsOrBuilderList(); - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - greptime.v1.Wal.ManifestActionOrBuilder getActionsOrBuilder( - int index); - } - /** - * Protobuf type {@code greptime.v1.ManifestActionList} - */ - public static final class ManifestActionList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:greptime.v1.ManifestActionList) - ManifestActionListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ManifestActionList.newBuilder() to construct. - private ManifestActionList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ManifestActionList() { - actions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ManifestActionList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ManifestActionList( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - manifestVersion_ = input.readUInt64(); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - actions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - actions_.add( - input.readMessage(greptime.v1.Wal.ManifestAction.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestActionList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return greptime.v1.Wal.internal_static_greptime_v1_ManifestActionList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - greptime.v1.Wal.ManifestActionList.class, greptime.v1.Wal.ManifestActionList.Builder.class); - } - public static final int MANIFEST_VERSION_FIELD_NUMBER = 1; private long manifestVersion_; /** - * uint64 manifest_version = 1; - * @return The manifestVersion. - */ - @java.lang.Override - public long getManifestVersion() { - return manifestVersion_; - } - - public static final int ACTIONS_FIELD_NUMBER = 2; - private java.util.List actions_; - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - @java.lang.Override - public java.util.List getActionsList() { - return actions_; - } - /** - * repeated .greptime.v1.ManifestAction actions = 2; + * uint64 manifest_version = 1; + * @return The manifestVersion. */ @java.lang.Override - public java.util.List - getActionsOrBuilderList() { - return actions_; + public long getManifestVersion() { + return manifestVersion_; } + + public static final int JSON_FIELD_NUMBER = 2; /** - * repeated .greptime.v1.ManifestAction actions = 2; + * string json = 2; + * @return Whether the json field is set. */ - @java.lang.Override - public int getActionsCount() { - return actions_.size(); + public boolean hasJson() { + return dataCase_ == 2; } /** - * repeated .greptime.v1.ManifestAction actions = 2; + * string json = 2; + * @return The json. */ - @java.lang.Override - public greptime.v1.Wal.ManifestAction getActions(int index) { - return actions_.get(index); + 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; + } } /** - * repeated .greptime.v1.ManifestAction actions = 2; + * string json = 2; + * @return The bytes for json. */ - @java.lang.Override - public greptime.v1.Wal.ManifestActionOrBuilder getActionsOrBuilder( - int index) { - return actions_.get(index); + 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; + } } private byte memoizedIsInitialized = -1; @@ -1047,8 +397,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (manifestVersion_ != 0L) { output.writeUInt64(1, manifestVersion_); } - for (int i = 0; i < actions_.size(); i++) { - output.writeMessage(2, actions_.get(i)); + if (dataCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); } unknownFields.writeTo(output); } @@ -1063,9 +413,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, manifestVersion_); } - for (int i = 0; i < actions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, actions_.get(i)); + if (dataCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -1084,8 +433,15 @@ public boolean equals(final java.lang.Object obj) { if (getManifestVersion() != other.getManifestVersion()) return false; - if (!getActionsList() - .equals(other.getActionsList())) 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 (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1100,9 +456,13 @@ public int hashCode() { hash = (37 * hash) + MANIFEST_VERSION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getManifestVersion()); - if (getActionsCount() > 0) { - hash = (37 * hash) + ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getActionsList().hashCode(); + switch (dataCase_) { + case 2: + hash = (37 * hash) + JSON_FIELD_NUMBER; + hash = (53 * hash) + getJson().hashCode(); + break; + case 0: + default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; @@ -1232,7 +592,6 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getActionsFieldBuilder(); } } @java.lang.Override @@ -1240,12 +599,8 @@ public Builder clear() { super.clear(); manifestVersion_ = 0L; - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - actionsBuilder_.clear(); - } + dataCase_ = 0; + data_ = null; return this; } @@ -1272,17 +627,11 @@ 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); - int from_bitField0_ = bitField0_; result.manifestVersion_ = manifestVersion_; - if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.actions_ = actions_; - } else { - result.actions_ = actionsBuilder_.build(); + if (dataCase_ == 2) { + result.data_ = data_; } + result.dataCase_ = dataCase_; onBuilt(); return result; } @@ -1334,30 +683,15 @@ public Builder mergeFrom(greptime.v1.Wal.ManifestActionList other) { if (other.getManifestVersion() != 0L) { setManifestVersion(other.getManifestVersion()); } - if (actionsBuilder_ == null) { - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); - } + switch (other.getDataCase()) { + case JSON: { + dataCase_ = 2; + data_ = other.data_; onChanged(); + break; } - } else { - if (!other.actions_.isEmpty()) { - if (actionsBuilder_.isEmpty()) { - actionsBuilder_.dispose(); - actionsBuilder_ = null; - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000001); - actionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getActionsFieldBuilder() : null; - } else { - actionsBuilder_.addAllMessages(other.actions_); - } + case DATA_NOT_SET: { + break; } } this.mergeUnknownFields(other.unknownFields); @@ -1388,7 +722,21 @@ public Builder mergeFrom( } return this; } - private int bitField0_; + 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_ ; /** @@ -1421,245 +769,102 @@ public Builder clearManifestVersion() { return this; } - private java.util.List actions_ = - java.util.Collections.emptyList(); - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - actions_ = new java.util.ArrayList(actions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.Wal.ManifestAction, greptime.v1.Wal.ManifestAction.Builder, greptime.v1.Wal.ManifestActionOrBuilder> actionsBuilder_; - - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public java.util.List getActionsList() { - if (actionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(actions_); - } else { - return actionsBuilder_.getMessageList(); - } - } /** - * repeated .greptime.v1.ManifestAction actions = 2; + * string json = 2; + * @return Whether the json field is set. */ - public int getActionsCount() { - if (actionsBuilder_ == null) { - return actions_.size(); - } else { - return actionsBuilder_.getCount(); - } + @java.lang.Override + public boolean hasJson() { + return dataCase_ == 2; } /** - * repeated .greptime.v1.ManifestAction actions = 2; + * string json = 2; + * @return The json. */ - public greptime.v1.Wal.ManifestAction getActions(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessage(index); + @java.lang.Override + public java.lang.String getJson() { + java.lang.Object ref = ""; + if (dataCase_ == 2) { + ref = data_; } - } - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public Builder setActions( - int index, greptime.v1.Wal.ManifestAction value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + 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; } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - } else { - actionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public Builder setActions( - int index, greptime.v1.Wal.ManifestAction.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.set(index, builderForValue.build()); - onChanged(); + return s; } else { - actionsBuilder_.setMessage(index, builderForValue.build()); + return (java.lang.String) ref; } - return this; } /** - * repeated .greptime.v1.ManifestAction actions = 2; + * string json = 2; + * @return The bytes for json. */ - public Builder addActions(greptime.v1.Wal.ManifestAction value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - } else { - actionsBuilder_.addMessage(value); + @java.lang.Override + public com.google.protobuf.ByteString + getJsonBytes() { + java.lang.Object ref = ""; + if (dataCase_ == 2) { + ref = data_; } - return this; - } - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public Builder addActions( - int index, greptime.v1.Wal.ManifestAction value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (dataCase_ == 2) { + data_ = b; } - ensureActionsIsMutable(); - actions_.add(index, value); - onChanged(); - } else { - actionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public Builder addActions( - greptime.v1.Wal.ManifestAction.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public Builder addActions( - int index, greptime.v1.Wal.ManifestAction.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(index, builderForValue.build()); - onChanged(); + return b; } else { - actionsBuilder_.addMessage(index, builderForValue.build()); + return (com.google.protobuf.ByteString) ref; } - return this; } /** - * repeated .greptime.v1.ManifestAction actions = 2; + * string json = 2; + * @param value The json to set. + * @return This builder for chaining. */ - public Builder addAllActions( - java.lang.Iterable values) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actions_); - onChanged(); - } else { - actionsBuilder_.addAllMessages(values); - } + public Builder setJson( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataCase_ = 2; + data_ = value; + onChanged(); return this; } /** - * repeated .greptime.v1.ManifestAction actions = 2; + * string json = 2; + * @return This builder for chaining. */ - public Builder clearActions() { - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearJson() { + if (dataCase_ == 2) { + dataCase_ = 0; + data_ = null; onChanged(); - } else { - actionsBuilder_.clear(); } return this; } /** - * repeated .greptime.v1.ManifestAction actions = 2; + * string json = 2; + * @param value The bytes for json to set. + * @return This builder for chaining. */ - public Builder removeActions(int index) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.remove(index); - onChanged(); - } else { - actionsBuilder_.remove(index); - } + public Builder setJsonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataCase_ = 2; + data_ = value; + onChanged(); return this; } - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public greptime.v1.Wal.ManifestAction.Builder getActionsBuilder( - int index) { - return getActionsFieldBuilder().getBuilder(index); - } - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public greptime.v1.Wal.ManifestActionOrBuilder getActionsOrBuilder( - int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); } else { - return actionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public java.util.List - getActionsOrBuilderList() { - if (actionsBuilder_ != null) { - return actionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actions_); - } - } - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public greptime.v1.Wal.ManifestAction.Builder addActionsBuilder() { - return getActionsFieldBuilder().addBuilder( - greptime.v1.Wal.ManifestAction.getDefaultInstance()); - } - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public greptime.v1.Wal.ManifestAction.Builder addActionsBuilder( - int index) { - return getActionsFieldBuilder().addBuilder( - index, greptime.v1.Wal.ManifestAction.getDefaultInstance()); - } - /** - * repeated .greptime.v1.ManifestAction actions = 2; - */ - public java.util.List - getActionsBuilderList() { - return getActionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.Wal.ManifestAction, greptime.v1.Wal.ManifestAction.Builder, greptime.v1.Wal.ManifestActionOrBuilder> - getActionsFieldBuilder() { - if (actionsBuilder_ == null) { - actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.Wal.ManifestAction, greptime.v1.Wal.ManifestAction.Builder, greptime.v1.Wal.ManifestActionOrBuilder>( - actions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - actions_ = null; - } - return actionsBuilder_; - } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -3816,11 +3021,6 @@ public greptime.v1.Wal.WalEntry getDefaultInstanceForType() { } - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_greptime_v1_ManifestAction_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_greptime_v1_ManifestAction_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_ManifestActionList_descriptor; private static final @@ -3846,44 +3046,37 @@ 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\"(\n\016ManifestAction\022\016\n" + - "\004json\030\001 \001(\tH\000B\006\n\004data\"\\\n\022ManifestActionL" + - "ist\022\030\n\020manifest_version\030\001 \001(\004\022,\n\007actions" + - "\030\002 \003(\0132\033.greptime.v1.ManifestAction\"\231\001\n\010" + - "Mutation\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\013action_list\030\004 \001(\0132\037" + - ".greptime.v1.ManifestActionList\"4\n\010WalEn" + - "try\022(\n\tmutations\030\001 \003(\0132\025.greptime.v1.Mut" + - "ation*+\n\006OpType\022\n\n\006DELETE\020\000\022\007\n\003PUT\020\001\022\014\n\010" + - "MANIFEST\020\002B7Z5github.com/GreptimeTeam/gr" + - "eptime-proto/go/greptime/v1b\006proto3" + "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" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { io.greptime.v1.RowData.getDescriptor(), }); - internal_static_greptime_v1_ManifestAction_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_greptime_v1_ManifestAction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_greptime_v1_ManifestAction_descriptor, - new java.lang.String[] { "Json", "Data", }); internal_static_greptime_v1_ManifestActionList_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(0); internal_static_greptime_v1_ManifestActionList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_ManifestActionList_descriptor, - new java.lang.String[] { "ManifestVersion", "Actions", }); + new java.lang.String[] { "ManifestVersion", "Json", "Data", }); internal_static_greptime_v1_Mutation_descriptor = - getDescriptor().getMessageTypes().get(2); + 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", }); internal_static_greptime_v1_WalEntry_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(2); internal_static_greptime_v1_WalEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_WalEntry_descriptor, diff --git a/proto/greptime/v1/wal.proto b/proto/greptime/v1/wal.proto index 4349a44e..5661fccd 100644 --- a/proto/greptime/v1/wal.proto +++ b/proto/greptime/v1/wal.proto @@ -20,13 +20,9 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; import "greptime/v1/row.proto"; -message ManifestAction { - oneof data { string json = 1; } -} - message ManifestActionList { uint64 manifest_version = 1; - repeated ManifestAction actions = 2; + oneof data { string json = 2; } } // Type of operation to rows.