diff --git a/c++/greptime/v1/region/server.pb.cc b/c++/greptime/v1/region/server.pb.cc index 940f53e3..c0dd92e6 100644 --- a/c++/greptime/v1/region/server.pb.cc +++ b/c++/greptime/v1/region/server.pb.cc @@ -313,6 +313,19 @@ struct CompactRequestDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CompactRequestDefaultTypeInternal _CompactRequest_default_instance_; +PROTOBUF_CONSTEXPR TruncateRequest::TruncateRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.region_id_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct TruncateRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR TruncateRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~TruncateRequestDefaultTypeInternal() {} + union { + TruncateRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TruncateRequestDefaultTypeInternal _TruncateRequest_default_instance_; PROTOBUF_CONSTEXPR RegionColumnDef::RegionColumnDef( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.column_def_)*/nullptr @@ -330,7 +343,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT } // namespace region } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[22]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[23]; static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fregion_2fserver_2eproto = nullptr; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fregion_2fserver_2eproto = nullptr; @@ -359,6 +372,7 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionRequest, _impl_.body_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse, _internal_metadata_), @@ -518,6 +532,13 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::region::CompactRequest, _impl_.region_id_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::TruncateRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::TruncateRequest, _impl_.region_id_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionColumnDef, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -529,26 +550,27 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::greptime::v1::region::RegionRequestHeader)}, { 8, -1, -1, sizeof(::greptime::v1::region::RegionRequest)}, - { 25, -1, -1, sizeof(::greptime::v1::region::RegionResponse)}, - { 33, -1, -1, sizeof(::greptime::v1::region::InsertRequests)}, - { 40, -1, -1, sizeof(::greptime::v1::region::DeleteRequests)}, - { 47, -1, -1, sizeof(::greptime::v1::region::InsertRequest)}, - { 55, -1, -1, sizeof(::greptime::v1::region::DeleteRequest)}, - { 63, -1, -1, sizeof(::greptime::v1::region::QueryRequest)}, - { 72, 80, -1, sizeof(::greptime::v1::region::CreateRequest_OptionsEntry_DoNotUse)}, - { 82, -1, -1, sizeof(::greptime::v1::region::CreateRequest)}, - { 94, -1, -1, sizeof(::greptime::v1::region::DropRequest)}, - { 101, 109, -1, sizeof(::greptime::v1::region::OpenRequest_OptionsEntry_DoNotUse)}, - { 111, -1, -1, sizeof(::greptime::v1::region::OpenRequest)}, - { 121, -1, -1, sizeof(::greptime::v1::region::CloseRequest)}, - { 128, -1, -1, sizeof(::greptime::v1::region::AlterRequest)}, - { 139, -1, -1, sizeof(::greptime::v1::region::AddColumns)}, - { 146, -1, -1, sizeof(::greptime::v1::region::DropColumns)}, - { 153, -1, -1, sizeof(::greptime::v1::region::AddColumn)}, - { 161, -1, -1, sizeof(::greptime::v1::region::DropColumn)}, - { 168, -1, -1, sizeof(::greptime::v1::region::FlushRequest)}, - { 175, -1, -1, sizeof(::greptime::v1::region::CompactRequest)}, - { 182, -1, -1, sizeof(::greptime::v1::region::RegionColumnDef)}, + { 26, -1, -1, sizeof(::greptime::v1::region::RegionResponse)}, + { 34, -1, -1, sizeof(::greptime::v1::region::InsertRequests)}, + { 41, -1, -1, sizeof(::greptime::v1::region::DeleteRequests)}, + { 48, -1, -1, sizeof(::greptime::v1::region::InsertRequest)}, + { 56, -1, -1, sizeof(::greptime::v1::region::DeleteRequest)}, + { 64, -1, -1, sizeof(::greptime::v1::region::QueryRequest)}, + { 73, 81, -1, sizeof(::greptime::v1::region::CreateRequest_OptionsEntry_DoNotUse)}, + { 83, -1, -1, sizeof(::greptime::v1::region::CreateRequest)}, + { 95, -1, -1, sizeof(::greptime::v1::region::DropRequest)}, + { 102, 110, -1, sizeof(::greptime::v1::region::OpenRequest_OptionsEntry_DoNotUse)}, + { 112, -1, -1, sizeof(::greptime::v1::region::OpenRequest)}, + { 122, -1, -1, sizeof(::greptime::v1::region::CloseRequest)}, + { 129, -1, -1, sizeof(::greptime::v1::region::AlterRequest)}, + { 140, -1, -1, sizeof(::greptime::v1::region::AddColumns)}, + { 147, -1, -1, sizeof(::greptime::v1::region::DropColumns)}, + { 154, -1, -1, sizeof(::greptime::v1::region::AddColumn)}, + { 162, -1, -1, sizeof(::greptime::v1::region::DropColumn)}, + { 169, -1, -1, sizeof(::greptime::v1::region::FlushRequest)}, + { 176, -1, -1, sizeof(::greptime::v1::region::CompactRequest)}, + { 183, -1, -1, sizeof(::greptime::v1::region::TruncateRequest)}, + { 190, -1, -1, sizeof(::greptime::v1::region::RegionColumnDef)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -573,6 +595,7 @@ static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::region::_DropColumn_default_instance_._instance, &::greptime::v1::region::_FlushRequest_default_instance_._instance, &::greptime::v1::region::_CompactRequest_default_instance_._instance, + &::greptime::v1::region::_TruncateRequest_default_instance_._instance, &::greptime::v1::region::_RegionColumnDef_default_instance_._instance, }; @@ -581,7 +604,7 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P "ime.v1.region\032\030greptime/v1/common.proto\032" "\025greptime/v1/row.proto\032\025greptime/v1/ddl." "proto\"8\n\023RegionRequestHeader\022\020\n\010trace_id" - "\030\001 \001(\004\022\017\n\007span_id\030\002 \001(\004\"\245\004\n\rRegionReques" + "\030\001 \001(\004\022\017\n\007span_id\030\002 \001(\004\"\336\004\n\rRegionReques" "t\0227\n\006header\030\001 \001(\0132\'.greptime.v1.region.R" "egionRequestHeader\0225\n\007inserts\030\003 \001(\0132\".gr" "eptime.v1.region.InsertRequestsH\000\0225\n\007del" @@ -595,52 +618,54 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P "region.AlterRequestH\000\0221\n\005flush\030\n \001(\0132 .g" "reptime.v1.region.FlushRequestH\000\0225\n\007comp" "act\030\013 \001(\0132\".greptime.v1.region.CompactRe" - "questH\000B\006\n\004body\"T\n\016RegionResponse\022+\n\006hea" - "der\030\001 \001(\0132\033.greptime.v1.ResponseHeader\022\025" - "\n\raffected_rows\030\002 \001(\004\"E\n\016InsertRequests\022" - "3\n\010requests\030\001 \003(\0132!.greptime.v1.region.I" - "nsertRequest\"E\n\016DeleteRequests\0223\n\010reques" - "ts\030\001 \003(\0132!.greptime.v1.region.DeleteRequ" - "est\"C\n\rInsertRequest\022\021\n\tregion_id\030\001 \001(\004\022" - "\037\n\004rows\030\002 \001(\0132\021.greptime.v1.Rows\"C\n\rDele" - "teRequest\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 \001" - "(\0132\021.greptime.v1.Rows\"h\n\014QueryRequest\0227\n" - "\006header\030\001 \001(\0132\'.greptime.v1.region.Regio" - "nRequestHeader\022\021\n\tregion_id\030\002 \001(\004\022\014\n\004pla" - "n\030\003 \001(\014\"\200\002\n\rCreateRequest\022\021\n\tregion_id\030\001" - " \001(\004\022\016\n\006engine\030\002 \001(\t\0228\n\013column_defs\030\003 \003(" - "\0132#.greptime.v1.region.RegionColumnDef\022\023" - "\n\013primary_key\030\004 \003(\r\022\014\n\004path\030\005 \001(\t\022\?\n\007opt" - "ions\030\006 \003(\0132..greptime.v1.region.CreateRe" - "quest.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003ke" - "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\" \n\013DropReques" - "t\022\021\n\tregion_id\030\001 \001(\004\"\255\001\n\013OpenRequest\022\021\n\t" - "region_id\030\001 \001(\004\022\016\n\006engine\030\002 \001(\t\022\014\n\004path\030" - "\003 \001(\t\022=\n\007options\030\004 \003(\0132,.greptime.v1.reg" - "ion.OpenRequest.OptionsEntry\032.\n\014OptionsE" - "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"!\n\014" - "CloseRequest\022\021\n\tregion_id\030\001 \001(\004\"\261\001\n\014Alte" - "rRequest\022\021\n\tregion_id\030\001 \001(\004\0225\n\013add_colum" - "ns\030\002 \001(\0132\036.greptime.v1.region.AddColumns" - "H\000\0227\n\014drop_columns\030\003 \001(\0132\037.greptime.v1.r" - "egion.DropColumnsH\000\022\026\n\016schema_version\030\004 " - "\001(\004B\006\n\004kind\"@\n\nAddColumns\0222\n\013add_columns" - "\030\001 \003(\0132\035.greptime.v1.region.AddColumn\"C\n" - "\013DropColumns\0224\n\014drop_columns\030\001 \003(\0132\036.gre" - "ptime.v1.region.DropColumn\"v\n\tAddColumn\022" - "7\n\ncolumn_def\030\001 \001(\0132#.greptime.v1.region" - ".RegionColumnDef\0220\n\010location\030\003 \001(\0132\036.gre" - "ptime.v1.AddColumnLocation\"\032\n\nDropColumn" - "\022\014\n\004name\030\001 \001(\t\"!\n\014FlushRequest\022\021\n\tregion" - "_id\030\001 \001(\004\"#\n\016CompactRequest\022\021\n\tregion_id" - "\030\001 \001(\004\"P\n\017RegionColumnDef\022*\n\ncolumn_def\030" - "\001 \001(\0132\026.greptime.v1.ColumnDef\022\021\n\tcolumn_" - "id\030\002 \001(\r2Y\n\006Region\022O\n\006Handle\022!.greptime." - "v1.region.RegionRequest\032\".greptime.v1.re" - "gion.RegionResponseB]\n\025io.greptime.v1.re" - "gionB\006ServerZ_impl_.body_.compact_; } +const ::greptime::v1::region::TruncateRequest& +RegionRequest::_Internal::truncate(const RegionRequest* msg) { + return *msg->_impl_.body_.truncate_; +} void RegionRequest::set_allocated_inserts(::greptime::v1::region::InsertRequests* inserts) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_body(); @@ -1068,6 +1098,21 @@ void RegionRequest::set_allocated_compact(::greptime::v1::region::CompactRequest } // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.compact) } +void RegionRequest::set_allocated_truncate(::greptime::v1::region::TruncateRequest* truncate) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_body(); + if (truncate) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(truncate); + if (message_arena != submessage_arena) { + truncate = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, truncate, submessage_arena); + } + set_has_truncate(); + _impl_.body_.truncate_ = truncate; + } + // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.truncate) +} RegionRequest::RegionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { @@ -1134,6 +1179,11 @@ RegionRequest::RegionRequest(const RegionRequest& from) from._internal_compact()); break; } + case kTruncate: { + _this->_internal_mutable_truncate()->::greptime::v1::region::TruncateRequest::MergeFrom( + from._internal_truncate()); + break; + } case BODY_NOT_SET: { break; } @@ -1232,6 +1282,12 @@ void RegionRequest::clear_body() { } break; } + case kTruncate: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.body_.truncate_; + } + break; + } case BODY_NOT_SET: { break; } @@ -1340,6 +1396,14 @@ const char* RegionRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; + // .greptime.v1.region.TruncateRequest truncate = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 98)) { + ptr = ctx->ParseMessage(_internal_mutable_truncate(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -1439,6 +1503,13 @@ uint8_t* RegionRequest::_InternalSerialize( _Internal::compact(this).GetCachedSize(), target, stream); } + // .greptime.v1.region.TruncateRequest truncate = 12; + if (_internal_has_truncate()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(12, _Internal::truncate(this), + _Internal::truncate(this).GetCachedSize(), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -1526,6 +1597,13 @@ size_t RegionRequest::ByteSizeLong() const { *_impl_.body_.compact_); break; } + // .greptime.v1.region.TruncateRequest truncate = 12; + case kTruncate: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.body_.truncate_); + break; + } case BODY_NOT_SET: { break; } @@ -1598,6 +1676,11 @@ void RegionRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: from._internal_compact()); break; } + case kTruncate: { + _this->_internal_mutable_truncate()->::greptime::v1::region::TruncateRequest::MergeFrom( + from._internal_truncate()); + break; + } case BODY_NOT_SET: { break; } @@ -5658,6 +5741,184 @@ ::PROTOBUF_NAMESPACE_ID::Metadata CompactRequest::GetMetadata() const { // =================================================================== +class TruncateRequest::_Internal { + public: +}; + +TruncateRequest::TruncateRequest(::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.region.TruncateRequest) +} +TruncateRequest::TruncateRequest(const TruncateRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + TruncateRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.region_id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.region_id_ = from._impl_.region_id_; + // @@protoc_insertion_point(copy_constructor:greptime.v1.region.TruncateRequest) +} + +inline void TruncateRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.region_id_){uint64_t{0u}} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +TruncateRequest::~TruncateRequest() { + // @@protoc_insertion_point(destructor:greptime.v1.region.TruncateRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void TruncateRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void TruncateRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void TruncateRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.region.TruncateRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.region_id_ = uint64_t{0u}; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* TruncateRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint64 region_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.region_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* TruncateRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.region.TruncateRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint64 region_id = 1; + if (this->_internal_region_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_region_id(), 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.region.TruncateRequest) + return target; +} + +size_t TruncateRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.region.TruncateRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint64 region_id = 1; + if (this->_internal_region_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_region_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TruncateRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + TruncateRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TruncateRequest::GetClassData() const { return &_class_data_; } + + +void TruncateRequest::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.region.TruncateRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_region_id() != 0) { + _this->_internal_set_region_id(from._internal_region_id()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void TruncateRequest::CopyFrom(const TruncateRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.region.TruncateRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TruncateRequest::IsInitialized() const { + return true; +} + +void TruncateRequest::InternalSwap(TruncateRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.region_id_, other->_impl_.region_id_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata TruncateRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, + file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[21]); +} + +// =================================================================== + class RegionColumnDef::_Internal { public: static const ::greptime::v1::ColumnDef& column_def(const RegionColumnDef* msg); @@ -5883,7 +6144,7 @@ void RegionColumnDef::InternalSwap(RegionColumnDef* other) { ::PROTOBUF_NAMESPACE_ID::Metadata RegionColumnDef::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, - file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[21]); + file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[22]); } // @@protoc_insertion_point(namespace_scope) @@ -5975,6 +6236,10 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::region::CompactRequest* Arena::CreateMaybeMessage< ::greptime::v1::region::CompactRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::region::CompactRequest >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::region::TruncateRequest* +Arena::CreateMaybeMessage< ::greptime::v1::region::TruncateRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::region::TruncateRequest >(arena); +} template<> PROTOBUF_NOINLINE ::greptime::v1::region::RegionColumnDef* Arena::CreateMaybeMessage< ::greptime::v1::region::RegionColumnDef >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::region::RegionColumnDef >(arena); diff --git a/c++/greptime/v1/region/server.pb.h b/c++/greptime/v1/region/server.pb.h index 50dc9e13..b0cce36b 100644 --- a/c++/greptime/v1/region/server.pb.h +++ b/c++/greptime/v1/region/server.pb.h @@ -119,6 +119,9 @@ extern RegionRequestHeaderDefaultTypeInternal _RegionRequestHeader_default_insta class RegionResponse; struct RegionResponseDefaultTypeInternal; extern RegionResponseDefaultTypeInternal _RegionResponse_default_instance_; +class TruncateRequest; +struct TruncateRequestDefaultTypeInternal; +extern TruncateRequestDefaultTypeInternal _TruncateRequest_default_instance_; } // namespace region } // namespace v1 } // namespace greptime @@ -145,6 +148,7 @@ template<> ::greptime::v1::region::RegionColumnDef* Arena::CreateMaybeMessage<:: template<> ::greptime::v1::region::RegionRequest* Arena::CreateMaybeMessage<::greptime::v1::region::RegionRequest>(Arena*); template<> ::greptime::v1::region::RegionRequestHeader* Arena::CreateMaybeMessage<::greptime::v1::region::RegionRequestHeader>(Arena*); template<> ::greptime::v1::region::RegionResponse* Arena::CreateMaybeMessage<::greptime::v1::region::RegionResponse>(Arena*); +template<> ::greptime::v1::region::TruncateRequest* Arena::CreateMaybeMessage<::greptime::v1::region::TruncateRequest>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace greptime { namespace v1 { @@ -364,6 +368,7 @@ class RegionRequest final : kAlter = 9, kFlush = 10, kCompact = 11, + kTruncate = 12, BODY_NOT_SET = 0, }; @@ -455,6 +460,7 @@ class RegionRequest final : kAlterFieldNumber = 9, kFlushFieldNumber = 10, kCompactFieldNumber = 11, + kTruncateFieldNumber = 12, }; // .greptime.v1.region.RegionRequestHeader header = 1; bool has_header() const; @@ -636,6 +642,24 @@ class RegionRequest final : ::greptime::v1::region::CompactRequest* compact); ::greptime::v1::region::CompactRequest* unsafe_arena_release_compact(); + // .greptime.v1.region.TruncateRequest truncate = 12; + bool has_truncate() const; + private: + bool _internal_has_truncate() const; + public: + void clear_truncate(); + const ::greptime::v1::region::TruncateRequest& truncate() const; + PROTOBUF_NODISCARD ::greptime::v1::region::TruncateRequest* release_truncate(); + ::greptime::v1::region::TruncateRequest* mutable_truncate(); + void set_allocated_truncate(::greptime::v1::region::TruncateRequest* truncate); + private: + const ::greptime::v1::region::TruncateRequest& _internal_truncate() const; + ::greptime::v1::region::TruncateRequest* _internal_mutable_truncate(); + public: + void unsafe_arena_set_allocated_truncate( + ::greptime::v1::region::TruncateRequest* truncate); + ::greptime::v1::region::TruncateRequest* unsafe_arena_release_truncate(); + void clear_body(); BodyCase body_case() const; // @@protoc_insertion_point(class_scope:greptime.v1.region.RegionRequest) @@ -650,6 +674,7 @@ class RegionRequest final : void set_has_alter(); void set_has_flush(); void set_has_compact(); + void set_has_truncate(); inline bool has_body() const; inline void clear_has_body(); @@ -671,6 +696,7 @@ class RegionRequest final : ::greptime::v1::region::AlterRequest* alter_; ::greptime::v1::region::FlushRequest* flush_; ::greptime::v1::region::CompactRequest* compact_; + ::greptime::v1::region::TruncateRequest* truncate_; } body_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[1]; @@ -3650,6 +3676,154 @@ class CompactRequest final : }; // ------------------------------------------------------------------- +class TruncateRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.region.TruncateRequest) */ { + public: + inline TruncateRequest() : TruncateRequest(nullptr) {} + ~TruncateRequest() override; + explicit PROTOBUF_CONSTEXPR TruncateRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TruncateRequest(const TruncateRequest& from); + TruncateRequest(TruncateRequest&& from) noexcept + : TruncateRequest() { + *this = ::std::move(from); + } + + inline TruncateRequest& operator=(const TruncateRequest& from) { + CopyFrom(from); + return *this; + } + inline TruncateRequest& operator=(TruncateRequest&& 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 TruncateRequest& default_instance() { + return *internal_default_instance(); + } + static inline const TruncateRequest* internal_default_instance() { + return reinterpret_cast( + &_TruncateRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(TruncateRequest& a, TruncateRequest& b) { + a.Swap(&b); + } + inline void Swap(TruncateRequest* 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(TruncateRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TruncateRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TruncateRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const TruncateRequest& from) { + TruncateRequest::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(TruncateRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.region.TruncateRequest"; + } + protected: + explicit TruncateRequest(::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 { + kRegionIdFieldNumber = 1, + }; + // uint64 region_id = 1; + void clear_region_id(); + uint64_t region_id() const; + void set_region_id(uint64_t value); + private: + uint64_t _internal_region_id() const; + void _internal_set_region_id(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.region.TruncateRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + uint64_t region_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2fregion_2fserver_2eproto; +}; +// ------------------------------------------------------------------- + class RegionColumnDef final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.region.RegionColumnDef) */ { public: @@ -3698,7 +3872,7 @@ class RegionColumnDef final : &_RegionColumnDef_default_instance_); } static constexpr int kIndexInFileMessages = - 21; + 22; friend void swap(RegionColumnDef& a, RegionColumnDef& b) { a.Swap(&b); @@ -4627,6 +4801,80 @@ inline ::greptime::v1::region::CompactRequest* RegionRequest::mutable_compact() return _msg; } +// .greptime.v1.region.TruncateRequest truncate = 12; +inline bool RegionRequest::_internal_has_truncate() const { + return body_case() == kTruncate; +} +inline bool RegionRequest::has_truncate() const { + return _internal_has_truncate(); +} +inline void RegionRequest::set_has_truncate() { + _impl_._oneof_case_[0] = kTruncate; +} +inline void RegionRequest::clear_truncate() { + if (_internal_has_truncate()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.body_.truncate_; + } + clear_has_body(); + } +} +inline ::greptime::v1::region::TruncateRequest* RegionRequest::release_truncate() { + // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.truncate) + if (_internal_has_truncate()) { + clear_has_body(); + ::greptime::v1::region::TruncateRequest* temp = _impl_.body_.truncate_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.truncate_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::greptime::v1::region::TruncateRequest& RegionRequest::_internal_truncate() const { + return _internal_has_truncate() + ? *_impl_.body_.truncate_ + : reinterpret_cast< ::greptime::v1::region::TruncateRequest&>(::greptime::v1::region::_TruncateRequest_default_instance_); +} +inline const ::greptime::v1::region::TruncateRequest& RegionRequest::truncate() const { + // @@protoc_insertion_point(field_get:greptime.v1.region.RegionRequest.truncate) + return _internal_truncate(); +} +inline ::greptime::v1::region::TruncateRequest* RegionRequest::unsafe_arena_release_truncate() { + // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.truncate) + if (_internal_has_truncate()) { + clear_has_body(); + ::greptime::v1::region::TruncateRequest* temp = _impl_.body_.truncate_; + _impl_.body_.truncate_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void RegionRequest::unsafe_arena_set_allocated_truncate(::greptime::v1::region::TruncateRequest* truncate) { + clear_body(); + if (truncate) { + set_has_truncate(); + _impl_.body_.truncate_ = truncate; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.truncate) +} +inline ::greptime::v1::region::TruncateRequest* RegionRequest::_internal_mutable_truncate() { + if (!_internal_has_truncate()) { + clear_body(); + set_has_truncate(); + _impl_.body_.truncate_ = CreateMaybeMessage< ::greptime::v1::region::TruncateRequest >(GetArenaForAllocation()); + } + return _impl_.body_.truncate_; +} +inline ::greptime::v1::region::TruncateRequest* RegionRequest::mutable_truncate() { + ::greptime::v1::region::TruncateRequest* _msg = _internal_mutable_truncate(); + // @@protoc_insertion_point(field_mutable:greptime.v1.region.RegionRequest.truncate) + return _msg; +} + inline bool RegionRequest::has_body() const { return body_case() != BODY_NOT_SET; } @@ -6232,6 +6480,30 @@ inline void CompactRequest::set_region_id(uint64_t value) { // ------------------------------------------------------------------- +// TruncateRequest + +// uint64 region_id = 1; +inline void TruncateRequest::clear_region_id() { + _impl_.region_id_ = uint64_t{0u}; +} +inline uint64_t TruncateRequest::_internal_region_id() const { + return _impl_.region_id_; +} +inline uint64_t TruncateRequest::region_id() const { + // @@protoc_insertion_point(field_get:greptime.v1.region.TruncateRequest.region_id) + return _internal_region_id(); +} +inline void TruncateRequest::_internal_set_region_id(uint64_t value) { + + _impl_.region_id_ = value; +} +inline void TruncateRequest::set_region_id(uint64_t value) { + _internal_set_region_id(value); + // @@protoc_insertion_point(field_set:greptime.v1.region.TruncateRequest.region_id) +} + +// ------------------------------------------------------------------- + // RegionColumnDef // .greptime.v1.ColumnDef column_def = 1; @@ -6384,6 +6656,8 @@ inline void RegionColumnDef::set_column_id(uint32_t value) { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/java/src/main/java/io/greptime/v1/region/Server.java b/java/src/main/java/io/greptime/v1/region/Server.java index ec66bea7..9a4b305f 100644 --- a/java/src/main/java/io/greptime/v1/region/Server.java +++ b/java/src/main/java/io/greptime/v1/region/Server.java @@ -770,6 +770,21 @@ public interface RegionRequestOrBuilder extends */ io.greptime.v1.region.Server.CompactRequestOrBuilder getCompactOrBuilder(); + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + * @return Whether the truncate field is set. + */ + boolean hasTruncate(); + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + * @return The truncate. + */ + io.greptime.v1.region.Server.TruncateRequest getTruncate(); + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + */ + io.greptime.v1.region.Server.TruncateRequestOrBuilder getTruncateOrBuilder(); + public io.greptime.v1.region.Server.RegionRequest.BodyCase getBodyCase(); } /** @@ -956,6 +971,20 @@ private RegionRequest( bodyCase_ = 11; break; } + case 98: { + io.greptime.v1.region.Server.TruncateRequest.Builder subBuilder = null; + if (bodyCase_ == 12) { + subBuilder = ((io.greptime.v1.region.Server.TruncateRequest) body_).toBuilder(); + } + body_ = + input.readMessage(io.greptime.v1.region.Server.TruncateRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.region.Server.TruncateRequest) body_); + body_ = subBuilder.buildPartial(); + } + bodyCase_ = 12; + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -1004,6 +1033,7 @@ public enum BodyCase ALTER(9), FLUSH(10), COMPACT(11), + TRUNCATE(12), BODY_NOT_SET(0); private final int value; private BodyCase(int value) { @@ -1030,6 +1060,7 @@ public static BodyCase forNumber(int value) { case 9: return ALTER; case 10: return FLUSH; case 11: return COMPACT; + case 12: return TRUNCATE; case 0: return BODY_NOT_SET; default: return null; } @@ -1350,6 +1381,37 @@ public io.greptime.v1.region.Server.CompactRequestOrBuilder getCompactOrBuilder( return io.greptime.v1.region.Server.CompactRequest.getDefaultInstance(); } + public static final int TRUNCATE_FIELD_NUMBER = 12; + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + * @return Whether the truncate field is set. + */ + @java.lang.Override + public boolean hasTruncate() { + return bodyCase_ == 12; + } + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + * @return The truncate. + */ + @java.lang.Override + public io.greptime.v1.region.Server.TruncateRequest getTruncate() { + if (bodyCase_ == 12) { + return (io.greptime.v1.region.Server.TruncateRequest) body_; + } + return io.greptime.v1.region.Server.TruncateRequest.getDefaultInstance(); + } + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + */ + @java.lang.Override + public io.greptime.v1.region.Server.TruncateRequestOrBuilder getTruncateOrBuilder() { + if (bodyCase_ == 12) { + return (io.greptime.v1.region.Server.TruncateRequest) body_; + } + return io.greptime.v1.region.Server.TruncateRequest.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -1394,6 +1456,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (bodyCase_ == 11) { output.writeMessage(11, (io.greptime.v1.region.Server.CompactRequest) body_); } + if (bodyCase_ == 12) { + output.writeMessage(12, (io.greptime.v1.region.Server.TruncateRequest) body_); + } unknownFields.writeTo(output); } @@ -1443,6 +1508,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, (io.greptime.v1.region.Server.CompactRequest) body_); } + if (bodyCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (io.greptime.v1.region.Server.TruncateRequest) body_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1501,6 +1570,10 @@ public boolean equals(final java.lang.Object obj) { if (!getCompact() .equals(other.getCompact())) return false; break; + case 12: + if (!getTruncate() + .equals(other.getTruncate())) return false; + break; case 0: default: } @@ -1556,6 +1629,10 @@ public int hashCode() { hash = (37 * hash) + COMPACT_FIELD_NUMBER; hash = (53 * hash) + getCompact().hashCode(); break; + case 12: + hash = (37 * hash) + TRUNCATE_FIELD_NUMBER; + hash = (53 * hash) + getTruncate().hashCode(); + break; case 0: default: } @@ -1794,6 +1871,13 @@ public io.greptime.v1.region.Server.RegionRequest buildPartial() { result.body_ = compactBuilder_.build(); } } + if (bodyCase_ == 12) { + if (truncateBuilder_ == null) { + result.body_ = body_; + } else { + result.body_ = truncateBuilder_.build(); + } + } result.bodyCase_ = bodyCase_; onBuilt(); return result; @@ -1883,6 +1967,10 @@ public Builder mergeFrom(io.greptime.v1.region.Server.RegionRequest other) { mergeCompact(other.getCompact()); break; } + case TRUNCATE: { + mergeTruncate(other.getTruncate()); + break; + } case BODY_NOT_SET: { break; } @@ -3327,6 +3415,148 @@ public io.greptime.v1.region.Server.CompactRequestOrBuilder getCompactOrBuilder( onChanged();; return compactBuilder_; } + + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.region.Server.TruncateRequest, io.greptime.v1.region.Server.TruncateRequest.Builder, io.greptime.v1.region.Server.TruncateRequestOrBuilder> truncateBuilder_; + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + * @return Whether the truncate field is set. + */ + @java.lang.Override + public boolean hasTruncate() { + return bodyCase_ == 12; + } + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + * @return The truncate. + */ + @java.lang.Override + public io.greptime.v1.region.Server.TruncateRequest getTruncate() { + if (truncateBuilder_ == null) { + if (bodyCase_ == 12) { + return (io.greptime.v1.region.Server.TruncateRequest) body_; + } + return io.greptime.v1.region.Server.TruncateRequest.getDefaultInstance(); + } else { + if (bodyCase_ == 12) { + return truncateBuilder_.getMessage(); + } + return io.greptime.v1.region.Server.TruncateRequest.getDefaultInstance(); + } + } + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + */ + public Builder setTruncate(io.greptime.v1.region.Server.TruncateRequest value) { + if (truncateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + onChanged(); + } else { + truncateBuilder_.setMessage(value); + } + bodyCase_ = 12; + return this; + } + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + */ + public Builder setTruncate( + io.greptime.v1.region.Server.TruncateRequest.Builder builderForValue) { + if (truncateBuilder_ == null) { + body_ = builderForValue.build(); + onChanged(); + } else { + truncateBuilder_.setMessage(builderForValue.build()); + } + bodyCase_ = 12; + return this; + } + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + */ + public Builder mergeTruncate(io.greptime.v1.region.Server.TruncateRequest value) { + if (truncateBuilder_ == null) { + if (bodyCase_ == 12 && + body_ != io.greptime.v1.region.Server.TruncateRequest.getDefaultInstance()) { + body_ = io.greptime.v1.region.Server.TruncateRequest.newBuilder((io.greptime.v1.region.Server.TruncateRequest) body_) + .mergeFrom(value).buildPartial(); + } else { + body_ = value; + } + onChanged(); + } else { + if (bodyCase_ == 12) { + truncateBuilder_.mergeFrom(value); + } else { + truncateBuilder_.setMessage(value); + } + } + bodyCase_ = 12; + return this; + } + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + */ + public Builder clearTruncate() { + if (truncateBuilder_ == null) { + if (bodyCase_ == 12) { + bodyCase_ = 0; + body_ = null; + onChanged(); + } + } else { + if (bodyCase_ == 12) { + bodyCase_ = 0; + body_ = null; + } + truncateBuilder_.clear(); + } + return this; + } + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + */ + public io.greptime.v1.region.Server.TruncateRequest.Builder getTruncateBuilder() { + return getTruncateFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + */ + @java.lang.Override + public io.greptime.v1.region.Server.TruncateRequestOrBuilder getTruncateOrBuilder() { + if ((bodyCase_ == 12) && (truncateBuilder_ != null)) { + return truncateBuilder_.getMessageOrBuilder(); + } else { + if (bodyCase_ == 12) { + return (io.greptime.v1.region.Server.TruncateRequest) body_; + } + return io.greptime.v1.region.Server.TruncateRequest.getDefaultInstance(); + } + } + /** + * .greptime.v1.region.TruncateRequest truncate = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.region.Server.TruncateRequest, io.greptime.v1.region.Server.TruncateRequest.Builder, io.greptime.v1.region.Server.TruncateRequestOrBuilder> + getTruncateFieldBuilder() { + if (truncateBuilder_ == null) { + if (!(bodyCase_ == 12)) { + body_ = io.greptime.v1.region.Server.TruncateRequest.getDefaultInstance(); + } + truncateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.region.Server.TruncateRequest, io.greptime.v1.region.Server.TruncateRequest.Builder, io.greptime.v1.region.Server.TruncateRequestOrBuilder>( + (io.greptime.v1.region.Server.TruncateRequest) body_, + getParentForChildren(), + isClean()); + body_ = null; + } + bodyCase_ = 12; + onChanged();; + return truncateBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -17137,58 +17367,36 @@ public io.greptime.v1.region.Server.CompactRequest getDefaultInstanceForType() { } - public interface RegionColumnDefOrBuilder extends - // @@protoc_insertion_point(interface_extends:greptime.v1.region.RegionColumnDef) + public interface TruncateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.region.TruncateRequest) com.google.protobuf.MessageOrBuilder { /** - * .greptime.v1.ColumnDef column_def = 1; - * @return Whether the columnDef field is set. - */ - boolean hasColumnDef(); - /** - * .greptime.v1.ColumnDef column_def = 1; - * @return The columnDef. - */ - io.greptime.v1.Ddl.ColumnDef getColumnDef(); - /** - * .greptime.v1.ColumnDef column_def = 1; - */ - io.greptime.v1.Ddl.ColumnDefOrBuilder getColumnDefOrBuilder(); - - /** - * uint32 column_id = 2; - * @return The columnId. + * uint64 region_id = 1; + * @return The regionId. */ - int getColumnId(); + long getRegionId(); } /** - *
-   * The column definition of a region. Unlike the message `ColumnDef` in
-   * `ddl.proto` which is for clients outside GreptimeDB, this `RegionColumnDef`
-   * is for region requests use only. So it carries an extra field `column_id`
-   * that is known internally.
-   * 
- * - * Protobuf type {@code greptime.v1.region.RegionColumnDef} + * Protobuf type {@code greptime.v1.region.TruncateRequest} */ - public static final class RegionColumnDef extends + public static final class TruncateRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:greptime.v1.region.RegionColumnDef) - RegionColumnDefOrBuilder { + // @@protoc_insertion_point(message_implements:greptime.v1.region.TruncateRequest) + TruncateRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use RegionColumnDef.newBuilder() to construct. - private RegionColumnDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use TruncateRequest.newBuilder() to construct. + private TruncateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private RegionColumnDef() { + private TruncateRequest() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new RegionColumnDef(); + return new TruncateRequest(); } @java.lang.Override @@ -17196,7 +17404,7 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private RegionColumnDef( + private TruncateRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -17214,22 +17422,9 @@ private RegionColumnDef( case 0: done = true; break; - case 10: { - io.greptime.v1.Ddl.ColumnDef.Builder subBuilder = null; - if (columnDef_ != null) { - subBuilder = columnDef_.toBuilder(); - } - columnDef_ = input.readMessage(io.greptime.v1.Ddl.ColumnDef.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(columnDef_); - columnDef_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { + case 8: { - columnId_ = input.readUInt32(); + regionId_ = input.readUInt64(); break; } default: { @@ -17255,52 +17450,26 @@ private RegionColumnDef( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.greptime.v1.region.Server.internal_static_greptime_v1_region_RegionColumnDef_descriptor; + return io.greptime.v1.region.Server.internal_static_greptime_v1_region_TruncateRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.greptime.v1.region.Server.internal_static_greptime_v1_region_RegionColumnDef_fieldAccessorTable + return io.greptime.v1.region.Server.internal_static_greptime_v1_region_TruncateRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.greptime.v1.region.Server.RegionColumnDef.class, io.greptime.v1.region.Server.RegionColumnDef.Builder.class); - } - - public static final int COLUMN_DEF_FIELD_NUMBER = 1; - private io.greptime.v1.Ddl.ColumnDef columnDef_; - /** - * .greptime.v1.ColumnDef column_def = 1; - * @return Whether the columnDef field is set. - */ - @java.lang.Override - public boolean hasColumnDef() { - return columnDef_ != null; - } - /** - * .greptime.v1.ColumnDef column_def = 1; - * @return The columnDef. - */ - @java.lang.Override - public io.greptime.v1.Ddl.ColumnDef getColumnDef() { - return columnDef_ == null ? io.greptime.v1.Ddl.ColumnDef.getDefaultInstance() : columnDef_; - } - /** - * .greptime.v1.ColumnDef column_def = 1; - */ - @java.lang.Override - public io.greptime.v1.Ddl.ColumnDefOrBuilder getColumnDefOrBuilder() { - return getColumnDef(); + io.greptime.v1.region.Server.TruncateRequest.class, io.greptime.v1.region.Server.TruncateRequest.Builder.class); } - public static final int COLUMN_ID_FIELD_NUMBER = 2; - private int columnId_; + public static final int REGION_ID_FIELD_NUMBER = 1; + private long regionId_; /** - * uint32 column_id = 2; - * @return The columnId. + * uint64 region_id = 1; + * @return The regionId. */ @java.lang.Override - public int getColumnId() { - return columnId_; + public long getRegionId() { + return regionId_; } private byte memoizedIsInitialized = -1; @@ -17317,11 +17486,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (columnDef_ != null) { - output.writeMessage(1, getColumnDef()); - } - if (columnId_ != 0) { - output.writeUInt32(2, columnId_); + if (regionId_ != 0L) { + output.writeUInt64(1, regionId_); } unknownFields.writeTo(output); } @@ -17332,13 +17498,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (columnDef_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getColumnDef()); - } - if (columnId_ != 0) { + if (regionId_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, columnId_); + .computeUInt64Size(1, regionId_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -17350,18 +17512,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof io.greptime.v1.region.Server.RegionColumnDef)) { + if (!(obj instanceof io.greptime.v1.region.Server.TruncateRequest)) { return super.equals(obj); } - io.greptime.v1.region.Server.RegionColumnDef other = (io.greptime.v1.region.Server.RegionColumnDef) obj; + io.greptime.v1.region.Server.TruncateRequest other = (io.greptime.v1.region.Server.TruncateRequest) obj; - if (hasColumnDef() != other.hasColumnDef()) return false; - if (hasColumnDef()) { - if (!getColumnDef() - .equals(other.getColumnDef())) return false; - } - if (getColumnId() - != other.getColumnId()) return false; + if (getRegionId() + != other.getRegionId()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -17373,40 +17530,604 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasColumnDef()) { - hash = (37 * hash) + COLUMN_DEF_FIELD_NUMBER; - hash = (53 * hash) + getColumnDef().hashCode(); - } - hash = (37 * hash) + COLUMN_ID_FIELD_NUMBER; - hash = (53 * hash) + getColumnId(); + hash = (37 * hash) + REGION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRegionId()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static io.greptime.v1.region.Server.RegionColumnDef parseFrom( + public static io.greptime.v1.region.Server.TruncateRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.greptime.v1.region.Server.RegionColumnDef parseFrom( + public static io.greptime.v1.region.Server.TruncateRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.greptime.v1.region.Server.RegionColumnDef parseFrom( + public static io.greptime.v1.region.Server.TruncateRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.greptime.v1.region.Server.RegionColumnDef parseFrom( + public static io.greptime.v1.region.Server.TruncateRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.greptime.v1.region.Server.RegionColumnDef parseFrom(byte[] data) + public static io.greptime.v1.region.Server.TruncateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.region.Server.TruncateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.region.Server.TruncateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.region.Server.TruncateRequest 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 io.greptime.v1.region.Server.TruncateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.region.Server.TruncateRequest 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 io.greptime.v1.region.Server.TruncateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.region.Server.TruncateRequest 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(io.greptime.v1.region.Server.TruncateRequest 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.region.TruncateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.region.TruncateRequest) + io.greptime.v1.region.Server.TruncateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.region.Server.internal_static_greptime_v1_region_TruncateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.region.Server.internal_static_greptime_v1_region_TruncateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.region.Server.TruncateRequest.class, io.greptime.v1.region.Server.TruncateRequest.Builder.class); + } + + // Construct using io.greptime.v1.region.Server.TruncateRequest.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(); + regionId_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.region.Server.internal_static_greptime_v1_region_TruncateRequest_descriptor; + } + + @java.lang.Override + public io.greptime.v1.region.Server.TruncateRequest getDefaultInstanceForType() { + return io.greptime.v1.region.Server.TruncateRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.region.Server.TruncateRequest build() { + io.greptime.v1.region.Server.TruncateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.region.Server.TruncateRequest buildPartial() { + io.greptime.v1.region.Server.TruncateRequest result = new io.greptime.v1.region.Server.TruncateRequest(this); + result.regionId_ = regionId_; + 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 io.greptime.v1.region.Server.TruncateRequest) { + return mergeFrom((io.greptime.v1.region.Server.TruncateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.region.Server.TruncateRequest other) { + if (other == io.greptime.v1.region.Server.TruncateRequest.getDefaultInstance()) return this; + if (other.getRegionId() != 0L) { + setRegionId(other.getRegionId()); + } + 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 { + io.greptime.v1.region.Server.TruncateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.region.Server.TruncateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long regionId_ ; + /** + * uint64 region_id = 1; + * @return The regionId. + */ + @java.lang.Override + public long getRegionId() { + return regionId_; + } + /** + * uint64 region_id = 1; + * @param value The regionId to set. + * @return This builder for chaining. + */ + public Builder setRegionId(long value) { + + regionId_ = value; + onChanged(); + return this; + } + /** + * uint64 region_id = 1; + * @return This builder for chaining. + */ + public Builder clearRegionId() { + + regionId_ = 0L; + 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.region.TruncateRequest) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.region.TruncateRequest) + private static final io.greptime.v1.region.Server.TruncateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.region.Server.TruncateRequest(); + } + + public static io.greptime.v1.region.Server.TruncateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TruncateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TruncateRequest(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 io.greptime.v1.region.Server.TruncateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RegionColumnDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.region.RegionColumnDef) + com.google.protobuf.MessageOrBuilder { + + /** + * .greptime.v1.ColumnDef column_def = 1; + * @return Whether the columnDef field is set. + */ + boolean hasColumnDef(); + /** + * .greptime.v1.ColumnDef column_def = 1; + * @return The columnDef. + */ + io.greptime.v1.Ddl.ColumnDef getColumnDef(); + /** + * .greptime.v1.ColumnDef column_def = 1; + */ + io.greptime.v1.Ddl.ColumnDefOrBuilder getColumnDefOrBuilder(); + + /** + * uint32 column_id = 2; + * @return The columnId. + */ + int getColumnId(); + } + /** + *
+   * The column definition of a region. Unlike the message `ColumnDef` in
+   * `ddl.proto` which is for clients outside GreptimeDB, this `RegionColumnDef`
+   * is for region requests use only. So it carries an extra field `column_id`
+   * that is known internally.
+   * 
+ * + * Protobuf type {@code greptime.v1.region.RegionColumnDef} + */ + public static final class RegionColumnDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.region.RegionColumnDef) + RegionColumnDefOrBuilder { + private static final long serialVersionUID = 0L; + // Use RegionColumnDef.newBuilder() to construct. + private RegionColumnDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RegionColumnDef() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RegionColumnDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RegionColumnDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.greptime.v1.Ddl.ColumnDef.Builder subBuilder = null; + if (columnDef_ != null) { + subBuilder = columnDef_.toBuilder(); + } + columnDef_ = input.readMessage(io.greptime.v1.Ddl.ColumnDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(columnDef_); + columnDef_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + columnId_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.region.Server.internal_static_greptime_v1_region_RegionColumnDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.region.Server.internal_static_greptime_v1_region_RegionColumnDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.region.Server.RegionColumnDef.class, io.greptime.v1.region.Server.RegionColumnDef.Builder.class); + } + + public static final int COLUMN_DEF_FIELD_NUMBER = 1; + private io.greptime.v1.Ddl.ColumnDef columnDef_; + /** + * .greptime.v1.ColumnDef column_def = 1; + * @return Whether the columnDef field is set. + */ + @java.lang.Override + public boolean hasColumnDef() { + return columnDef_ != null; + } + /** + * .greptime.v1.ColumnDef column_def = 1; + * @return The columnDef. + */ + @java.lang.Override + public io.greptime.v1.Ddl.ColumnDef getColumnDef() { + return columnDef_ == null ? io.greptime.v1.Ddl.ColumnDef.getDefaultInstance() : columnDef_; + } + /** + * .greptime.v1.ColumnDef column_def = 1; + */ + @java.lang.Override + public io.greptime.v1.Ddl.ColumnDefOrBuilder getColumnDefOrBuilder() { + return getColumnDef(); + } + + public static final int COLUMN_ID_FIELD_NUMBER = 2; + private int columnId_; + /** + * uint32 column_id = 2; + * @return The columnId. + */ + @java.lang.Override + public int getColumnId() { + return columnId_; + } + + 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 (columnDef_ != null) { + output.writeMessage(1, getColumnDef()); + } + if (columnId_ != 0) { + output.writeUInt32(2, columnId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (columnDef_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getColumnDef()); + } + if (columnId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, columnId_); + } + 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 io.greptime.v1.region.Server.RegionColumnDef)) { + return super.equals(obj); + } + io.greptime.v1.region.Server.RegionColumnDef other = (io.greptime.v1.region.Server.RegionColumnDef) obj; + + if (hasColumnDef() != other.hasColumnDef()) return false; + if (hasColumnDef()) { + if (!getColumnDef() + .equals(other.getColumnDef())) return false; + } + if (getColumnId() + != other.getColumnId()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasColumnDef()) { + hash = (37 * hash) + COLUMN_DEF_FIELD_NUMBER; + hash = (53 * hash) + getColumnDef().hashCode(); + } + hash = (37 * hash) + COLUMN_ID_FIELD_NUMBER; + hash = (53 * hash) + getColumnId(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.region.Server.RegionColumnDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.region.Server.RegionColumnDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.region.Server.RegionColumnDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.region.Server.RegionColumnDef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.region.Server.RegionColumnDef parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } @@ -17949,6 +18670,11 @@ public io.greptime.v1.region.Server.RegionColumnDef getDefaultInstanceForType() private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_region_CompactRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_region_TruncateRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_region_TruncateRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_region_RegionColumnDef_descriptor; private static final @@ -17967,7 +18693,7 @@ public io.greptime.v1.region.Server.RegionColumnDef getDefaultInstanceForType() "ime.v1.region\032\030greptime/v1/common.proto\032" + "\025greptime/v1/row.proto\032\025greptime/v1/ddl." + "proto\"8\n\023RegionRequestHeader\022\020\n\010trace_id" + - "\030\001 \001(\004\022\017\n\007span_id\030\002 \001(\004\"\245\004\n\rRegionReques" + + "\030\001 \001(\004\022\017\n\007span_id\030\002 \001(\004\"\336\004\n\rRegionReques" + "t\0227\n\006header\030\001 \001(\0132\'.greptime.v1.region.R" + "egionRequestHeader\0225\n\007inserts\030\003 \001(\0132\".gr" + "eptime.v1.region.InsertRequestsH\000\0225\n\007del" + @@ -17981,52 +18707,54 @@ public io.greptime.v1.region.Server.RegionColumnDef getDefaultInstanceForType() "region.AlterRequestH\000\0221\n\005flush\030\n \001(\0132 .g" + "reptime.v1.region.FlushRequestH\000\0225\n\007comp" + "act\030\013 \001(\0132\".greptime.v1.region.CompactRe" + - "questH\000B\006\n\004body\"T\n\016RegionResponse\022+\n\006hea" + - "der\030\001 \001(\0132\033.greptime.v1.ResponseHeader\022\025" + - "\n\raffected_rows\030\002 \001(\004\"E\n\016InsertRequests\022" + - "3\n\010requests\030\001 \003(\0132!.greptime.v1.region.I" + - "nsertRequest\"E\n\016DeleteRequests\0223\n\010reques" + - "ts\030\001 \003(\0132!.greptime.v1.region.DeleteRequ" + - "est\"C\n\rInsertRequest\022\021\n\tregion_id\030\001 \001(\004\022" + - "\037\n\004rows\030\002 \001(\0132\021.greptime.v1.Rows\"C\n\rDele" + - "teRequest\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 \001" + - "(\0132\021.greptime.v1.Rows\"h\n\014QueryRequest\0227\n" + - "\006header\030\001 \001(\0132\'.greptime.v1.region.Regio" + - "nRequestHeader\022\021\n\tregion_id\030\002 \001(\004\022\014\n\004pla" + - "n\030\003 \001(\014\"\200\002\n\rCreateRequest\022\021\n\tregion_id\030\001" + - " \001(\004\022\016\n\006engine\030\002 \001(\t\0228\n\013column_defs\030\003 \003(" + - "\0132#.greptime.v1.region.RegionColumnDef\022\023" + - "\n\013primary_key\030\004 \003(\r\022\014\n\004path\030\005 \001(\t\022?\n\007opt" + - "ions\030\006 \003(\0132..greptime.v1.region.CreateRe" + - "quest.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003ke" + - "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\" \n\013DropReques" + - "t\022\021\n\tregion_id\030\001 \001(\004\"\255\001\n\013OpenRequest\022\021\n\t" + - "region_id\030\001 \001(\004\022\016\n\006engine\030\002 \001(\t\022\014\n\004path\030" + - "\003 \001(\t\022=\n\007options\030\004 \003(\0132,.greptime.v1.reg" + - "ion.OpenRequest.OptionsEntry\032.\n\014OptionsE" + - "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"!\n\014" + - "CloseRequest\022\021\n\tregion_id\030\001 \001(\004\"\261\001\n\014Alte" + - "rRequest\022\021\n\tregion_id\030\001 \001(\004\0225\n\013add_colum" + - "ns\030\002 \001(\0132\036.greptime.v1.region.AddColumns" + - "H\000\0227\n\014drop_columns\030\003 \001(\0132\037.greptime.v1.r" + - "egion.DropColumnsH\000\022\026\n\016schema_version\030\004 " + - "\001(\004B\006\n\004kind\"@\n\nAddColumns\0222\n\013add_columns" + - "\030\001 \003(\0132\035.greptime.v1.region.AddColumn\"C\n" + - "\013DropColumns\0224\n\014drop_columns\030\001 \003(\0132\036.gre" + - "ptime.v1.region.DropColumn\"v\n\tAddColumn\022" + - "7\n\ncolumn_def\030\001 \001(\0132#.greptime.v1.region" + - ".RegionColumnDef\0220\n\010location\030\003 \001(\0132\036.gre" + - "ptime.v1.AddColumnLocation\"\032\n\nDropColumn" + - "\022\014\n\004name\030\001 \001(\t\"!\n\014FlushRequest\022\021\n\tregion" + - "_id\030\001 \001(\004\"#\n\016CompactRequest\022\021\n\tregion_id" + - "\030\001 \001(\004\"P\n\017RegionColumnDef\022*\n\ncolumn_def\030" + - "\001 \001(\0132\026.greptime.v1.ColumnDef\022\021\n\tcolumn_" + - "id\030\002 \001(\r2Y\n\006Region\022O\n\006Handle\022!.greptime." + - "v1.region.RegionRequest\032\".greptime.v1.re" + - "gion.RegionResponseB]\n\025io.greptime.v1.re" + - "gionB\006ServerZ