From 754d20f5efdb23d955097f8bcb3160ab9d904fe6 Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" <6406592+v0y4g3r@users.noreply.github.com> Date: Tue, 6 May 2025 17:10:53 +0800 Subject: [PATCH] refactor: add selection to bulk (#232) * feat: add selection field to BulkInsertRequest * add schema section * change bulk request * replace vec with bytes * wip * wip * chore: rebase main * fix: clippy * refactor arrow ipc writes --- build.rs | 10 +- c++/greptime/v1/region/server.pb.cc | 634 ++--- c++/greptime/v1/region/server.pb.h | 748 +++--- .../java/io/greptime/v1/region/Server.java | 2284 ++++++++--------- proto/greptime/v1/region/server.proto | 16 +- 5 files changed, 1805 insertions(+), 1887 deletions(-) diff --git a/build.rs b/build.rs index 2db139b..f7289c8 100644 --- a/build.rs +++ b/build.rs @@ -22,11 +22,19 @@ fn main() { tonic_build::configure() .file_descriptor_set_path(out_dir.join("greptime_grpc_desc.bin")) - .type_attribute(".", "#[derive(::serde::Serialize, ::serde::Deserialize)]") + .type_attribute( + ".greptime.v1.SemanticType", + "#[derive(::serde::Serialize, ::serde::Deserialize)]", + ) + .type_attribute( + ".greptime.v1.meta.Peer", + "#[derive(::serde::Serialize, ::serde::Deserialize)]", + ) .enum_attribute( "region.RegionRequest.body", "#[derive(strum_macros::AsRefStr)]", ) + .bytes([".greptime.v1.region.ArrowIpc"]) .compile_protos( &[ "proto/greptime/v1/database.proto", diff --git a/c++/greptime/v1/region/server.pb.cc b/c++/greptime/v1/region/server.pb.cc index e63aa83..89444ee 100644 --- a/c++/greptime/v1/region/server.pb.cc +++ b/c++/greptime/v1/region/server.pb.cc @@ -430,25 +430,11 @@ struct RegionColumnDefDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionColumnDefDefaultTypeInternal _RegionColumnDef_default_instance_; -PROTOBUF_CONSTEXPR BulkInsertRequests::BulkInsertRequests( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.requests_)*/{} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct BulkInsertRequestsDefaultTypeInternal { - PROTOBUF_CONSTEXPR BulkInsertRequestsDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~BulkInsertRequestsDefaultTypeInternal() {} - union { - BulkInsertRequests _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BulkInsertRequestsDefaultTypeInternal _BulkInsertRequests_default_instance_; PROTOBUF_CONSTEXPR BulkInsertRequest::BulkInsertRequest( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.payload_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_id_)*/uint64_t{0u} - , /*decltype(_impl_.payload_type_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.body_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct BulkInsertRequestDefaultTypeInternal { PROTOBUF_CONSTEXPR BulkInsertRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -458,6 +444,21 @@ struct BulkInsertRequestDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BulkInsertRequestDefaultTypeInternal _BulkInsertRequest_default_instance_; +PROTOBUF_CONSTEXPR ArrowIpc::ArrowIpc( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.schema_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.payload_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.region_id_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ArrowIpcDefaultTypeInternal { + PROTOBUF_CONSTEXPR ArrowIpcDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ArrowIpcDefaultTypeInternal() {} + union { + ArrowIpc _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ArrowIpcDefaultTypeInternal _ArrowIpc_default_instance_; PROTOBUF_CONSTEXPR MitoManifestInfo::MitoManifestInfo( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.data_manifest_version_)*/uint64_t{0u} @@ -504,7 +505,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT } // namespace v1 } // namespace greptime static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[35]; -static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fregion_2fserver_2eproto[1]; +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; const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { @@ -777,21 +778,22 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionColumnDef, _impl_.column_def_), PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionColumnDef, _impl_.column_id_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::BulkInsertRequests, _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::BulkInsertRequests, _impl_.requests_), - ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::region::BulkInsertRequest, _internal_metadata_), ~0u, // no _extensions_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::BulkInsertRequest, _impl_._oneof_case_[0]), + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ::_pbi::kInvalidFieldOffsetTag, + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::BulkInsertRequest, _impl_.body_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ArrowIpc, _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::BulkInsertRequest, _impl_.region_id_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::BulkInsertRequest, _impl_.payload_type_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::BulkInsertRequest, _impl_.payload_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ArrowIpc, _impl_.region_id_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ArrowIpc, _impl_.schema_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ArrowIpc, _impl_.payload_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::region::MitoManifestInfo, _internal_metadata_), ~0u, // no _extensions_ @@ -849,11 +851,11 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 243, -1, -1, sizeof(::greptime::v1::region::CompactRequest)}, { 253, -1, -1, sizeof(::greptime::v1::region::TruncateRequest)}, { 260, -1, -1, sizeof(::greptime::v1::region::RegionColumnDef)}, - { 268, -1, -1, sizeof(::greptime::v1::region::BulkInsertRequests)}, - { 275, -1, -1, sizeof(::greptime::v1::region::BulkInsertRequest)}, - { 284, -1, -1, sizeof(::greptime::v1::region::MitoManifestInfo)}, - { 291, -1, -1, sizeof(::greptime::v1::region::MetricManifestInfo)}, - { 299, -1, -1, sizeof(::greptime::v1::region::SyncRequest)}, + { 268, -1, -1, sizeof(::greptime::v1::region::BulkInsertRequest)}, + { 276, -1, -1, sizeof(::greptime::v1::region::ArrowIpc)}, + { 285, -1, -1, sizeof(::greptime::v1::region::MitoManifestInfo)}, + { 292, -1, -1, sizeof(::greptime::v1::region::MetricManifestInfo)}, + { 300, -1, -1, sizeof(::greptime::v1::region::SyncRequest)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -887,8 +889,8 @@ static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::region::_CompactRequest_default_instance_._instance, &::greptime::v1::region::_TruncateRequest_default_instance_._instance, &::greptime::v1::region::_RegionColumnDef_default_instance_._instance, - &::greptime::v1::region::_BulkInsertRequests_default_instance_._instance, &::greptime::v1::region::_BulkInsertRequest_default_instance_._instance, + &::greptime::v1::region::_ArrowIpc_default_instance_._instance, &::greptime::v1::region::_MitoManifestInfo_default_instance_._instance, &::greptime::v1::region::_MetricManifestInfo_default_instance_._instance, &::greptime::v1::region::_SyncRequest_default_instance_._instance, @@ -903,7 +905,7 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P "onRequestHeader.TracingContextEntry\022\016\n\006d" "bname\030\003 \001(\t\0220\n\rquery_context\030\006 \001(\0132\031.gre" "ptime.v1.QueryContext\0325\n\023TracingContextE" - "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\356\006\n" + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\354\006\n" "\rRegionRequest\0227\n\006header\030\001 \001(\0132\'.greptim" "e.v1.region.RegionRequestHeader\0225\n\007inser" "ts\030\003 \001(\0132\".greptime.v1.region.InsertRequ" @@ -922,90 +924,88 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P "\007creates\030\r \001(\0132\".greptime.v1.region.Crea" "teRequestsH\000\0221\n\005drops\030\016 \001(\0132 .greptime.v" "1.region.DropRequestsH\000\0223\n\006alters\030\017 \001(\0132" - "!.greptime.v1.region.AlterRequestsH\000\022>\n\014" - "bulk_inserts\030\020 \001(\0132&.greptime.v1.region." - "BulkInsertRequestsH\000\022/\n\004sync\030\021 \001(\0132\037.gre" - "ptime.v1.region.SyncRequestH\000B\006\n\004body\"\317\001" - "\n\016RegionResponse\022+\n\006header\030\001 \001(\0132\033.grept" - "ime.v1.ResponseHeader\022\025\n\raffected_rows\030\002" - " \001(\004\022F\n\nextensions\030\003 \003(\01322.greptime.v1.r" - "egion.RegionResponse.ExtensionsEntry\0321\n\017" - "ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - "\001(\014:\0028\001\"E\n\016InsertRequests\0223\n\010requests\030\001 " - "\003(\0132!.greptime.v1.region.InsertRequest\"E" - "\n\016DeleteRequests\0223\n\010requests\030\001 \003(\0132!.gre" - "ptime.v1.region.DeleteRequest\"C\n\rInsertR" - "equest\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 \001(\0132" - "\021.greptime.v1.Rows\"C\n\rDeleteRequest\022\021\n\tr" - "egion_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.RegionRequestHeader" - "\022\021\n\tregion_id\030\002 \001(\004\022\014\n\004plan\030\003 \001(\014\"E\n\016Cre" - "ateRequests\0223\n\010requests\030\001 \003(\0132!.greptime" - ".v1.region.CreateRequest\"\200\002\n\rCreateReque" - "st\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\004" - "path\030\005 \001(\t\022\?\n\007options\030\006 \003(\0132..greptime.v" - "1.region.CreateRequest.OptionsEntry\032.\n\014O" - "ptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - "\0028\001\"A\n\014DropRequests\0221\n\010requests\030\001 \003(\0132\037." - "greptime.v1.region.DropRequest\"3\n\013DropRe" - "quest\022\021\n\tregion_id\030\001 \001(\004\022\021\n\tfast_path\030\002 " - "\001(\010\"\255\001\n\013OpenRequest\022\021\n\tregion_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.region.OpenRequest.O" - "ptionsEntry\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t" - "\022\r\n\005value\030\002 \001(\t:\0028\001\"!\n\014CloseRequest\022\021\n\tr" - "egion_id\030\001 \001(\004\"C\n\rAlterRequests\0222\n\010reque" - "sts\030\001 \003(\0132 .greptime.v1.region.AlterRequ" - "est\"\306\003\n\014AlterRequest\022\021\n\tregion_id\030\001 \001(\004\022" - "5\n\013add_columns\030\002 \001(\0132\036.greptime.v1.regio" - "n.AddColumnsH\000\0227\n\014drop_columns\030\003 \001(\0132\037.g" - "reptime.v1.region.DropColumnsH\000\022=\n\023modif" - "y_column_types\030\005 \001(\0132\036.greptime.v1.Modif" - "yColumnTypesH\000\0229\n\021set_table_options\030\006 \001(" - "\0132\034.greptime.v1.SetTableOptionsH\000\022=\n\023uns" - "et_table_options\030\t \001(\0132\036.greptime.v1.Uns" - "etTableOptionsH\000\022*\n\tset_index\030\n \001(\0132\025.gr" - "eptime.v1.SetIndexH\000\022.\n\013unset_index\030\013 \001(" - "\0132\027.greptime.v1.UnsetIndexH\000\022\026\n\016schema_v" - "ersion\030\004 \001(\004B\006\n\004kind\"@\n\nAddColumns\0222\n\013ad" - "d_columns\030\001 \003(\0132\035.greptime.v1.region.Add" - "Column\"C\n\013DropColumns\0224\n\014drop_columns\030\001 " - "\003(\0132\036.greptime.v1.region.DropColumn\"v\n\tA" - "ddColumn\0227\n\ncolumn_def\030\001 \001(\0132#.greptime." - "v1.region.RegionColumnDef\0220\n\010location\030\003 " - "\001(\0132\036.greptime.v1.AddColumnLocation\"\032\n\nD" - "ropColumn\022\014\n\004name\030\001 \001(\t\"!\n\014FlushRequest\022" - "\021\n\tregion_id\030\001 \001(\004\"\t\n\007Regular\"&\n\014StrictW" - "indow\022\026\n\016window_seconds\030\001 \001(\003\"\231\001\n\016Compac" - "tRequest\022\021\n\tregion_id\030\001 \001(\004\022.\n\007regular\030\002" - " \001(\0132\033.greptime.v1.region.RegularH\000\0229\n\rs" - "trict_window\030\003 \001(\0132 .greptime.v1.region." - "StrictWindowH\000B\t\n\007options\"$\n\017TruncateReq" - "uest\022\021\n\tregion_id\030\001 \001(\004\"P\n\017RegionColumnD" - "ef\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime.v1.Col" - "umnDef\022\021\n\tcolumn_id\030\002 \001(\r\"M\n\022BulkInsertR" - "equests\0227\n\010requests\030\001 \003(\0132%.greptime.v1." - "region.BulkInsertRequest\"q\n\021BulkInsertRe" - "quest\022\021\n\tregion_id\030\001 \001(\004\0228\n\014payload_type" - "\030\002 \001(\0162\".greptime.v1.region.BulkInsertTy" - "pe\022\017\n\007payload\030\003 \001(\014\"1\n\020MitoManifestInfo\022" - "\035\n\025data_manifest_version\030\001 \001(\004\"V\n\022Metric" - "ManifestInfo\022\035\n\025data_manifest_version\030\001 " - "\001(\004\022!\n\031metadata_manifest_version\030\002 \001(\004\"\275" - "\001\n\013SyncRequest\022\021\n\tregion_id\030\001 \001(\004\022B\n\022mit" - "o_manifest_info\030\002 \001(\0132$.greptime.v1.regi" - "on.MitoManifestInfoH\000\022F\n\024metric_manifest" - "_info\030\003 \001(\0132&.greptime.v1.region.MetricM" - "anifestInfoH\000B\017\n\rmanifest_info*\037\n\016BulkIn" - "sertType\022\r\n\tARROW_IPC\020\0002Y\n\006Region\022O\n\006Han" - "dle\022!.greptime.v1.region.RegionRequest\032\"" - ".greptime.v1.region.RegionResponseB]\n\025io" - ".greptime.v1.regionB\006ServerZ\n\010ArrowIpc\022\021\n\tr" + "egion_id\030\001 \001(\004\022\016\n\006schema\030\002 \001(\014\022\017\n\007payloa" + "d\030\003 \001(\014\"1\n\020MitoManifestInfo\022\035\n\025data_mani" + "fest_version\030\001 \001(\004\"V\n\022MetricManifestInfo" + "\022\035\n\025data_manifest_version\030\001 \001(\004\022!\n\031metad" + "ata_manifest_version\030\002 \001(\004\"\275\001\n\013SyncReque" + "st\022\021\n\tregion_id\030\001 \001(\004\022B\n\022mito_manifest_i" + "nfo\030\002 \001(\0132$.greptime.v1.region.MitoManif" + "estInfoH\000\022F\n\024metric_manifest_info\030\003 \001(\0132" + "&.greptime.v1.region.MetricManifestInfoH" + "\000B\017\n\rmanifest_info2Y\n\006Region\022O\n\006Handle\022!" + ".greptime.v1.region.RegionRequest\032\".grep" + "time.v1.region.RegionResponseB]\n\025io.grep" + "time.v1.regionB\006ServerZ_impl_.body_.alters_; } -const ::greptime::v1::region::BulkInsertRequests& -RegionRequest::_Internal::bulk_inserts(const RegionRequest* msg) { - return *msg->_impl_.body_.bulk_inserts_; +const ::greptime::v1::region::BulkInsertRequest& +RegionRequest::_Internal::bulk_insert(const RegionRequest* msg) { + return *msg->_impl_.body_.bulk_insert_; } const ::greptime::v1::region::SyncRequest& RegionRequest::_Internal::sync(const RegionRequest* msg) { @@ -1658,20 +1645,20 @@ void RegionRequest::set_allocated_alters(::greptime::v1::region::AlterRequests* } // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.alters) } -void RegionRequest::set_allocated_bulk_inserts(::greptime::v1::region::BulkInsertRequests* bulk_inserts) { +void RegionRequest::set_allocated_bulk_insert(::greptime::v1::region::BulkInsertRequest* bulk_insert) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_body(); - if (bulk_inserts) { + if (bulk_insert) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(bulk_inserts); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(bulk_insert); if (message_arena != submessage_arena) { - bulk_inserts = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, bulk_inserts, submessage_arena); + bulk_insert = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, bulk_insert, submessage_arena); } - set_has_bulk_inserts(); - _impl_.body_.bulk_inserts_ = bulk_inserts; + set_has_bulk_insert(); + _impl_.body_.bulk_insert_ = bulk_insert; } - // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.bulk_inserts) + // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.bulk_insert) } void RegionRequest::set_allocated_sync(::greptime::v1::region::SyncRequest* sync) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); @@ -1774,9 +1761,9 @@ RegionRequest::RegionRequest(const RegionRequest& from) from._internal_alters()); break; } - case kBulkInserts: { - _this->_internal_mutable_bulk_inserts()->::greptime::v1::region::BulkInsertRequests::MergeFrom( - from._internal_bulk_inserts()); + case kBulkInsert: { + _this->_internal_mutable_bulk_insert()->::greptime::v1::region::BulkInsertRequest::MergeFrom( + from._internal_bulk_insert()); break; } case kSync: { @@ -1906,9 +1893,9 @@ void RegionRequest::clear_body() { } break; } - case kBulkInserts: { + case kBulkInsert: { if (GetArenaForAllocation() == nullptr) { - delete _impl_.body_.bulk_inserts_; + delete _impl_.body_.bulk_insert_; } break; } @@ -2058,10 +2045,10 @@ const char* RegionRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; - // .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; + // .greptime.v1.region.BulkInsertRequest bulk_insert = 16; case 16: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 130)) { - ptr = ctx->ParseMessage(_internal_mutable_bulk_inserts(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_bulk_insert(), ptr); CHK_(ptr); } else goto handle_unusual; @@ -2201,11 +2188,11 @@ uint8_t* RegionRequest::_InternalSerialize( _Internal::alters(this).GetCachedSize(), target, stream); } - // .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; - if (_internal_has_bulk_inserts()) { + // .greptime.v1.region.BulkInsertRequest bulk_insert = 16; + if (_internal_has_bulk_insert()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(16, _Internal::bulk_inserts(this), - _Internal::bulk_inserts(this).GetCachedSize(), target, stream); + InternalWriteMessage(16, _Internal::bulk_insert(this), + _Internal::bulk_insert(this).GetCachedSize(), target, stream); } // .greptime.v1.region.SyncRequest sync = 17; @@ -2330,11 +2317,11 @@ size_t RegionRequest::ByteSizeLong() const { *_impl_.body_.alters_); break; } - // .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; - case kBulkInserts: { + // .greptime.v1.region.BulkInsertRequest bulk_insert = 16; + case kBulkInsert: { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.body_.bulk_inserts_); + *_impl_.body_.bulk_insert_); break; } // .greptime.v1.region.SyncRequest sync = 17; @@ -2436,9 +2423,9 @@ void RegionRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: from._internal_alters()); break; } - case kBulkInserts: { - _this->_internal_mutable_bulk_inserts()->::greptime::v1::region::BulkInsertRequests::MergeFrom( - from._internal_bulk_inserts()); + case kBulkInsert: { + _this->_internal_mutable_bulk_insert()->::greptime::v1::region::BulkInsertRequest::MergeFrom( + from._internal_bulk_insert()); break; } case kSync: { @@ -8287,39 +8274,73 @@ void RegionColumnDef::InternalSwap(RegionColumnDef* other) { // =================================================================== -class BulkInsertRequests::_Internal { +class BulkInsertRequest::_Internal { public: + static const ::greptime::v1::region::ArrowIpc& arrow_ipc(const BulkInsertRequest* msg); }; -BulkInsertRequests::BulkInsertRequests(::PROTOBUF_NAMESPACE_ID::Arena* arena, +const ::greptime::v1::region::ArrowIpc& +BulkInsertRequest::_Internal::arrow_ipc(const BulkInsertRequest* msg) { + return *msg->_impl_.body_.arrow_ipc_; +} +void BulkInsertRequest::set_allocated_arrow_ipc(::greptime::v1::region::ArrowIpc* arrow_ipc) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_body(); + if (arrow_ipc) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(arrow_ipc); + if (message_arena != submessage_arena) { + arrow_ipc = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, arrow_ipc, submessage_arena); + } + set_has_arrow_ipc(); + _impl_.body_.arrow_ipc_ = arrow_ipc; + } + // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.BulkInsertRequest.arrow_ipc) +} +BulkInsertRequest::BulkInsertRequest(::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.BulkInsertRequests) + // @@protoc_insertion_point(arena_constructor:greptime.v1.region.BulkInsertRequest) } -BulkInsertRequests::BulkInsertRequests(const BulkInsertRequests& from) +BulkInsertRequest::BulkInsertRequest(const BulkInsertRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - BulkInsertRequests* const _this = this; (void)_this; + BulkInsertRequest* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.requests_){from._impl_.requests_} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.body_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:greptime.v1.region.BulkInsertRequests) + clear_has_body(); + switch (from.body_case()) { + case kArrowIpc: { + _this->_internal_mutable_arrow_ipc()->::greptime::v1::region::ArrowIpc::MergeFrom( + from._internal_arrow_ipc()); + break; + } + case BODY_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:greptime.v1.region.BulkInsertRequest) } -inline void BulkInsertRequests::SharedCtor( +inline void BulkInsertRequest::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.requests_){arena} + decltype(_impl_.body_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; + clear_has_body(); } -BulkInsertRequests::~BulkInsertRequests() { - // @@protoc_insertion_point(destructor:greptime.v1.region.BulkInsertRequests) +BulkInsertRequest::~BulkInsertRequest() { + // @@protoc_insertion_point(destructor:greptime.v1.region.BulkInsertRequest) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; return; @@ -8327,41 +8348,55 @@ BulkInsertRequests::~BulkInsertRequests() { SharedDtor(); } -inline void BulkInsertRequests::SharedDtor() { +inline void BulkInsertRequest::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.requests_.~RepeatedPtrField(); + if (has_body()) { + clear_body(); + } } -void BulkInsertRequests::SetCachedSize(int size) const { +void BulkInsertRequest::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void BulkInsertRequests::Clear() { -// @@protoc_insertion_point(message_clear_start:greptime.v1.region.BulkInsertRequests) +void BulkInsertRequest::clear_body() { +// @@protoc_insertion_point(one_of_clear_start:greptime.v1.region.BulkInsertRequest) + switch (body_case()) { + case kArrowIpc: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.body_.arrow_ipc_; + } + break; + } + case BODY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = BODY_NOT_SET; +} + + +void BulkInsertRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.region.BulkInsertRequest) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.requests_.Clear(); + clear_body(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* BulkInsertRequests::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +const char* BulkInsertRequest::_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) { - // repeated .greptime.v1.region.BulkInsertRequest requests = 1; + // .greptime.v1.region.ArrowIpc arrow_ipc = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_requests(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + ptr = ctx->ParseMessage(_internal_mutable_arrow_ipc(), ptr); + CHK_(ptr); } else goto handle_unusual; continue; @@ -8388,83 +8423,97 @@ failure: #undef CHK_ } -uint8_t* BulkInsertRequests::_InternalSerialize( +uint8_t* BulkInsertRequest::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.region.BulkInsertRequests) + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.region.BulkInsertRequest) uint32_t cached_has_bits = 0; (void) cached_has_bits; - // repeated .greptime.v1.region.BulkInsertRequest requests = 1; - for (unsigned i = 0, - n = static_cast(this->_internal_requests_size()); i < n; i++) { - const auto& repfield = this->_internal_requests(i); + // .greptime.v1.region.ArrowIpc arrow_ipc = 1; + if (_internal_has_arrow_ipc()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + InternalWriteMessage(1, _Internal::arrow_ipc(this), + _Internal::arrow_ipc(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); } - // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.region.BulkInsertRequests) + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.region.BulkInsertRequest) return target; } -size_t BulkInsertRequests::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:greptime.v1.region.BulkInsertRequests) +size_t BulkInsertRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.region.BulkInsertRequest) size_t total_size = 0; uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // repeated .greptime.v1.region.BulkInsertRequest requests = 1; - total_size += 1UL * this->_internal_requests_size(); - for (const auto& msg : this->_impl_.requests_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + switch (body_case()) { + // .greptime.v1.region.ArrowIpc arrow_ipc = 1; + case kArrowIpc: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.body_.arrow_ipc_); + break; + } + case BODY_NOT_SET: { + break; + } } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BulkInsertRequests::_class_data_ = { +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BulkInsertRequest::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - BulkInsertRequests::MergeImpl + BulkInsertRequest::MergeImpl }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BulkInsertRequests::GetClassData() const { return &_class_data_; } +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BulkInsertRequest::GetClassData() const { return &_class_data_; } -void BulkInsertRequests::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.BulkInsertRequests) +void BulkInsertRequest::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.BulkInsertRequest) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.requests_.MergeFrom(from._impl_.requests_); + switch (from.body_case()) { + case kArrowIpc: { + _this->_internal_mutable_arrow_ipc()->::greptime::v1::region::ArrowIpc::MergeFrom( + from._internal_arrow_ipc()); + break; + } + case BODY_NOT_SET: { + break; + } + } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } -void BulkInsertRequests::CopyFrom(const BulkInsertRequests& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.region.BulkInsertRequests) +void BulkInsertRequest::CopyFrom(const BulkInsertRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.region.BulkInsertRequest) if (&from == this) return; Clear(); MergeFrom(from); } -bool BulkInsertRequests::IsInitialized() const { +bool BulkInsertRequest::IsInitialized() const { return true; } -void BulkInsertRequests::InternalSwap(BulkInsertRequests* other) { +void BulkInsertRequest::InternalSwap(BulkInsertRequest* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.requests_.InternalSwap(&other->_impl_.requests_); + swap(_impl_.body_, other->_impl_.body_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); } -::PROTOBUF_NAMESPACE_ID::Metadata BulkInsertRequests::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata BulkInsertRequest::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[30]); @@ -8472,26 +8521,34 @@ void BulkInsertRequests::InternalSwap(BulkInsertRequests* other) { // =================================================================== -class BulkInsertRequest::_Internal { +class ArrowIpc::_Internal { public: }; -BulkInsertRequest::BulkInsertRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, +ArrowIpc::ArrowIpc(::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.BulkInsertRequest) + // @@protoc_insertion_point(arena_constructor:greptime.v1.region.ArrowIpc) } -BulkInsertRequest::BulkInsertRequest(const BulkInsertRequest& from) +ArrowIpc::ArrowIpc(const ArrowIpc& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - BulkInsertRequest* const _this = this; (void)_this; + ArrowIpc* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.payload_){} + decltype(_impl_.schema_){} + , decltype(_impl_.payload_){} , decltype(_impl_.region_id_){} - , decltype(_impl_.payload_type_){} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.schema_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_schema().empty()) { + _this->_impl_.schema_.Set(from._internal_schema(), + _this->GetArenaForAllocation()); + } _impl_.payload_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.payload_.Set("", GetArenaForAllocation()); @@ -8500,30 +8557,32 @@ BulkInsertRequest::BulkInsertRequest(const BulkInsertRequest& from) _this->_impl_.payload_.Set(from._internal_payload(), _this->GetArenaForAllocation()); } - ::memcpy(&_impl_.region_id_, &from._impl_.region_id_, - static_cast(reinterpret_cast(&_impl_.payload_type_) - - reinterpret_cast(&_impl_.region_id_)) + sizeof(_impl_.payload_type_)); - // @@protoc_insertion_point(copy_constructor:greptime.v1.region.BulkInsertRequest) + _this->_impl_.region_id_ = from._impl_.region_id_; + // @@protoc_insertion_point(copy_constructor:greptime.v1.region.ArrowIpc) } -inline void BulkInsertRequest::SharedCtor( +inline void ArrowIpc::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.payload_){} + decltype(_impl_.schema_){} + , decltype(_impl_.payload_){} , decltype(_impl_.region_id_){uint64_t{0u}} - , decltype(_impl_.payload_type_){0} , /*decltype(_impl_._cached_size_)*/{} }; + _impl_.schema_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.payload_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.payload_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } -BulkInsertRequest::~BulkInsertRequest() { - // @@protoc_insertion_point(destructor:greptime.v1.region.BulkInsertRequest) +ArrowIpc::~ArrowIpc() { + // @@protoc_insertion_point(destructor:greptime.v1.region.ArrowIpc) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; return; @@ -8531,29 +8590,29 @@ BulkInsertRequest::~BulkInsertRequest() { SharedDtor(); } -inline void BulkInsertRequest::SharedDtor() { +inline void ArrowIpc::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.schema_.Destroy(); _impl_.payload_.Destroy(); } -void BulkInsertRequest::SetCachedSize(int size) const { +void ArrowIpc::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void BulkInsertRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:greptime.v1.region.BulkInsertRequest) +void ArrowIpc::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.region.ArrowIpc) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + _impl_.schema_.ClearToEmpty(); _impl_.payload_.ClearToEmpty(); - ::memset(&_impl_.region_id_, 0, static_cast( - reinterpret_cast(&_impl_.payload_type_) - - reinterpret_cast(&_impl_.region_id_)) + sizeof(_impl_.payload_type_)); + _impl_.region_id_ = uint64_t{0u}; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* BulkInsertRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +const char* ArrowIpc::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { uint32_t tag; @@ -8567,12 +8626,12 @@ const char* BulkInsertRequest::_InternalParse(const char* ptr, ::_pbi::ParseCont } else goto handle_unusual; continue; - // .greptime.v1.region.BulkInsertType payload_type = 2; + // bytes schema = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_schema(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); - _internal_set_payload_type(static_cast<::greptime::v1::region::BulkInsertType>(val)); } else goto handle_unusual; continue; @@ -8608,9 +8667,9 @@ failure: #undef CHK_ } -uint8_t* BulkInsertRequest::_InternalSerialize( +uint8_t* ArrowIpc::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.region.BulkInsertRequest) + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.region.ArrowIpc) uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -8620,11 +8679,10 @@ uint8_t* BulkInsertRequest::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_region_id(), target); } - // .greptime.v1.region.BulkInsertType payload_type = 2; - if (this->_internal_payload_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_payload_type(), target); + // bytes schema = 2; + if (!this->_internal_schema().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_schema(), target); } // bytes payload = 3; @@ -8637,18 +8695,25 @@ uint8_t* BulkInsertRequest::_InternalSerialize( 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.BulkInsertRequest) + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.region.ArrowIpc) return target; } -size_t BulkInsertRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:greptime.v1.region.BulkInsertRequest) +size_t ArrowIpc::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.region.ArrowIpc) size_t total_size = 0; uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // bytes schema = 2; + if (!this->_internal_schema().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_schema()); + } + // bytes payload = 3; if (!this->_internal_payload().empty()) { total_size += 1 + @@ -8661,71 +8726,64 @@ size_t BulkInsertRequest::ByteSizeLong() const { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_region_id()); } - // .greptime.v1.region.BulkInsertType payload_type = 2; - if (this->_internal_payload_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_payload_type()); - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BulkInsertRequest::_class_data_ = { +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ArrowIpc::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - BulkInsertRequest::MergeImpl + ArrowIpc::MergeImpl }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BulkInsertRequest::GetClassData() const { return &_class_data_; } +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ArrowIpc::GetClassData() const { return &_class_data_; } -void BulkInsertRequest::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.BulkInsertRequest) +void ArrowIpc::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.ArrowIpc) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; + if (!from._internal_schema().empty()) { + _this->_internal_set_schema(from._internal_schema()); + } if (!from._internal_payload().empty()) { _this->_internal_set_payload(from._internal_payload()); } if (from._internal_region_id() != 0) { _this->_internal_set_region_id(from._internal_region_id()); } - if (from._internal_payload_type() != 0) { - _this->_internal_set_payload_type(from._internal_payload_type()); - } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } -void BulkInsertRequest::CopyFrom(const BulkInsertRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.region.BulkInsertRequest) +void ArrowIpc::CopyFrom(const ArrowIpc& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.region.ArrowIpc) if (&from == this) return; Clear(); MergeFrom(from); } -bool BulkInsertRequest::IsInitialized() const { +bool ArrowIpc::IsInitialized() const { return true; } -void BulkInsertRequest::InternalSwap(BulkInsertRequest* other) { +void ArrowIpc::InternalSwap(ArrowIpc* other) { using std::swap; auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.schema_, lhs_arena, + &other->_impl_.schema_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.payload_, lhs_arena, &other->_impl_.payload_, rhs_arena ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(BulkInsertRequest, _impl_.payload_type_) - + sizeof(BulkInsertRequest::_impl_.payload_type_) - - PROTOBUF_FIELD_OFFSET(BulkInsertRequest, _impl_.region_id_)>( - reinterpret_cast(&_impl_.region_id_), - reinterpret_cast(&other->_impl_.region_id_)); + swap(_impl_.region_id_, other->_impl_.region_id_); } -::PROTOBUF_NAMESPACE_ID::Metadata BulkInsertRequest::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata ArrowIpc::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[31]); @@ -9577,14 +9635,14 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::region::RegionColumnDef* Arena::CreateMaybeMessage< ::greptime::v1::region::RegionColumnDef >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::region::RegionColumnDef >(arena); } -template<> PROTOBUF_NOINLINE ::greptime::v1::region::BulkInsertRequests* -Arena::CreateMaybeMessage< ::greptime::v1::region::BulkInsertRequests >(Arena* arena) { - return Arena::CreateMessageInternal< ::greptime::v1::region::BulkInsertRequests >(arena); -} template<> PROTOBUF_NOINLINE ::greptime::v1::region::BulkInsertRequest* Arena::CreateMaybeMessage< ::greptime::v1::region::BulkInsertRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::region::BulkInsertRequest >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::region::ArrowIpc* +Arena::CreateMaybeMessage< ::greptime::v1::region::ArrowIpc >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::region::ArrowIpc >(arena); +} template<> PROTOBUF_NOINLINE ::greptime::v1::region::MitoManifestInfo* Arena::CreateMaybeMessage< ::greptime::v1::region::MitoManifestInfo >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::region::MitoManifestInfo >(arena); diff --git a/c++/greptime/v1/region/server.pb.h b/c++/greptime/v1/region/server.pb.h index ad2aa50..b0fb772 100644 --- a/c++/greptime/v1/region/server.pb.h +++ b/c++/greptime/v1/region/server.pb.h @@ -33,7 +33,6 @@ #include // IWYU pragma: export #include #include -#include #include #include "greptime/v1/common.pb.h" #include "greptime/v1/row.pb.h" @@ -67,12 +66,12 @@ extern AlterRequestDefaultTypeInternal _AlterRequest_default_instance_; class AlterRequests; struct AlterRequestsDefaultTypeInternal; extern AlterRequestsDefaultTypeInternal _AlterRequests_default_instance_; +class ArrowIpc; +struct ArrowIpcDefaultTypeInternal; +extern ArrowIpcDefaultTypeInternal _ArrowIpc_default_instance_; class BulkInsertRequest; struct BulkInsertRequestDefaultTypeInternal; extern BulkInsertRequestDefaultTypeInternal _BulkInsertRequest_default_instance_; -class BulkInsertRequests; -struct BulkInsertRequestsDefaultTypeInternal; -extern BulkInsertRequestsDefaultTypeInternal _BulkInsertRequests_default_instance_; class CloseRequest; struct CloseRequestDefaultTypeInternal; extern CloseRequestDefaultTypeInternal _CloseRequest_default_instance_; @@ -168,8 +167,8 @@ template<> ::greptime::v1::region::AddColumn* Arena::CreateMaybeMessage<::grepti template<> ::greptime::v1::region::AddColumns* Arena::CreateMaybeMessage<::greptime::v1::region::AddColumns>(Arena*); template<> ::greptime::v1::region::AlterRequest* Arena::CreateMaybeMessage<::greptime::v1::region::AlterRequest>(Arena*); template<> ::greptime::v1::region::AlterRequests* Arena::CreateMaybeMessage<::greptime::v1::region::AlterRequests>(Arena*); +template<> ::greptime::v1::region::ArrowIpc* Arena::CreateMaybeMessage<::greptime::v1::region::ArrowIpc>(Arena*); template<> ::greptime::v1::region::BulkInsertRequest* Arena::CreateMaybeMessage<::greptime::v1::region::BulkInsertRequest>(Arena*); -template<> ::greptime::v1::region::BulkInsertRequests* Arena::CreateMaybeMessage<::greptime::v1::region::BulkInsertRequests>(Arena*); template<> ::greptime::v1::region::CloseRequest* Arena::CreateMaybeMessage<::greptime::v1::region::CloseRequest>(Arena*); template<> ::greptime::v1::region::CompactRequest* Arena::CreateMaybeMessage<::greptime::v1::region::CompactRequest>(Arena*); template<> ::greptime::v1::region::CreateRequest* Arena::CreateMaybeMessage<::greptime::v1::region::CreateRequest>(Arena*); @@ -204,30 +203,6 @@ namespace greptime { namespace v1 { namespace region { -enum BulkInsertType : int { - ARROW_IPC = 0, - BulkInsertType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - BulkInsertType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() -}; -bool BulkInsertType_IsValid(int value); -constexpr BulkInsertType BulkInsertType_MIN = ARROW_IPC; -constexpr BulkInsertType BulkInsertType_MAX = ARROW_IPC; -constexpr int BulkInsertType_ARRAYSIZE = BulkInsertType_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BulkInsertType_descriptor(); -template -inline const std::string& BulkInsertType_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function BulkInsertType_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - BulkInsertType_descriptor(), enum_t_value); -} -inline bool BulkInsertType_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BulkInsertType* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - BulkInsertType_descriptor(), name, value); -} // =================================================================== class RegionRequestHeader_TracingContextEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry( - &_BulkInsertRequests_default_instance_); - } - static constexpr int kIndexInFileMessages = - 30; - - friend void swap(BulkInsertRequests& a, BulkInsertRequests& b) { - a.Swap(&b); - } - inline void Swap(BulkInsertRequests* 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(BulkInsertRequests* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - BulkInsertRequests* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const BulkInsertRequests& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const BulkInsertRequests& from) { - BulkInsertRequests::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(BulkInsertRequests* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "greptime.v1.region.BulkInsertRequests"; - } - protected: - explicit BulkInsertRequests(::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 { - kRequestsFieldNumber = 1, - }; - // repeated .greptime.v1.region.BulkInsertRequest requests = 1; - int requests_size() const; - private: - int _internal_requests_size() const; - public: - void clear_requests(); - ::greptime::v1::region::BulkInsertRequest* mutable_requests(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::region::BulkInsertRequest >* - mutable_requests(); - private: - const ::greptime::v1::region::BulkInsertRequest& _internal_requests(int index) const; - ::greptime::v1::region::BulkInsertRequest* _internal_add_requests(); - public: - const ::greptime::v1::region::BulkInsertRequest& requests(int index) const; - ::greptime::v1::region::BulkInsertRequest* add_requests(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::region::BulkInsertRequest >& - requests() const; - - // @@protoc_insertion_point(class_scope:greptime.v1.region.BulkInsertRequests) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::region::BulkInsertRequest > requests_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_greptime_2fv1_2fregion_2fserver_2eproto; -}; -// ------------------------------------------------------------------- - class BulkInsertRequest final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.region.BulkInsertRequest) */ { public: @@ -5413,12 +5231,17 @@ class BulkInsertRequest final : static const BulkInsertRequest& default_instance() { return *internal_default_instance(); } + enum BodyCase { + kArrowIpc = 1, + BODY_NOT_SET = 0, + }; + static inline const BulkInsertRequest* internal_default_instance() { return reinterpret_cast( &_BulkInsertRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 31; + 30; friend void swap(BulkInsertRequest& a, BulkInsertRequest& b) { a.Swap(&b); @@ -5491,10 +5314,193 @@ class BulkInsertRequest final : // accessors ------------------------------------------------------- enum : int { + kArrowIpcFieldNumber = 1, + }; + // .greptime.v1.region.ArrowIpc arrow_ipc = 1; + bool has_arrow_ipc() const; + private: + bool _internal_has_arrow_ipc() const; + public: + void clear_arrow_ipc(); + const ::greptime::v1::region::ArrowIpc& arrow_ipc() const; + PROTOBUF_NODISCARD ::greptime::v1::region::ArrowIpc* release_arrow_ipc(); + ::greptime::v1::region::ArrowIpc* mutable_arrow_ipc(); + void set_allocated_arrow_ipc(::greptime::v1::region::ArrowIpc* arrow_ipc); + private: + const ::greptime::v1::region::ArrowIpc& _internal_arrow_ipc() const; + ::greptime::v1::region::ArrowIpc* _internal_mutable_arrow_ipc(); + public: + void unsafe_arena_set_allocated_arrow_ipc( + ::greptime::v1::region::ArrowIpc* arrow_ipc); + ::greptime::v1::region::ArrowIpc* unsafe_arena_release_arrow_ipc(); + + void clear_body(); + BodyCase body_case() const; + // @@protoc_insertion_point(class_scope:greptime.v1.region.BulkInsertRequest) + private: + class _Internal; + void set_has_arrow_ipc(); + + inline bool has_body() const; + inline void clear_has_body(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + union BodyUnion { + constexpr BodyUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::greptime::v1::region::ArrowIpc* arrow_ipc_; + } body_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2fregion_2fserver_2eproto; +}; +// ------------------------------------------------------------------- + +class ArrowIpc final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.region.ArrowIpc) */ { + public: + inline ArrowIpc() : ArrowIpc(nullptr) {} + ~ArrowIpc() override; + explicit PROTOBUF_CONSTEXPR ArrowIpc(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ArrowIpc(const ArrowIpc& from); + ArrowIpc(ArrowIpc&& from) noexcept + : ArrowIpc() { + *this = ::std::move(from); + } + + inline ArrowIpc& operator=(const ArrowIpc& from) { + CopyFrom(from); + return *this; + } + inline ArrowIpc& operator=(ArrowIpc&& 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 ArrowIpc& default_instance() { + return *internal_default_instance(); + } + static inline const ArrowIpc* internal_default_instance() { + return reinterpret_cast( + &_ArrowIpc_default_instance_); + } + static constexpr int kIndexInFileMessages = + 31; + + friend void swap(ArrowIpc& a, ArrowIpc& b) { + a.Swap(&b); + } + inline void Swap(ArrowIpc* 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(ArrowIpc* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ArrowIpc* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ArrowIpc& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ArrowIpc& from) { + ArrowIpc::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(ArrowIpc* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.region.ArrowIpc"; + } + protected: + explicit ArrowIpc(::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 { + kSchemaFieldNumber = 2, kPayloadFieldNumber = 3, kRegionIdFieldNumber = 1, - kPayloadTypeFieldNumber = 2, }; + // bytes schema = 2; + void clear_schema(); + const std::string& schema() const; + template + void set_schema(ArgT0&& arg0, ArgT... args); + std::string* mutable_schema(); + PROTOBUF_NODISCARD std::string* release_schema(); + void set_allocated_schema(std::string* schema); + private: + const std::string& _internal_schema() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_schema(const std::string& value); + std::string* _internal_mutable_schema(); + public: + // bytes payload = 3; void clear_payload(); const std::string& payload() const; @@ -5518,16 +5524,7 @@ class BulkInsertRequest final : void _internal_set_region_id(uint64_t value); public: - // .greptime.v1.region.BulkInsertType payload_type = 2; - void clear_payload_type(); - ::greptime::v1::region::BulkInsertType payload_type() const; - void set_payload_type(::greptime::v1::region::BulkInsertType value); - private: - ::greptime::v1::region::BulkInsertType _internal_payload_type() const; - void _internal_set_payload_type(::greptime::v1::region::BulkInsertType value); - public: - - // @@protoc_insertion_point(class_scope:greptime.v1.region.BulkInsertRequest) + // @@protoc_insertion_point(class_scope:greptime.v1.region.ArrowIpc) private: class _Internal; @@ -5535,9 +5532,9 @@ class BulkInsertRequest final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr schema_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; uint64_t region_id_; - int payload_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; @@ -7290,77 +7287,77 @@ inline ::greptime::v1::region::AlterRequests* RegionRequest::mutable_alters() { return _msg; } -// .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; -inline bool RegionRequest::_internal_has_bulk_inserts() const { - return body_case() == kBulkInserts; +// .greptime.v1.region.BulkInsertRequest bulk_insert = 16; +inline bool RegionRequest::_internal_has_bulk_insert() const { + return body_case() == kBulkInsert; } -inline bool RegionRequest::has_bulk_inserts() const { - return _internal_has_bulk_inserts(); +inline bool RegionRequest::has_bulk_insert() const { + return _internal_has_bulk_insert(); } -inline void RegionRequest::set_has_bulk_inserts() { - _impl_._oneof_case_[0] = kBulkInserts; +inline void RegionRequest::set_has_bulk_insert() { + _impl_._oneof_case_[0] = kBulkInsert; } -inline void RegionRequest::clear_bulk_inserts() { - if (_internal_has_bulk_inserts()) { +inline void RegionRequest::clear_bulk_insert() { + if (_internal_has_bulk_insert()) { if (GetArenaForAllocation() == nullptr) { - delete _impl_.body_.bulk_inserts_; + delete _impl_.body_.bulk_insert_; } clear_has_body(); } } -inline ::greptime::v1::region::BulkInsertRequests* RegionRequest::release_bulk_inserts() { - // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.bulk_inserts) - if (_internal_has_bulk_inserts()) { +inline ::greptime::v1::region::BulkInsertRequest* RegionRequest::release_bulk_insert() { + // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.bulk_insert) + if (_internal_has_bulk_insert()) { clear_has_body(); - ::greptime::v1::region::BulkInsertRequests* temp = _impl_.body_.bulk_inserts_; + ::greptime::v1::region::BulkInsertRequest* temp = _impl_.body_.bulk_insert_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - _impl_.body_.bulk_inserts_ = nullptr; + _impl_.body_.bulk_insert_ = nullptr; return temp; } else { return nullptr; } } -inline const ::greptime::v1::region::BulkInsertRequests& RegionRequest::_internal_bulk_inserts() const { - return _internal_has_bulk_inserts() - ? *_impl_.body_.bulk_inserts_ - : reinterpret_cast< ::greptime::v1::region::BulkInsertRequests&>(::greptime::v1::region::_BulkInsertRequests_default_instance_); +inline const ::greptime::v1::region::BulkInsertRequest& RegionRequest::_internal_bulk_insert() const { + return _internal_has_bulk_insert() + ? *_impl_.body_.bulk_insert_ + : reinterpret_cast< ::greptime::v1::region::BulkInsertRequest&>(::greptime::v1::region::_BulkInsertRequest_default_instance_); } -inline const ::greptime::v1::region::BulkInsertRequests& RegionRequest::bulk_inserts() const { - // @@protoc_insertion_point(field_get:greptime.v1.region.RegionRequest.bulk_inserts) - return _internal_bulk_inserts(); +inline const ::greptime::v1::region::BulkInsertRequest& RegionRequest::bulk_insert() const { + // @@protoc_insertion_point(field_get:greptime.v1.region.RegionRequest.bulk_insert) + return _internal_bulk_insert(); } -inline ::greptime::v1::region::BulkInsertRequests* RegionRequest::unsafe_arena_release_bulk_inserts() { - // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.bulk_inserts) - if (_internal_has_bulk_inserts()) { +inline ::greptime::v1::region::BulkInsertRequest* RegionRequest::unsafe_arena_release_bulk_insert() { + // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.bulk_insert) + if (_internal_has_bulk_insert()) { clear_has_body(); - ::greptime::v1::region::BulkInsertRequests* temp = _impl_.body_.bulk_inserts_; - _impl_.body_.bulk_inserts_ = nullptr; + ::greptime::v1::region::BulkInsertRequest* temp = _impl_.body_.bulk_insert_; + _impl_.body_.bulk_insert_ = nullptr; return temp; } else { return nullptr; } } -inline void RegionRequest::unsafe_arena_set_allocated_bulk_inserts(::greptime::v1::region::BulkInsertRequests* bulk_inserts) { +inline void RegionRequest::unsafe_arena_set_allocated_bulk_insert(::greptime::v1::region::BulkInsertRequest* bulk_insert) { clear_body(); - if (bulk_inserts) { - set_has_bulk_inserts(); - _impl_.body_.bulk_inserts_ = bulk_inserts; + if (bulk_insert) { + set_has_bulk_insert(); + _impl_.body_.bulk_insert_ = bulk_insert; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.bulk_inserts) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.bulk_insert) } -inline ::greptime::v1::region::BulkInsertRequests* RegionRequest::_internal_mutable_bulk_inserts() { - if (!_internal_has_bulk_inserts()) { +inline ::greptime::v1::region::BulkInsertRequest* RegionRequest::_internal_mutable_bulk_insert() { + if (!_internal_has_bulk_insert()) { clear_body(); - set_has_bulk_inserts(); - _impl_.body_.bulk_inserts_ = CreateMaybeMessage< ::greptime::v1::region::BulkInsertRequests >(GetArenaForAllocation()); + set_has_bulk_insert(); + _impl_.body_.bulk_insert_ = CreateMaybeMessage< ::greptime::v1::region::BulkInsertRequest >(GetArenaForAllocation()); } - return _impl_.body_.bulk_inserts_; + return _impl_.body_.bulk_insert_; } -inline ::greptime::v1::region::BulkInsertRequests* RegionRequest::mutable_bulk_inserts() { - ::greptime::v1::region::BulkInsertRequests* _msg = _internal_mutable_bulk_inserts(); - // @@protoc_insertion_point(field_mutable:greptime.v1.region.RegionRequest.bulk_inserts) +inline ::greptime::v1::region::BulkInsertRequest* RegionRequest::mutable_bulk_insert() { + ::greptime::v1::region::BulkInsertRequest* _msg = _internal_mutable_bulk_insert(); + // @@protoc_insertion_point(field_mutable:greptime.v1.region.RegionRequest.bulk_insert) return _msg; } @@ -9874,128 +9871,201 @@ inline void RegionColumnDef::set_column_id(uint32_t value) { // ------------------------------------------------------------------- -// BulkInsertRequests - -// repeated .greptime.v1.region.BulkInsertRequest requests = 1; -inline int BulkInsertRequests::_internal_requests_size() const { - return _impl_.requests_.size(); -} -inline int BulkInsertRequests::requests_size() const { - return _internal_requests_size(); -} -inline void BulkInsertRequests::clear_requests() { - _impl_.requests_.Clear(); -} -inline ::greptime::v1::region::BulkInsertRequest* BulkInsertRequests::mutable_requests(int index) { - // @@protoc_insertion_point(field_mutable:greptime.v1.region.BulkInsertRequests.requests) - return _impl_.requests_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::region::BulkInsertRequest >* -BulkInsertRequests::mutable_requests() { - // @@protoc_insertion_point(field_mutable_list:greptime.v1.region.BulkInsertRequests.requests) - return &_impl_.requests_; -} -inline const ::greptime::v1::region::BulkInsertRequest& BulkInsertRequests::_internal_requests(int index) const { - return _impl_.requests_.Get(index); -} -inline const ::greptime::v1::region::BulkInsertRequest& BulkInsertRequests::requests(int index) const { - // @@protoc_insertion_point(field_get:greptime.v1.region.BulkInsertRequests.requests) - return _internal_requests(index); -} -inline ::greptime::v1::region::BulkInsertRequest* BulkInsertRequests::_internal_add_requests() { - return _impl_.requests_.Add(); -} -inline ::greptime::v1::region::BulkInsertRequest* BulkInsertRequests::add_requests() { - ::greptime::v1::region::BulkInsertRequest* _add = _internal_add_requests(); - // @@protoc_insertion_point(field_add:greptime.v1.region.BulkInsertRequests.requests) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::region::BulkInsertRequest >& -BulkInsertRequests::requests() const { - // @@protoc_insertion_point(field_list:greptime.v1.region.BulkInsertRequests.requests) - return _impl_.requests_; -} - -// ------------------------------------------------------------------- - // BulkInsertRequest +// .greptime.v1.region.ArrowIpc arrow_ipc = 1; +inline bool BulkInsertRequest::_internal_has_arrow_ipc() const { + return body_case() == kArrowIpc; +} +inline bool BulkInsertRequest::has_arrow_ipc() const { + return _internal_has_arrow_ipc(); +} +inline void BulkInsertRequest::set_has_arrow_ipc() { + _impl_._oneof_case_[0] = kArrowIpc; +} +inline void BulkInsertRequest::clear_arrow_ipc() { + if (_internal_has_arrow_ipc()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.body_.arrow_ipc_; + } + clear_has_body(); + } +} +inline ::greptime::v1::region::ArrowIpc* BulkInsertRequest::release_arrow_ipc() { + // @@protoc_insertion_point(field_release:greptime.v1.region.BulkInsertRequest.arrow_ipc) + if (_internal_has_arrow_ipc()) { + clear_has_body(); + ::greptime::v1::region::ArrowIpc* temp = _impl_.body_.arrow_ipc_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.arrow_ipc_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::greptime::v1::region::ArrowIpc& BulkInsertRequest::_internal_arrow_ipc() const { + return _internal_has_arrow_ipc() + ? *_impl_.body_.arrow_ipc_ + : reinterpret_cast< ::greptime::v1::region::ArrowIpc&>(::greptime::v1::region::_ArrowIpc_default_instance_); +} +inline const ::greptime::v1::region::ArrowIpc& BulkInsertRequest::arrow_ipc() const { + // @@protoc_insertion_point(field_get:greptime.v1.region.BulkInsertRequest.arrow_ipc) + return _internal_arrow_ipc(); +} +inline ::greptime::v1::region::ArrowIpc* BulkInsertRequest::unsafe_arena_release_arrow_ipc() { + // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.BulkInsertRequest.arrow_ipc) + if (_internal_has_arrow_ipc()) { + clear_has_body(); + ::greptime::v1::region::ArrowIpc* temp = _impl_.body_.arrow_ipc_; + _impl_.body_.arrow_ipc_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void BulkInsertRequest::unsafe_arena_set_allocated_arrow_ipc(::greptime::v1::region::ArrowIpc* arrow_ipc) { + clear_body(); + if (arrow_ipc) { + set_has_arrow_ipc(); + _impl_.body_.arrow_ipc_ = arrow_ipc; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.BulkInsertRequest.arrow_ipc) +} +inline ::greptime::v1::region::ArrowIpc* BulkInsertRequest::_internal_mutable_arrow_ipc() { + if (!_internal_has_arrow_ipc()) { + clear_body(); + set_has_arrow_ipc(); + _impl_.body_.arrow_ipc_ = CreateMaybeMessage< ::greptime::v1::region::ArrowIpc >(GetArenaForAllocation()); + } + return _impl_.body_.arrow_ipc_; +} +inline ::greptime::v1::region::ArrowIpc* BulkInsertRequest::mutable_arrow_ipc() { + ::greptime::v1::region::ArrowIpc* _msg = _internal_mutable_arrow_ipc(); + // @@protoc_insertion_point(field_mutable:greptime.v1.region.BulkInsertRequest.arrow_ipc) + return _msg; +} + +inline bool BulkInsertRequest::has_body() const { + return body_case() != BODY_NOT_SET; +} +inline void BulkInsertRequest::clear_has_body() { + _impl_._oneof_case_[0] = BODY_NOT_SET; +} +inline BulkInsertRequest::BodyCase BulkInsertRequest::body_case() const { + return BulkInsertRequest::BodyCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// ArrowIpc + // uint64 region_id = 1; -inline void BulkInsertRequest::clear_region_id() { +inline void ArrowIpc::clear_region_id() { _impl_.region_id_ = uint64_t{0u}; } -inline uint64_t BulkInsertRequest::_internal_region_id() const { +inline uint64_t ArrowIpc::_internal_region_id() const { return _impl_.region_id_; } -inline uint64_t BulkInsertRequest::region_id() const { - // @@protoc_insertion_point(field_get:greptime.v1.region.BulkInsertRequest.region_id) +inline uint64_t ArrowIpc::region_id() const { + // @@protoc_insertion_point(field_get:greptime.v1.region.ArrowIpc.region_id) return _internal_region_id(); } -inline void BulkInsertRequest::_internal_set_region_id(uint64_t value) { +inline void ArrowIpc::_internal_set_region_id(uint64_t value) { _impl_.region_id_ = value; } -inline void BulkInsertRequest::set_region_id(uint64_t value) { +inline void ArrowIpc::set_region_id(uint64_t value) { _internal_set_region_id(value); - // @@protoc_insertion_point(field_set:greptime.v1.region.BulkInsertRequest.region_id) + // @@protoc_insertion_point(field_set:greptime.v1.region.ArrowIpc.region_id) } -// .greptime.v1.region.BulkInsertType payload_type = 2; -inline void BulkInsertRequest::clear_payload_type() { - _impl_.payload_type_ = 0; +// bytes schema = 2; +inline void ArrowIpc::clear_schema() { + _impl_.schema_.ClearToEmpty(); } -inline ::greptime::v1::region::BulkInsertType BulkInsertRequest::_internal_payload_type() const { - return static_cast< ::greptime::v1::region::BulkInsertType >(_impl_.payload_type_); +inline const std::string& ArrowIpc::schema() const { + // @@protoc_insertion_point(field_get:greptime.v1.region.ArrowIpc.schema) + return _internal_schema(); } -inline ::greptime::v1::region::BulkInsertType BulkInsertRequest::payload_type() const { - // @@protoc_insertion_point(field_get:greptime.v1.region.BulkInsertRequest.payload_type) - return _internal_payload_type(); +template +inline PROTOBUF_ALWAYS_INLINE +void ArrowIpc::set_schema(ArgT0&& arg0, ArgT... args) { + + _impl_.schema_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.region.ArrowIpc.schema) } -inline void BulkInsertRequest::_internal_set_payload_type(::greptime::v1::region::BulkInsertType value) { +inline std::string* ArrowIpc::mutable_schema() { + std::string* _s = _internal_mutable_schema(); + // @@protoc_insertion_point(field_mutable:greptime.v1.region.ArrowIpc.schema) + return _s; +} +inline const std::string& ArrowIpc::_internal_schema() const { + return _impl_.schema_.Get(); +} +inline void ArrowIpc::_internal_set_schema(const std::string& value) { - _impl_.payload_type_ = value; + _impl_.schema_.Set(value, GetArenaForAllocation()); } -inline void BulkInsertRequest::set_payload_type(::greptime::v1::region::BulkInsertType value) { - _internal_set_payload_type(value); - // @@protoc_insertion_point(field_set:greptime.v1.region.BulkInsertRequest.payload_type) +inline std::string* ArrowIpc::_internal_mutable_schema() { + + return _impl_.schema_.Mutable(GetArenaForAllocation()); +} +inline std::string* ArrowIpc::release_schema() { + // @@protoc_insertion_point(field_release:greptime.v1.region.ArrowIpc.schema) + return _impl_.schema_.Release(); +} +inline void ArrowIpc::set_allocated_schema(std::string* schema) { + if (schema != nullptr) { + + } else { + + } + _impl_.schema_.SetAllocated(schema, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.schema_.IsDefault()) { + _impl_.schema_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.ArrowIpc.schema) } // bytes payload = 3; -inline void BulkInsertRequest::clear_payload() { +inline void ArrowIpc::clear_payload() { _impl_.payload_.ClearToEmpty(); } -inline const std::string& BulkInsertRequest::payload() const { - // @@protoc_insertion_point(field_get:greptime.v1.region.BulkInsertRequest.payload) +inline const std::string& ArrowIpc::payload() const { + // @@protoc_insertion_point(field_get:greptime.v1.region.ArrowIpc.payload) return _internal_payload(); } template inline PROTOBUF_ALWAYS_INLINE -void BulkInsertRequest::set_payload(ArgT0&& arg0, ArgT... args) { +void ArrowIpc::set_payload(ArgT0&& arg0, ArgT... args) { _impl_.payload_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:greptime.v1.region.BulkInsertRequest.payload) + // @@protoc_insertion_point(field_set:greptime.v1.region.ArrowIpc.payload) } -inline std::string* BulkInsertRequest::mutable_payload() { +inline std::string* ArrowIpc::mutable_payload() { std::string* _s = _internal_mutable_payload(); - // @@protoc_insertion_point(field_mutable:greptime.v1.region.BulkInsertRequest.payload) + // @@protoc_insertion_point(field_mutable:greptime.v1.region.ArrowIpc.payload) return _s; } -inline const std::string& BulkInsertRequest::_internal_payload() const { +inline const std::string& ArrowIpc::_internal_payload() const { return _impl_.payload_.Get(); } -inline void BulkInsertRequest::_internal_set_payload(const std::string& value) { +inline void ArrowIpc::_internal_set_payload(const std::string& value) { _impl_.payload_.Set(value, GetArenaForAllocation()); } -inline std::string* BulkInsertRequest::_internal_mutable_payload() { +inline std::string* ArrowIpc::_internal_mutable_payload() { return _impl_.payload_.Mutable(GetArenaForAllocation()); } -inline std::string* BulkInsertRequest::release_payload() { - // @@protoc_insertion_point(field_release:greptime.v1.region.BulkInsertRequest.payload) +inline std::string* ArrowIpc::release_payload() { + // @@protoc_insertion_point(field_release:greptime.v1.region.ArrowIpc.payload) return _impl_.payload_.Release(); } -inline void BulkInsertRequest::set_allocated_payload(std::string* payload) { +inline void ArrowIpc::set_allocated_payload(std::string* payload) { if (payload != nullptr) { } else { @@ -10007,7 +10077,7 @@ inline void BulkInsertRequest::set_allocated_payload(std::string* payload) { _impl_.payload_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.BulkInsertRequest.payload) + // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.ArrowIpc.payload) } // ------------------------------------------------------------------- @@ -10337,16 +10407,6 @@ inline SyncRequest::ManifestInfoCase SyncRequest::manifest_info_case() const { } // namespace v1 } // namespace greptime -PROTOBUF_NAMESPACE_OPEN - -template <> struct is_proto_enum< ::greptime::v1::region::BulkInsertType> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::greptime::v1::region::BulkInsertType>() { - return ::greptime::v1::region::BulkInsertType_descriptor(); -} - -PROTOBUF_NAMESPACE_CLOSE - // @@protoc_insertion_point(global_scope) #include 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 24ea588..303ef32 100644 --- a/java/src/main/java/io/greptime/v1/region/Server.java +++ b/java/src/main/java/io/greptime/v1/region/Server.java @@ -14,105 +14,6 @@ public final class Server { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } - /** - * Protobuf enum {@code greptime.v1.region.BulkInsertType} - */ - public enum BulkInsertType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ARROW_IPC = 0; - */ - ARROW_IPC(0), - UNRECOGNIZED(-1), - ; - - /** - * ARROW_IPC = 0; - */ - public static final int ARROW_IPC_VALUE = 0; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BulkInsertType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BulkInsertType forNumber(int value) { - switch (value) { - case 0: return ARROW_IPC; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BulkInsertType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BulkInsertType findValueByNumber(int number) { - return BulkInsertType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.greptime.v1.region.Server.getDescriptor().getEnumTypes().get(0); - } - - private static final BulkInsertType[] VALUES = values(); - - public static BulkInsertType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BulkInsertType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:greptime.v1.region.BulkInsertType) - } - public interface RegionRequestHeaderOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.region.RegionRequestHeader) com.google.protobuf.MessageOrBuilder { @@ -1602,19 +1503,19 @@ java.lang.String defaultValue); io.greptime.v1.region.Server.AlterRequestsOrBuilder getAltersOrBuilder(); /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; - * @return Whether the bulkInserts field is set. + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; + * @return Whether the bulkInsert field is set. */ - boolean hasBulkInserts(); + boolean hasBulkInsert(); /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; - * @return The bulkInserts. + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; + * @return The bulkInsert. */ - io.greptime.v1.region.Server.BulkInsertRequests getBulkInserts(); + io.greptime.v1.region.Server.BulkInsertRequest getBulkInsert(); /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; */ - io.greptime.v1.region.Server.BulkInsertRequestsOrBuilder getBulkInsertsOrBuilder(); + io.greptime.v1.region.Server.BulkInsertRequestOrBuilder getBulkInsertOrBuilder(); /** * .greptime.v1.region.SyncRequest sync = 17; @@ -1874,14 +1775,14 @@ java.lang.String defaultValue); break; } case 130: { - io.greptime.v1.region.Server.BulkInsertRequests.Builder subBuilder = null; + io.greptime.v1.region.Server.BulkInsertRequest.Builder subBuilder = null; if (bodyCase_ == 16) { - subBuilder = ((io.greptime.v1.region.Server.BulkInsertRequests) body_).toBuilder(); + subBuilder = ((io.greptime.v1.region.Server.BulkInsertRequest) body_).toBuilder(); } body_ = - input.readMessage(io.greptime.v1.region.Server.BulkInsertRequests.parser(), extensionRegistry); + input.readMessage(io.greptime.v1.region.Server.BulkInsertRequest.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom((io.greptime.v1.region.Server.BulkInsertRequests) body_); + subBuilder.mergeFrom((io.greptime.v1.region.Server.BulkInsertRequest) body_); body_ = subBuilder.buildPartial(); } bodyCase_ = 16; @@ -1953,7 +1854,7 @@ java.lang.String defaultValue); CREATES(13), DROPS(14), ALTERS(15), - BULK_INSERTS(16), + BULK_INSERT(16), SYNC(17), BODY_NOT_SET(0); private final int value; @@ -1985,7 +1886,7 @@ java.lang.String defaultValue); case 13: return CREATES; case 14: return DROPS; case 15: return ALTERS; - case 16: return BULK_INSERTS; + case 16: return BULK_INSERT; case 17: return SYNC; case 0: return BODY_NOT_SET; default: return null; @@ -2431,35 +2332,35 @@ java.lang.String defaultValue); return io.greptime.v1.region.Server.AlterRequests.getDefaultInstance(); } - public static final int BULK_INSERTS_FIELD_NUMBER = 16; + public static final int BULK_INSERT_FIELD_NUMBER = 16; /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; - * @return Whether the bulkInserts field is set. + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; + * @return Whether the bulkInsert field is set. */ @java.lang.Override - public boolean hasBulkInserts() { + public boolean hasBulkInsert() { return bodyCase_ == 16; } /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; - * @return The bulkInserts. + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; + * @return The bulkInsert. */ @java.lang.Override - public io.greptime.v1.region.Server.BulkInsertRequests getBulkInserts() { + public io.greptime.v1.region.Server.BulkInsertRequest getBulkInsert() { if (bodyCase_ == 16) { - return (io.greptime.v1.region.Server.BulkInsertRequests) body_; + return (io.greptime.v1.region.Server.BulkInsertRequest) body_; } - return io.greptime.v1.region.Server.BulkInsertRequests.getDefaultInstance(); + return io.greptime.v1.region.Server.BulkInsertRequest.getDefaultInstance(); } /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; */ @java.lang.Override - public io.greptime.v1.region.Server.BulkInsertRequestsOrBuilder getBulkInsertsOrBuilder() { + public io.greptime.v1.region.Server.BulkInsertRequestOrBuilder getBulkInsertOrBuilder() { if (bodyCase_ == 16) { - return (io.greptime.v1.region.Server.BulkInsertRequests) body_; + return (io.greptime.v1.region.Server.BulkInsertRequest) body_; } - return io.greptime.v1.region.Server.BulkInsertRequests.getDefaultInstance(); + return io.greptime.v1.region.Server.BulkInsertRequest.getDefaultInstance(); } public static final int SYNC_FIELD_NUMBER = 17; @@ -2550,7 +2451,7 @@ java.lang.String defaultValue); output.writeMessage(15, (io.greptime.v1.region.Server.AlterRequests) body_); } if (bodyCase_ == 16) { - output.writeMessage(16, (io.greptime.v1.region.Server.BulkInsertRequests) body_); + output.writeMessage(16, (io.greptime.v1.region.Server.BulkInsertRequest) body_); } if (bodyCase_ == 17) { output.writeMessage(17, (io.greptime.v1.region.Server.SyncRequest) body_); @@ -2622,7 +2523,7 @@ java.lang.String defaultValue); } if (bodyCase_ == 16) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, (io.greptime.v1.region.Server.BulkInsertRequests) body_); + .computeMessageSize(16, (io.greptime.v1.region.Server.BulkInsertRequest) body_); } if (bodyCase_ == 17) { size += com.google.protobuf.CodedOutputStream @@ -2703,8 +2604,8 @@ java.lang.String defaultValue); .equals(other.getAlters())) return false; break; case 16: - if (!getBulkInserts() - .equals(other.getBulkInserts())) return false; + if (!getBulkInsert() + .equals(other.getBulkInsert())) return false; break; case 17: if (!getSync() @@ -2782,8 +2683,8 @@ java.lang.String defaultValue); hash = (53 * hash) + getAlters().hashCode(); break; case 16: - hash = (37 * hash) + BULK_INSERTS_FIELD_NUMBER; - hash = (53 * hash) + getBulkInserts().hashCode(); + hash = (37 * hash) + BULK_INSERT_FIELD_NUMBER; + hash = (53 * hash) + getBulkInsert().hashCode(); break; case 17: hash = (37 * hash) + SYNC_FIELD_NUMBER; @@ -3056,10 +2957,10 @@ java.lang.String defaultValue); } } if (bodyCase_ == 16) { - if (bulkInsertsBuilder_ == null) { + if (bulkInsertBuilder_ == null) { result.body_ = body_; } else { - result.body_ = bulkInsertsBuilder_.build(); + result.body_ = bulkInsertBuilder_.build(); } } if (bodyCase_ == 17) { @@ -3174,8 +3075,8 @@ java.lang.String defaultValue); mergeAlters(other.getAlters()); break; } - case BULK_INSERTS: { - mergeBulkInserts(other.getBulkInserts()); + case BULK_INSERT: { + mergeBulkInsert(other.getBulkInsert()); break; } case SYNC: { @@ -5196,71 +5097,71 @@ java.lang.String defaultValue); } private com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.region.Server.BulkInsertRequests, io.greptime.v1.region.Server.BulkInsertRequests.Builder, io.greptime.v1.region.Server.BulkInsertRequestsOrBuilder> bulkInsertsBuilder_; + io.greptime.v1.region.Server.BulkInsertRequest, io.greptime.v1.region.Server.BulkInsertRequest.Builder, io.greptime.v1.region.Server.BulkInsertRequestOrBuilder> bulkInsertBuilder_; /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; - * @return Whether the bulkInserts field is set. + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; + * @return Whether the bulkInsert field is set. */ @java.lang.Override - public boolean hasBulkInserts() { + public boolean hasBulkInsert() { return bodyCase_ == 16; } /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; - * @return The bulkInserts. + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; + * @return The bulkInsert. */ @java.lang.Override - public io.greptime.v1.region.Server.BulkInsertRequests getBulkInserts() { - if (bulkInsertsBuilder_ == null) { + public io.greptime.v1.region.Server.BulkInsertRequest getBulkInsert() { + if (bulkInsertBuilder_ == null) { if (bodyCase_ == 16) { - return (io.greptime.v1.region.Server.BulkInsertRequests) body_; + return (io.greptime.v1.region.Server.BulkInsertRequest) body_; } - return io.greptime.v1.region.Server.BulkInsertRequests.getDefaultInstance(); + return io.greptime.v1.region.Server.BulkInsertRequest.getDefaultInstance(); } else { if (bodyCase_ == 16) { - return bulkInsertsBuilder_.getMessage(); + return bulkInsertBuilder_.getMessage(); } - return io.greptime.v1.region.Server.BulkInsertRequests.getDefaultInstance(); + return io.greptime.v1.region.Server.BulkInsertRequest.getDefaultInstance(); } } /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; */ - public Builder setBulkInserts(io.greptime.v1.region.Server.BulkInsertRequests value) { - if (bulkInsertsBuilder_ == null) { + public Builder setBulkInsert(io.greptime.v1.region.Server.BulkInsertRequest value) { + if (bulkInsertBuilder_ == null) { if (value == null) { throw new NullPointerException(); } body_ = value; onChanged(); } else { - bulkInsertsBuilder_.setMessage(value); + bulkInsertBuilder_.setMessage(value); } bodyCase_ = 16; return this; } /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; */ - public Builder setBulkInserts( - io.greptime.v1.region.Server.BulkInsertRequests.Builder builderForValue) { - if (bulkInsertsBuilder_ == null) { + public Builder setBulkInsert( + io.greptime.v1.region.Server.BulkInsertRequest.Builder builderForValue) { + if (bulkInsertBuilder_ == null) { body_ = builderForValue.build(); onChanged(); } else { - bulkInsertsBuilder_.setMessage(builderForValue.build()); + bulkInsertBuilder_.setMessage(builderForValue.build()); } bodyCase_ = 16; return this; } /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; */ - public Builder mergeBulkInserts(io.greptime.v1.region.Server.BulkInsertRequests value) { - if (bulkInsertsBuilder_ == null) { + public Builder mergeBulkInsert(io.greptime.v1.region.Server.BulkInsertRequest value) { + if (bulkInsertBuilder_ == null) { if (bodyCase_ == 16 && - body_ != io.greptime.v1.region.Server.BulkInsertRequests.getDefaultInstance()) { - body_ = io.greptime.v1.region.Server.BulkInsertRequests.newBuilder((io.greptime.v1.region.Server.BulkInsertRequests) body_) + body_ != io.greptime.v1.region.Server.BulkInsertRequest.getDefaultInstance()) { + body_ = io.greptime.v1.region.Server.BulkInsertRequest.newBuilder((io.greptime.v1.region.Server.BulkInsertRequest) body_) .mergeFrom(value).buildPartial(); } else { body_ = value; @@ -5268,19 +5169,19 @@ java.lang.String defaultValue); onChanged(); } else { if (bodyCase_ == 16) { - bulkInsertsBuilder_.mergeFrom(value); + bulkInsertBuilder_.mergeFrom(value); } else { - bulkInsertsBuilder_.setMessage(value); + bulkInsertBuilder_.setMessage(value); } } bodyCase_ = 16; return this; } /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; */ - public Builder clearBulkInserts() { - if (bulkInsertsBuilder_ == null) { + public Builder clearBulkInsert() { + if (bulkInsertBuilder_ == null) { if (bodyCase_ == 16) { bodyCase_ = 0; body_ = null; @@ -5291,50 +5192,50 @@ java.lang.String defaultValue); bodyCase_ = 0; body_ = null; } - bulkInsertsBuilder_.clear(); + bulkInsertBuilder_.clear(); } return this; } /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; */ - public io.greptime.v1.region.Server.BulkInsertRequests.Builder getBulkInsertsBuilder() { - return getBulkInsertsFieldBuilder().getBuilder(); + public io.greptime.v1.region.Server.BulkInsertRequest.Builder getBulkInsertBuilder() { + return getBulkInsertFieldBuilder().getBuilder(); } /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; */ @java.lang.Override - public io.greptime.v1.region.Server.BulkInsertRequestsOrBuilder getBulkInsertsOrBuilder() { - if ((bodyCase_ == 16) && (bulkInsertsBuilder_ != null)) { - return bulkInsertsBuilder_.getMessageOrBuilder(); + public io.greptime.v1.region.Server.BulkInsertRequestOrBuilder getBulkInsertOrBuilder() { + if ((bodyCase_ == 16) && (bulkInsertBuilder_ != null)) { + return bulkInsertBuilder_.getMessageOrBuilder(); } else { if (bodyCase_ == 16) { - return (io.greptime.v1.region.Server.BulkInsertRequests) body_; + return (io.greptime.v1.region.Server.BulkInsertRequest) body_; } - return io.greptime.v1.region.Server.BulkInsertRequests.getDefaultInstance(); + return io.greptime.v1.region.Server.BulkInsertRequest.getDefaultInstance(); } } /** - * .greptime.v1.region.BulkInsertRequests bulk_inserts = 16; + * .greptime.v1.region.BulkInsertRequest bulk_insert = 16; */ private com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.region.Server.BulkInsertRequests, io.greptime.v1.region.Server.BulkInsertRequests.Builder, io.greptime.v1.region.Server.BulkInsertRequestsOrBuilder> - getBulkInsertsFieldBuilder() { - if (bulkInsertsBuilder_ == null) { + io.greptime.v1.region.Server.BulkInsertRequest, io.greptime.v1.region.Server.BulkInsertRequest.Builder, io.greptime.v1.region.Server.BulkInsertRequestOrBuilder> + getBulkInsertFieldBuilder() { + if (bulkInsertBuilder_ == null) { if (!(bodyCase_ == 16)) { - body_ = io.greptime.v1.region.Server.BulkInsertRequests.getDefaultInstance(); + body_ = io.greptime.v1.region.Server.BulkInsertRequest.getDefaultInstance(); } - bulkInsertsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.region.Server.BulkInsertRequests, io.greptime.v1.region.Server.BulkInsertRequests.Builder, io.greptime.v1.region.Server.BulkInsertRequestsOrBuilder>( - (io.greptime.v1.region.Server.BulkInsertRequests) body_, + bulkInsertBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.region.Server.BulkInsertRequest, io.greptime.v1.region.Server.BulkInsertRequest.Builder, io.greptime.v1.region.Server.BulkInsertRequestOrBuilder>( + (io.greptime.v1.region.Server.BulkInsertRequest) body_, getParentForChildren(), isClean()); body_ = null; } bodyCase_ = 16; onChanged();; - return bulkInsertsBuilder_; + return bulkInsertBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< @@ -25925,837 +25826,32 @@ java.lang.String defaultValue); } - public interface BulkInsertRequestsOrBuilder extends - // @@protoc_insertion_point(interface_extends:greptime.v1.region.BulkInsertRequests) + public interface BulkInsertRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.region.BulkInsertRequest) com.google.protobuf.MessageOrBuilder { /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * @return Whether the arrowIpc field is set. */ - java.util.List - getRequestsList(); + boolean hasArrowIpc(); /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * @return The arrowIpc. */ - io.greptime.v1.region.Server.BulkInsertRequest getRequests(int index); + io.greptime.v1.region.Server.ArrowIpc getArrowIpc(); /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; */ - int getRequestsCount(); - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - java.util.List - getRequestsOrBuilderList(); - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - io.greptime.v1.region.Server.BulkInsertRequestOrBuilder getRequestsOrBuilder( - int index); + io.greptime.v1.region.Server.ArrowIpcOrBuilder getArrowIpcOrBuilder(); + + public io.greptime.v1.region.Server.BulkInsertRequest.BodyCase getBodyCase(); } /** *
    * Request of bulk ingestion API.
    * 
* - * Protobuf type {@code greptime.v1.region.BulkInsertRequests} - */ - public static final class BulkInsertRequests extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:greptime.v1.region.BulkInsertRequests) - BulkInsertRequestsOrBuilder { - private static final long serialVersionUID = 0L; - // Use BulkInsertRequests.newBuilder() to construct. - private BulkInsertRequests(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BulkInsertRequests() { - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BulkInsertRequests(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BulkInsertRequests( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(io.greptime.v1.region.Server.BulkInsertRequest.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)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - 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_BulkInsertRequests_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.greptime.v1.region.Server.internal_static_greptime_v1_region_BulkInsertRequests_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.greptime.v1.region.Server.BulkInsertRequests.class, io.greptime.v1.region.Server.BulkInsertRequests.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - @java.lang.Override - public io.greptime.v1.region.Server.BulkInsertRequest getRequests(int index) { - return requests_.get(index); - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - @java.lang.Override - public io.greptime.v1.region.Server.BulkInsertRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - 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 { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - 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.BulkInsertRequests)) { - return super.equals(obj); - } - io.greptime.v1.region.Server.BulkInsertRequests other = (io.greptime.v1.region.Server.BulkInsertRequests) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) 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 (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.greptime.v1.region.Server.BulkInsertRequests parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.greptime.v1.region.Server.BulkInsertRequests 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.BulkInsertRequests parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.greptime.v1.region.Server.BulkInsertRequests 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.BulkInsertRequests parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.greptime.v1.region.Server.BulkInsertRequests 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.BulkInsertRequests parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.greptime.v1.region.Server.BulkInsertRequests 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.BulkInsertRequests parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.greptime.v1.region.Server.BulkInsertRequests 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.BulkInsertRequests 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.BulkInsertRequests 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.BulkInsertRequests 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; - } - /** - *
-     * Request of bulk ingestion API.
-     * 
- * - * Protobuf type {@code greptime.v1.region.BulkInsertRequests} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:greptime.v1.region.BulkInsertRequests) - io.greptime.v1.region.Server.BulkInsertRequestsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.greptime.v1.region.Server.internal_static_greptime_v1_region_BulkInsertRequests_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.greptime.v1.region.Server.internal_static_greptime_v1_region_BulkInsertRequests_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.greptime.v1.region.Server.BulkInsertRequests.class, io.greptime.v1.region.Server.BulkInsertRequests.Builder.class); - } - - // Construct using io.greptime.v1.region.Server.BulkInsertRequests.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.greptime.v1.region.Server.internal_static_greptime_v1_region_BulkInsertRequests_descriptor; - } - - @java.lang.Override - public io.greptime.v1.region.Server.BulkInsertRequests getDefaultInstanceForType() { - return io.greptime.v1.region.Server.BulkInsertRequests.getDefaultInstance(); - } - - @java.lang.Override - public io.greptime.v1.region.Server.BulkInsertRequests build() { - io.greptime.v1.region.Server.BulkInsertRequests result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.greptime.v1.region.Server.BulkInsertRequests buildPartial() { - io.greptime.v1.region.Server.BulkInsertRequests result = new io.greptime.v1.region.Server.BulkInsertRequests(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - 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.BulkInsertRequests) { - return mergeFrom((io.greptime.v1.region.Server.BulkInsertRequests)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.greptime.v1.region.Server.BulkInsertRequests other) { - if (other == io.greptime.v1.region.Server.BulkInsertRequests.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - 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.BulkInsertRequests parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.greptime.v1.region.Server.BulkInsertRequests) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.greptime.v1.region.Server.BulkInsertRequest, io.greptime.v1.region.Server.BulkInsertRequest.Builder, io.greptime.v1.region.Server.BulkInsertRequestOrBuilder> requestsBuilder_; - - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public io.greptime.v1.region.Server.BulkInsertRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public Builder setRequests( - int index, io.greptime.v1.region.Server.BulkInsertRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public Builder setRequests( - int index, io.greptime.v1.region.Server.BulkInsertRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public Builder addRequests(io.greptime.v1.region.Server.BulkInsertRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public Builder addRequests( - int index, io.greptime.v1.region.Server.BulkInsertRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public Builder addRequests( - io.greptime.v1.region.Server.BulkInsertRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public Builder addRequests( - int index, io.greptime.v1.region.Server.BulkInsertRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public io.greptime.v1.region.Server.BulkInsertRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public io.greptime.v1.region.Server.BulkInsertRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public io.greptime.v1.region.Server.BulkInsertRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - io.greptime.v1.region.Server.BulkInsertRequest.getDefaultInstance()); - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public io.greptime.v1.region.Server.BulkInsertRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, io.greptime.v1.region.Server.BulkInsertRequest.getDefaultInstance()); - } - /** - * repeated .greptime.v1.region.BulkInsertRequest requests = 1; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.greptime.v1.region.Server.BulkInsertRequest, io.greptime.v1.region.Server.BulkInsertRequest.Builder, io.greptime.v1.region.Server.BulkInsertRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.greptime.v1.region.Server.BulkInsertRequest, io.greptime.v1.region.Server.BulkInsertRequest.Builder, io.greptime.v1.region.Server.BulkInsertRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - @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.BulkInsertRequests) - } - - // @@protoc_insertion_point(class_scope:greptime.v1.region.BulkInsertRequests) - private static final io.greptime.v1.region.Server.BulkInsertRequests DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.greptime.v1.region.Server.BulkInsertRequests(); - } - - public static io.greptime.v1.region.Server.BulkInsertRequests getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BulkInsertRequests parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BulkInsertRequests(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.BulkInsertRequests getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface BulkInsertRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:greptime.v1.region.BulkInsertRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 region_id = 1; - * @return The regionId. - */ - long getRegionId(); - - /** - * .greptime.v1.region.BulkInsertType payload_type = 2; - * @return The enum numeric value on the wire for payloadType. - */ - int getPayloadTypeValue(); - /** - * .greptime.v1.region.BulkInsertType payload_type = 2; - * @return The payloadType. - */ - io.greptime.v1.region.Server.BulkInsertType getPayloadType(); - - /** - * bytes payload = 3; - * @return The payload. - */ - com.google.protobuf.ByteString getPayload(); - } - /** * Protobuf type {@code greptime.v1.region.BulkInsertRequest} */ public static final class BulkInsertRequest extends @@ -26768,8 +25864,6 @@ java.lang.String defaultValue); super(builder); } private BulkInsertRequest() { - payloadType_ = 0; - payload_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @@ -26802,20 +25896,18 @@ java.lang.String defaultValue); case 0: done = true; break; - case 8: { - - regionId_ = input.readUInt64(); - break; - } - case 16: { - int rawValue = input.readEnum(); - - payloadType_ = rawValue; - break; - } - case 26: { - - payload_ = input.readBytes(); + case 10: { + io.greptime.v1.region.Server.ArrowIpc.Builder subBuilder = null; + if (bodyCase_ == 1) { + subBuilder = ((io.greptime.v1.region.Server.ArrowIpc) body_).toBuilder(); + } + body_ = + input.readMessage(io.greptime.v1.region.Server.ArrowIpc.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.region.Server.ArrowIpc) body_); + body_ = subBuilder.buildPartial(); + } + bodyCase_ = 1; break; } default: { @@ -26852,45 +25944,74 @@ java.lang.String defaultValue); io.greptime.v1.region.Server.BulkInsertRequest.class, io.greptime.v1.region.Server.BulkInsertRequest.Builder.class); } - public static final int REGION_ID_FIELD_NUMBER = 1; - private long regionId_; - /** - * uint64 region_id = 1; - * @return The regionId. - */ - @java.lang.Override - public long getRegionId() { - return regionId_; + private int bodyCase_ = 0; + private java.lang.Object body_; + public enum BodyCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ARROW_IPC(1), + BODY_NOT_SET(0); + private final int value; + private BodyCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BodyCase valueOf(int value) { + return forNumber(value); + } + + public static BodyCase forNumber(int value) { + switch (value) { + case 1: return ARROW_IPC; + case 0: return BODY_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public BodyCase + getBodyCase() { + return BodyCase.forNumber( + bodyCase_); } - public static final int PAYLOAD_TYPE_FIELD_NUMBER = 2; - private int payloadType_; + public static final int ARROW_IPC_FIELD_NUMBER = 1; /** - * .greptime.v1.region.BulkInsertType payload_type = 2; - * @return The enum numeric value on the wire for payloadType. - */ - @java.lang.Override public int getPayloadTypeValue() { - return payloadType_; - } - /** - * .greptime.v1.region.BulkInsertType payload_type = 2; - * @return The payloadType. - */ - @java.lang.Override public io.greptime.v1.region.Server.BulkInsertType getPayloadType() { - @SuppressWarnings("deprecation") - io.greptime.v1.region.Server.BulkInsertType result = io.greptime.v1.region.Server.BulkInsertType.valueOf(payloadType_); - return result == null ? io.greptime.v1.region.Server.BulkInsertType.UNRECOGNIZED : result; - } - - public static final int PAYLOAD_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString payload_; - /** - * bytes payload = 3; - * @return The payload. + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * @return Whether the arrowIpc field is set. */ @java.lang.Override - public com.google.protobuf.ByteString getPayload() { - return payload_; + public boolean hasArrowIpc() { + return bodyCase_ == 1; + } + /** + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * @return The arrowIpc. + */ + @java.lang.Override + public io.greptime.v1.region.Server.ArrowIpc getArrowIpc() { + if (bodyCase_ == 1) { + return (io.greptime.v1.region.Server.ArrowIpc) body_; + } + return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + } + /** + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + */ + @java.lang.Override + public io.greptime.v1.region.Server.ArrowIpcOrBuilder getArrowIpcOrBuilder() { + if (bodyCase_ == 1) { + return (io.greptime.v1.region.Server.ArrowIpc) body_; + } + return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -26907,14 +26028,8 @@ java.lang.String defaultValue); @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (regionId_ != 0L) { - output.writeUInt64(1, regionId_); - } - if (payloadType_ != io.greptime.v1.region.Server.BulkInsertType.ARROW_IPC.getNumber()) { - output.writeEnum(2, payloadType_); - } - if (!payload_.isEmpty()) { - output.writeBytes(3, payload_); + if (bodyCase_ == 1) { + output.writeMessage(1, (io.greptime.v1.region.Server.ArrowIpc) body_); } unknownFields.writeTo(output); } @@ -26925,17 +26040,9 @@ java.lang.String defaultValue); if (size != -1) return size; size = 0; - if (regionId_ != 0L) { + if (bodyCase_ == 1) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, regionId_); - } - if (payloadType_ != io.greptime.v1.region.Server.BulkInsertType.ARROW_IPC.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, payloadType_); - } - if (!payload_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, payload_); + .computeMessageSize(1, (io.greptime.v1.region.Server.ArrowIpc) body_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -26952,11 +26059,15 @@ java.lang.String defaultValue); } io.greptime.v1.region.Server.BulkInsertRequest other = (io.greptime.v1.region.Server.BulkInsertRequest) obj; - if (getRegionId() - != other.getRegionId()) return false; - if (payloadType_ != other.payloadType_) return false; - if (!getPayload() - .equals(other.getPayload())) return false; + if (!getBodyCase().equals(other.getBodyCase())) return false; + switch (bodyCase_) { + case 1: + if (!getArrowIpc() + .equals(other.getArrowIpc())) return false; + break; + case 0: + default: + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -26968,13 +26079,14 @@ java.lang.String defaultValue); } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + REGION_ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getRegionId()); - hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; - hash = (53 * hash) + payloadType_; - hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; - hash = (53 * hash) + getPayload().hashCode(); + switch (bodyCase_) { + case 1: + hash = (37 * hash) + ARROW_IPC_FIELD_NUMBER; + hash = (53 * hash) + getArrowIpc().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -27071,6 +26183,10 @@ java.lang.String defaultValue); return builder; } /** + *
+     * Request of bulk ingestion API.
+     * 
+ * * Protobuf type {@code greptime.v1.region.BulkInsertRequest} */ public static final class Builder extends @@ -27108,12 +26224,8 @@ java.lang.String defaultValue); @java.lang.Override public Builder clear() { super.clear(); - regionId_ = 0L; - - payloadType_ = 0; - - payload_ = com.google.protobuf.ByteString.EMPTY; - + bodyCase_ = 0; + body_ = null; return this; } @@ -27140,9 +26252,14 @@ java.lang.String defaultValue); @java.lang.Override public io.greptime.v1.region.Server.BulkInsertRequest buildPartial() { io.greptime.v1.region.Server.BulkInsertRequest result = new io.greptime.v1.region.Server.BulkInsertRequest(this); - result.regionId_ = regionId_; - result.payloadType_ = payloadType_; - result.payload_ = payload_; + if (bodyCase_ == 1) { + if (arrowIpcBuilder_ == null) { + result.body_ = body_; + } else { + result.body_ = arrowIpcBuilder_.build(); + } + } + result.bodyCase_ = bodyCase_; onBuilt(); return result; } @@ -27191,14 +26308,14 @@ java.lang.String defaultValue); public Builder mergeFrom(io.greptime.v1.region.Server.BulkInsertRequest other) { if (other == io.greptime.v1.region.Server.BulkInsertRequest.getDefaultInstance()) return this; - if (other.getRegionId() != 0L) { - setRegionId(other.getRegionId()); - } - if (other.payloadType_ != 0) { - setPayloadTypeValue(other.getPayloadTypeValue()); - } - if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { - setPayload(other.getPayload()); + switch (other.getBodyCase()) { + case ARROW_IPC: { + mergeArrowIpc(other.getArrowIpc()); + break; + } + case BODY_NOT_SET: { + break; + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -27228,6 +26345,703 @@ java.lang.String defaultValue); } return this; } + private int bodyCase_ = 0; + private java.lang.Object body_; + public BodyCase + getBodyCase() { + return BodyCase.forNumber( + bodyCase_); + } + + public Builder clearBody() { + bodyCase_ = 0; + body_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.region.Server.ArrowIpc, io.greptime.v1.region.Server.ArrowIpc.Builder, io.greptime.v1.region.Server.ArrowIpcOrBuilder> arrowIpcBuilder_; + /** + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * @return Whether the arrowIpc field is set. + */ + @java.lang.Override + public boolean hasArrowIpc() { + return bodyCase_ == 1; + } + /** + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * @return The arrowIpc. + */ + @java.lang.Override + public io.greptime.v1.region.Server.ArrowIpc getArrowIpc() { + if (arrowIpcBuilder_ == null) { + if (bodyCase_ == 1) { + return (io.greptime.v1.region.Server.ArrowIpc) body_; + } + return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + } else { + if (bodyCase_ == 1) { + return arrowIpcBuilder_.getMessage(); + } + return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + } + } + /** + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + */ + public Builder setArrowIpc(io.greptime.v1.region.Server.ArrowIpc value) { + if (arrowIpcBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + onChanged(); + } else { + arrowIpcBuilder_.setMessage(value); + } + bodyCase_ = 1; + return this; + } + /** + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + */ + public Builder setArrowIpc( + io.greptime.v1.region.Server.ArrowIpc.Builder builderForValue) { + if (arrowIpcBuilder_ == null) { + body_ = builderForValue.build(); + onChanged(); + } else { + arrowIpcBuilder_.setMessage(builderForValue.build()); + } + bodyCase_ = 1; + return this; + } + /** + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + */ + public Builder mergeArrowIpc(io.greptime.v1.region.Server.ArrowIpc value) { + if (arrowIpcBuilder_ == null) { + if (bodyCase_ == 1 && + body_ != io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance()) { + body_ = io.greptime.v1.region.Server.ArrowIpc.newBuilder((io.greptime.v1.region.Server.ArrowIpc) body_) + .mergeFrom(value).buildPartial(); + } else { + body_ = value; + } + onChanged(); + } else { + if (bodyCase_ == 1) { + arrowIpcBuilder_.mergeFrom(value); + } else { + arrowIpcBuilder_.setMessage(value); + } + } + bodyCase_ = 1; + return this; + } + /** + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + */ + public Builder clearArrowIpc() { + if (arrowIpcBuilder_ == null) { + if (bodyCase_ == 1) { + bodyCase_ = 0; + body_ = null; + onChanged(); + } + } else { + if (bodyCase_ == 1) { + bodyCase_ = 0; + body_ = null; + } + arrowIpcBuilder_.clear(); + } + return this; + } + /** + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + */ + public io.greptime.v1.region.Server.ArrowIpc.Builder getArrowIpcBuilder() { + return getArrowIpcFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + */ + @java.lang.Override + public io.greptime.v1.region.Server.ArrowIpcOrBuilder getArrowIpcOrBuilder() { + if ((bodyCase_ == 1) && (arrowIpcBuilder_ != null)) { + return arrowIpcBuilder_.getMessageOrBuilder(); + } else { + if (bodyCase_ == 1) { + return (io.greptime.v1.region.Server.ArrowIpc) body_; + } + return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + } + } + /** + * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.region.Server.ArrowIpc, io.greptime.v1.region.Server.ArrowIpc.Builder, io.greptime.v1.region.Server.ArrowIpcOrBuilder> + getArrowIpcFieldBuilder() { + if (arrowIpcBuilder_ == null) { + if (!(bodyCase_ == 1)) { + body_ = io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + } + arrowIpcBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.region.Server.ArrowIpc, io.greptime.v1.region.Server.ArrowIpc.Builder, io.greptime.v1.region.Server.ArrowIpcOrBuilder>( + (io.greptime.v1.region.Server.ArrowIpc) body_, + getParentForChildren(), + isClean()); + body_ = null; + } + bodyCase_ = 1; + onChanged();; + return arrowIpcBuilder_; + } + @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.BulkInsertRequest) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.region.BulkInsertRequest) + private static final io.greptime.v1.region.Server.BulkInsertRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.region.Server.BulkInsertRequest(); + } + + public static io.greptime.v1.region.Server.BulkInsertRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkInsertRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BulkInsertRequest(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.BulkInsertRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ArrowIpcOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.region.ArrowIpc) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 region_id = 1; + * @return The regionId. + */ + long getRegionId(); + + /** + * bytes schema = 2; + * @return The schema. + */ + com.google.protobuf.ByteString getSchema(); + + /** + * bytes payload = 3; + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + } + /** + * Protobuf type {@code greptime.v1.region.ArrowIpc} + */ + public static final class ArrowIpc extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.region.ArrowIpc) + ArrowIpcOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrowIpc.newBuilder() to construct. + private ArrowIpc(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArrowIpc() { + schema_ = com.google.protobuf.ByteString.EMPTY; + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArrowIpc(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArrowIpc( + 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 8: { + + regionId_ = input.readUInt64(); + break; + } + case 18: { + + schema_ = input.readBytes(); + break; + } + case 26: { + + payload_ = input.readBytes(); + 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_ArrowIpc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.region.Server.internal_static_greptime_v1_region_ArrowIpc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.region.Server.ArrowIpc.class, io.greptime.v1.region.Server.ArrowIpc.Builder.class); + } + + public static final int REGION_ID_FIELD_NUMBER = 1; + private long regionId_; + /** + * uint64 region_id = 1; + * @return The regionId. + */ + @java.lang.Override + public long getRegionId() { + return regionId_; + } + + public static final int SCHEMA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString schema_; + /** + * bytes schema = 2; + * @return The schema. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchema() { + return schema_; + } + + public static final int PAYLOAD_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString payload_; + /** + * bytes payload = 3; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + 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 (regionId_ != 0L) { + output.writeUInt64(1, regionId_); + } + if (!schema_.isEmpty()) { + output.writeBytes(2, schema_); + } + if (!payload_.isEmpty()) { + output.writeBytes(3, payload_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (regionId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, regionId_); + } + if (!schema_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, schema_); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, payload_); + } + 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.ArrowIpc)) { + return super.equals(obj); + } + io.greptime.v1.region.Server.ArrowIpc other = (io.greptime.v1.region.Server.ArrowIpc) obj; + + if (getRegionId() + != other.getRegionId()) return false; + if (!getSchema() + .equals(other.getSchema())) return false; + if (!getPayload() + .equals(other.getPayload())) 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(); + hash = (37 * hash) + REGION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRegionId()); + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.region.Server.ArrowIpc parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.region.Server.ArrowIpc 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.ArrowIpc parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.region.Server.ArrowIpc 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.ArrowIpc parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.region.Server.ArrowIpc 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.ArrowIpc parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.region.Server.ArrowIpc 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.ArrowIpc parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.region.Server.ArrowIpc 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.ArrowIpc 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.ArrowIpc 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.ArrowIpc 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.ArrowIpc} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.region.ArrowIpc) + io.greptime.v1.region.Server.ArrowIpcOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.region.Server.internal_static_greptime_v1_region_ArrowIpc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.region.Server.internal_static_greptime_v1_region_ArrowIpc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.region.Server.ArrowIpc.class, io.greptime.v1.region.Server.ArrowIpc.Builder.class); + } + + // Construct using io.greptime.v1.region.Server.ArrowIpc.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; + + schema_ = com.google.protobuf.ByteString.EMPTY; + + payload_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.region.Server.internal_static_greptime_v1_region_ArrowIpc_descriptor; + } + + @java.lang.Override + public io.greptime.v1.region.Server.ArrowIpc getDefaultInstanceForType() { + return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.region.Server.ArrowIpc build() { + io.greptime.v1.region.Server.ArrowIpc result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.region.Server.ArrowIpc buildPartial() { + io.greptime.v1.region.Server.ArrowIpc result = new io.greptime.v1.region.Server.ArrowIpc(this); + result.regionId_ = regionId_; + result.schema_ = schema_; + result.payload_ = payload_; + 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.ArrowIpc) { + return mergeFrom((io.greptime.v1.region.Server.ArrowIpc)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.region.Server.ArrowIpc other) { + if (other == io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance()) return this; + if (other.getRegionId() != 0L) { + setRegionId(other.getRegionId()); + } + if (other.getSchema() != com.google.protobuf.ByteString.EMPTY) { + setSchema(other.getSchema()); + } + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + 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.ArrowIpc parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.region.Server.ArrowIpc) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } private long regionId_ ; /** @@ -27260,56 +27074,36 @@ java.lang.String defaultValue); return this; } - private int payloadType_ = 0; + private com.google.protobuf.ByteString schema_ = com.google.protobuf.ByteString.EMPTY; /** - * .greptime.v1.region.BulkInsertType payload_type = 2; - * @return The enum numeric value on the wire for payloadType. - */ - @java.lang.Override public int getPayloadTypeValue() { - return payloadType_; - } - /** - * .greptime.v1.region.BulkInsertType payload_type = 2; - * @param value The enum numeric value on the wire for payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadTypeValue(int value) { - - payloadType_ = value; - onChanged(); - return this; - } - /** - * .greptime.v1.region.BulkInsertType payload_type = 2; - * @return The payloadType. + * bytes schema = 2; + * @return The schema. */ @java.lang.Override - public io.greptime.v1.region.Server.BulkInsertType getPayloadType() { - @SuppressWarnings("deprecation") - io.greptime.v1.region.Server.BulkInsertType result = io.greptime.v1.region.Server.BulkInsertType.valueOf(payloadType_); - return result == null ? io.greptime.v1.region.Server.BulkInsertType.UNRECOGNIZED : result; + public com.google.protobuf.ByteString getSchema() { + return schema_; } /** - * .greptime.v1.region.BulkInsertType payload_type = 2; - * @param value The payloadType to set. + * bytes schema = 2; + * @param value The schema to set. * @return This builder for chaining. */ - public Builder setPayloadType(io.greptime.v1.region.Server.BulkInsertType value) { + public Builder setSchema(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - - payloadType_ = value.getNumber(); + throw new NullPointerException(); + } + + schema_ = value; onChanged(); return this; } /** - * .greptime.v1.region.BulkInsertType payload_type = 2; + * bytes schema = 2; * @return This builder for chaining. */ - public Builder clearPayloadType() { + public Builder clearSchema() { - payloadType_ = 0; + schema_ = getDefaultInstance().getSchema(); onChanged(); return this; } @@ -27360,41 +27154,41 @@ java.lang.String defaultValue); } - // @@protoc_insertion_point(builder_scope:greptime.v1.region.BulkInsertRequest) + // @@protoc_insertion_point(builder_scope:greptime.v1.region.ArrowIpc) } - // @@protoc_insertion_point(class_scope:greptime.v1.region.BulkInsertRequest) - private static final io.greptime.v1.region.Server.BulkInsertRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:greptime.v1.region.ArrowIpc) + private static final io.greptime.v1.region.Server.ArrowIpc DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new io.greptime.v1.region.Server.BulkInsertRequest(); + DEFAULT_INSTANCE = new io.greptime.v1.region.Server.ArrowIpc(); } - public static io.greptime.v1.region.Server.BulkInsertRequest getDefaultInstance() { + public static io.greptime.v1.region.Server.ArrowIpc getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public BulkInsertRequest parsePartialFrom( + public ArrowIpc parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BulkInsertRequest(input, extensionRegistry); + return new ArrowIpc(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public io.greptime.v1.region.Server.BulkInsertRequest getDefaultInstanceForType() { + public io.greptime.v1.region.Server.ArrowIpc getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -29649,16 +29443,16 @@ java.lang.String defaultValue); private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_region_RegionColumnDef_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_greptime_v1_region_BulkInsertRequests_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_greptime_v1_region_BulkInsertRequests_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_region_BulkInsertRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_region_BulkInsertRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_region_ArrowIpc_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_region_ArrowIpc_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_region_MitoManifestInfo_descriptor; private static final @@ -29691,7 +29485,7 @@ java.lang.String defaultValue); "onRequestHeader.TracingContextEntry\022\016\n\006d" + "bname\030\003 \001(\t\0220\n\rquery_context\030\006 \001(\0132\031.gre" + "ptime.v1.QueryContext\0325\n\023TracingContextE" + - "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\356\006\n" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\354\006\n" + "\rRegionRequest\0227\n\006header\030\001 \001(\0132\'.greptim" + "e.v1.region.RegionRequestHeader\0225\n\007inser" + "ts\030\003 \001(\0132\".greptime.v1.region.InsertRequ" + @@ -29710,90 +29504,88 @@ java.lang.String defaultValue); "\007creates\030\r \001(\0132\".greptime.v1.region.Crea" + "teRequestsH\000\0221\n\005drops\030\016 \001(\0132 .greptime.v" + "1.region.DropRequestsH\000\0223\n\006alters\030\017 \001(\0132" + - "!.greptime.v1.region.AlterRequestsH\000\022>\n\014" + - "bulk_inserts\030\020 \001(\0132&.greptime.v1.region." + - "BulkInsertRequestsH\000\022/\n\004sync\030\021 \001(\0132\037.gre" + - "ptime.v1.region.SyncRequestH\000B\006\n\004body\"\317\001" + - "\n\016RegionResponse\022+\n\006header\030\001 \001(\0132\033.grept" + - "ime.v1.ResponseHeader\022\025\n\raffected_rows\030\002" + - " \001(\004\022F\n\nextensions\030\003 \003(\01322.greptime.v1.r" + - "egion.RegionResponse.ExtensionsEntry\0321\n\017" + - "ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + - "\001(\014:\0028\001\"E\n\016InsertRequests\0223\n\010requests\030\001 " + - "\003(\0132!.greptime.v1.region.InsertRequest\"E" + - "\n\016DeleteRequests\0223\n\010requests\030\001 \003(\0132!.gre" + - "ptime.v1.region.DeleteRequest\"C\n\rInsertR" + - "equest\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 \001(\0132" + - "\021.greptime.v1.Rows\"C\n\rDeleteRequest\022\021\n\tr" + - "egion_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.RegionRequestHeader" + - "\022\021\n\tregion_id\030\002 \001(\004\022\014\n\004plan\030\003 \001(\014\"E\n\016Cre" + - "ateRequests\0223\n\010requests\030\001 \003(\0132!.greptime" + - ".v1.region.CreateRequest\"\200\002\n\rCreateReque" + - "st\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\004" + - "path\030\005 \001(\t\022?\n\007options\030\006 \003(\0132..greptime.v" + - "1.region.CreateRequest.OptionsEntry\032.\n\014O" + - "ptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + - "\0028\001\"A\n\014DropRequests\0221\n\010requests\030\001 \003(\0132\037." + - "greptime.v1.region.DropRequest\"3\n\013DropRe" + - "quest\022\021\n\tregion_id\030\001 \001(\004\022\021\n\tfast_path\030\002 " + - "\001(\010\"\255\001\n\013OpenRequest\022\021\n\tregion_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.region.OpenRequest.O" + - "ptionsEntry\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t" + - "\022\r\n\005value\030\002 \001(\t:\0028\001\"!\n\014CloseRequest\022\021\n\tr" + - "egion_id\030\001 \001(\004\"C\n\rAlterRequests\0222\n\010reque" + - "sts\030\001 \003(\0132 .greptime.v1.region.AlterRequ" + - "est\"\306\003\n\014AlterRequest\022\021\n\tregion_id\030\001 \001(\004\022" + - "5\n\013add_columns\030\002 \001(\0132\036.greptime.v1.regio" + - "n.AddColumnsH\000\0227\n\014drop_columns\030\003 \001(\0132\037.g" + - "reptime.v1.region.DropColumnsH\000\022=\n\023modif" + - "y_column_types\030\005 \001(\0132\036.greptime.v1.Modif" + - "yColumnTypesH\000\0229\n\021set_table_options\030\006 \001(" + - "\0132\034.greptime.v1.SetTableOptionsH\000\022=\n\023uns" + - "et_table_options\030\t \001(\0132\036.greptime.v1.Uns" + - "etTableOptionsH\000\022*\n\tset_index\030\n \001(\0132\025.gr" + - "eptime.v1.SetIndexH\000\022.\n\013unset_index\030\013 \001(" + - "\0132\027.greptime.v1.UnsetIndexH\000\022\026\n\016schema_v" + - "ersion\030\004 \001(\004B\006\n\004kind\"@\n\nAddColumns\0222\n\013ad" + - "d_columns\030\001 \003(\0132\035.greptime.v1.region.Add" + - "Column\"C\n\013DropColumns\0224\n\014drop_columns\030\001 " + - "\003(\0132\036.greptime.v1.region.DropColumn\"v\n\tA" + - "ddColumn\0227\n\ncolumn_def\030\001 \001(\0132#.greptime." + - "v1.region.RegionColumnDef\0220\n\010location\030\003 " + - "\001(\0132\036.greptime.v1.AddColumnLocation\"\032\n\nD" + - "ropColumn\022\014\n\004name\030\001 \001(\t\"!\n\014FlushRequest\022" + - "\021\n\tregion_id\030\001 \001(\004\"\t\n\007Regular\"&\n\014StrictW" + - "indow\022\026\n\016window_seconds\030\001 \001(\003\"\231\001\n\016Compac" + - "tRequest\022\021\n\tregion_id\030\001 \001(\004\022.\n\007regular\030\002" + - " \001(\0132\033.greptime.v1.region.RegularH\000\0229\n\rs" + - "trict_window\030\003 \001(\0132 .greptime.v1.region." + - "StrictWindowH\000B\t\n\007options\"$\n\017TruncateReq" + - "uest\022\021\n\tregion_id\030\001 \001(\004\"P\n\017RegionColumnD" + - "ef\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime.v1.Col" + - "umnDef\022\021\n\tcolumn_id\030\002 \001(\r\"M\n\022BulkInsertR" + - "equests\0227\n\010requests\030\001 \003(\0132%.greptime.v1." + - "region.BulkInsertRequest\"q\n\021BulkInsertRe" + - "quest\022\021\n\tregion_id\030\001 \001(\004\0228\n\014payload_type" + - "\030\002 \001(\0162\".greptime.v1.region.BulkInsertTy" + - "pe\022\017\n\007payload\030\003 \001(\014\"1\n\020MitoManifestInfo\022" + - "\035\n\025data_manifest_version\030\001 \001(\004\"V\n\022Metric" + - "ManifestInfo\022\035\n\025data_manifest_version\030\001 " + - "\001(\004\022!\n\031metadata_manifest_version\030\002 \001(\004\"\275" + - "\001\n\013SyncRequest\022\021\n\tregion_id\030\001 \001(\004\022B\n\022mit" + - "o_manifest_info\030\002 \001(\0132$.greptime.v1.regi" + - "on.MitoManifestInfoH\000\022F\n\024metric_manifest" + - "_info\030\003 \001(\0132&.greptime.v1.region.MetricM" + - "anifestInfoH\000B\017\n\rmanifest_info*\037\n\016BulkIn" + - "sertType\022\r\n\tARROW_IPC\020\0002Y\n\006Region\022O\n\006Han" + - "dle\022!.greptime.v1.region.RegionRequest\032\"" + - ".greptime.v1.region.RegionResponseB]\n\025io" + - ".greptime.v1.regionB\006ServerZ\n\010ArrowIpc\022\021\n\tr" + + "egion_id\030\001 \001(\004\022\016\n\006schema\030\002 \001(\014\022\017\n\007payloa" + + "d\030\003 \001(\014\"1\n\020MitoManifestInfo\022\035\n\025data_mani" + + "fest_version\030\001 \001(\004\"V\n\022MetricManifestInfo" + + "\022\035\n\025data_manifest_version\030\001 \001(\004\022!\n\031metad" + + "ata_manifest_version\030\002 \001(\004\"\275\001\n\013SyncReque" + + "st\022\021\n\tregion_id\030\001 \001(\004\022B\n\022mito_manifest_i" + + "nfo\030\002 \001(\0132$.greptime.v1.region.MitoManif" + + "estInfoH\000\022F\n\024metric_manifest_info\030\003 \001(\0132" + + "&.greptime.v1.region.MetricManifestInfoH" + + "\000B\017\n\rmanifest_info2Y\n\006Region\022O\n\006Handle\022!" + + ".greptime.v1.region.RegionRequest\032\".grep" + + "time.v1.region.RegionResponseB]\n\025io.grep" + + "time.v1.regionB\006ServerZ