feat: add bulk insert request type (#228)

* add bulk insert request type

* fix: rename
This commit is contained in:
Lei, HUANG
2025-04-10 20:06:41 +08:00
committed by GitHub
parent dd4a199698
commit 583daa3fbb
4 changed files with 3207 additions and 166 deletions
+679 -98
View File
@@ -430,11 +430,39 @@ struct RegionColumnDefDefaultTypeInternal {
}; };
}; };
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionColumnDefDefaultTypeInternal _RegionColumnDef_default_instance_; 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_)*/{}} {}
struct BulkInsertRequestDefaultTypeInternal {
PROTOBUF_CONSTEXPR BulkInsertRequestDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~BulkInsertRequestDefaultTypeInternal() {}
union {
BulkInsertRequest _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BulkInsertRequestDefaultTypeInternal _BulkInsertRequest_default_instance_;
} // namespace region } // namespace region
} // namespace v1 } // namespace v1
} // namespace greptime } // namespace greptime
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[30]; static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[32];
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fregion_2fserver_2eproto = nullptr; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fregion_2fserver_2eproto[1];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_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) = { const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
@@ -477,6 +505,7 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR
::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag,
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionRequest, _impl_.body_), PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionRequest, _impl_.body_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse, _has_bits_), PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse, _has_bits_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse, _internal_metadata_), PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse, _internal_metadata_),
@@ -704,38 +733,56 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR
~0u, // no _inlined_string_donated_ ~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionColumnDef, _impl_.column_def_), PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionColumnDef, _impl_.column_def_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionColumnDef, _impl_.column_id_), 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_
~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_),
}; };
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 8, -1, sizeof(::greptime::v1::region::RegionRequestHeader_TracingContextEntry_DoNotUse)}, { 0, 8, -1, sizeof(::greptime::v1::region::RegionRequestHeader_TracingContextEntry_DoNotUse)},
{ 10, -1, -1, sizeof(::greptime::v1::region::RegionRequestHeader)}, { 10, -1, -1, sizeof(::greptime::v1::region::RegionRequestHeader)},
{ 19, -1, -1, sizeof(::greptime::v1::region::RegionRequest)}, { 19, -1, -1, sizeof(::greptime::v1::region::RegionRequest)},
{ 40, 48, -1, sizeof(::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse)}, { 41, 49, -1, sizeof(::greptime::v1::region::RegionResponse_ExtensionsEntry_DoNotUse)},
{ 50, -1, -1, sizeof(::greptime::v1::region::RegionResponse)}, { 51, -1, -1, sizeof(::greptime::v1::region::RegionResponse)},
{ 59, -1, -1, sizeof(::greptime::v1::region::InsertRequests)}, { 60, -1, -1, sizeof(::greptime::v1::region::InsertRequests)},
{ 66, -1, -1, sizeof(::greptime::v1::region::DeleteRequests)}, { 67, -1, -1, sizeof(::greptime::v1::region::DeleteRequests)},
{ 73, -1, -1, sizeof(::greptime::v1::region::InsertRequest)}, { 74, -1, -1, sizeof(::greptime::v1::region::InsertRequest)},
{ 81, -1, -1, sizeof(::greptime::v1::region::DeleteRequest)}, { 82, -1, -1, sizeof(::greptime::v1::region::DeleteRequest)},
{ 89, -1, -1, sizeof(::greptime::v1::region::QueryRequest)}, { 90, -1, -1, sizeof(::greptime::v1::region::QueryRequest)},
{ 98, -1, -1, sizeof(::greptime::v1::region::CreateRequests)}, { 99, -1, -1, sizeof(::greptime::v1::region::CreateRequests)},
{ 105, 113, -1, sizeof(::greptime::v1::region::CreateRequest_OptionsEntry_DoNotUse)}, { 106, 114, -1, sizeof(::greptime::v1::region::CreateRequest_OptionsEntry_DoNotUse)},
{ 115, -1, -1, sizeof(::greptime::v1::region::CreateRequest)}, { 116, -1, -1, sizeof(::greptime::v1::region::CreateRequest)},
{ 127, -1, -1, sizeof(::greptime::v1::region::DropRequests)}, { 128, -1, -1, sizeof(::greptime::v1::region::DropRequests)},
{ 134, -1, -1, sizeof(::greptime::v1::region::DropRequest)}, { 135, -1, -1, sizeof(::greptime::v1::region::DropRequest)},
{ 142, 150, -1, sizeof(::greptime::v1::region::OpenRequest_OptionsEntry_DoNotUse)}, { 143, 151, -1, sizeof(::greptime::v1::region::OpenRequest_OptionsEntry_DoNotUse)},
{ 152, -1, -1, sizeof(::greptime::v1::region::OpenRequest)}, { 153, -1, -1, sizeof(::greptime::v1::region::OpenRequest)},
{ 162, -1, -1, sizeof(::greptime::v1::region::CloseRequest)}, { 163, -1, -1, sizeof(::greptime::v1::region::CloseRequest)},
{ 169, -1, -1, sizeof(::greptime::v1::region::AlterRequests)}, { 170, -1, -1, sizeof(::greptime::v1::region::AlterRequests)},
{ 176, -1, -1, sizeof(::greptime::v1::region::AlterRequest)}, { 177, -1, -1, sizeof(::greptime::v1::region::AlterRequest)},
{ 192, -1, -1, sizeof(::greptime::v1::region::AddColumns)}, { 193, -1, -1, sizeof(::greptime::v1::region::AddColumns)},
{ 199, -1, -1, sizeof(::greptime::v1::region::DropColumns)}, { 200, -1, -1, sizeof(::greptime::v1::region::DropColumns)},
{ 206, -1, -1, sizeof(::greptime::v1::region::AddColumn)}, { 207, -1, -1, sizeof(::greptime::v1::region::AddColumn)},
{ 214, -1, -1, sizeof(::greptime::v1::region::DropColumn)}, { 215, -1, -1, sizeof(::greptime::v1::region::DropColumn)},
{ 221, -1, -1, sizeof(::greptime::v1::region::FlushRequest)}, { 222, -1, -1, sizeof(::greptime::v1::region::FlushRequest)},
{ 228, -1, -1, sizeof(::greptime::v1::region::Regular)}, { 229, -1, -1, sizeof(::greptime::v1::region::Regular)},
{ 234, -1, -1, sizeof(::greptime::v1::region::StrictWindow)}, { 235, -1, -1, sizeof(::greptime::v1::region::StrictWindow)},
{ 241, -1, -1, sizeof(::greptime::v1::region::CompactRequest)}, { 242, -1, -1, sizeof(::greptime::v1::region::CompactRequest)},
{ 251, -1, -1, sizeof(::greptime::v1::region::TruncateRequest)}, { 252, -1, -1, sizeof(::greptime::v1::region::TruncateRequest)},
{ 258, -1, -1, sizeof(::greptime::v1::region::RegionColumnDef)}, { 259, -1, -1, sizeof(::greptime::v1::region::RegionColumnDef)},
{ 267, -1, -1, sizeof(::greptime::v1::region::BulkInsertRequests)},
{ 274, -1, -1, sizeof(::greptime::v1::region::BulkInsertRequest)},
}; };
static const ::_pb::Message* const file_default_instances[] = { static const ::_pb::Message* const file_default_instances[] = {
@@ -769,6 +816,8 @@ static const ::_pb::Message* const file_default_instances[] = {
&::greptime::v1::region::_CompactRequest_default_instance_._instance, &::greptime::v1::region::_CompactRequest_default_instance_._instance,
&::greptime::v1::region::_TruncateRequest_default_instance_._instance, &::greptime::v1::region::_TruncateRequest_default_instance_._instance,
&::greptime::v1::region::_RegionColumnDef_default_instance_._instance, &::greptime::v1::region::_RegionColumnDef_default_instance_._instance,
&::greptime::v1::region::_BulkInsertRequests_default_instance_._instance,
&::greptime::v1::region::_BulkInsertRequest_default_instance_._instance,
}; };
const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
@@ -780,7 +829,7 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P
"onRequestHeader.TracingContextEntry\022\016\n\006d" "onRequestHeader.TracingContextEntry\022\016\n\006d"
"bname\030\003 \001(\t\0220\n\rquery_context\030\006 \001(\0132\031.gre" "bname\030\003 \001(\t\0220\n\rquery_context\030\006 \001(\0132\031.gre"
"ptime.v1.QueryContext\0325\n\023TracingContextE" "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\"\375\005\n" "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\275\006\n"
"\rRegionRequest\0227\n\006header\030\001 \001(\0132\'.greptim" "\rRegionRequest\0227\n\006header\030\001 \001(\0132\'.greptim"
"e.v1.region.RegionRequestHeader\0225\n\007inser" "e.v1.region.RegionRequestHeader\0225\n\007inser"
"ts\030\003 \001(\0132\".greptime.v1.region.InsertRequ" "ts\030\003 \001(\0132\".greptime.v1.region.InsertRequ"
@@ -799,73 +848,80 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P
"\007creates\030\r \001(\0132\".greptime.v1.region.Crea" "\007creates\030\r \001(\0132\".greptime.v1.region.Crea"
"teRequestsH\000\0221\n\005drops\030\016 \001(\0132 .greptime.v" "teRequestsH\000\0221\n\005drops\030\016 \001(\0132 .greptime.v"
"1.region.DropRequestsH\000\0223\n\006alters\030\017 \001(\0132" "1.region.DropRequestsH\000\0223\n\006alters\030\017 \001(\0132"
"!.greptime.v1.region.AlterRequestsH\000B\006\n\004" "!.greptime.v1.region.AlterRequestsH\000\022>\n\014"
"body\"\317\001\n\016RegionResponse\022+\n\006header\030\001 \001(\0132" "bulk_inserts\030\020 \001(\0132&.greptime.v1.region."
"\033.greptime.v1.ResponseHeader\022\025\n\raffected" "BulkInsertRequestsH\000B\006\n\004body\"\317\001\n\016RegionR"
"_rows\030\002 \001(\004\022F\n\nextensions\030\003 \003(\01322.grepti" "esponse\022+\n\006header\030\001 \001(\0132\033.greptime.v1.Re"
"me.v1.region.RegionResponse.ExtensionsEn" "sponseHeader\022\025\n\raffected_rows\030\002 \001(\004\022F\n\ne"
"try\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" "xtensions\030\003 \003(\01322.greptime.v1.region.Reg"
"alue\030\002 \001(\014:\0028\001\"E\n\016InsertRequests\0223\n\010requ" "ionResponse.ExtensionsEntry\0321\n\017Extension"
"ests\030\001 \003(\0132!.greptime.v1.region.InsertRe" "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001\"E"
"quest\"E\n\016DeleteRequests\0223\n\010requests\030\001 \003(" "\n\016InsertRequests\0223\n\010requests\030\001 \003(\0132!.gre"
"\0132!.greptime.v1.region.DeleteRequest\"C\n\r" "ptime.v1.region.InsertRequest\"E\n\016DeleteR"
"InsertRequest\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows" "equests\0223\n\010requests\030\001 \003(\0132!.greptime.v1."
"\030\002 \001(\0132\021.greptime.v1.Rows\"C\n\rDeleteReque" "region.DeleteRequest\"C\n\rInsertRequest\022\021\n"
"st\022\021\n\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 \001(\0132\021.gr" "\tregion_id\030\001 \001(\004\022\037\n\004rows\030\002 \001(\0132\021.greptim"
"eptime.v1.Rows\"h\n\014QueryRequest\0227\n\006header" "e.v1.Rows\"C\n\rDeleteRequest\022\021\n\tregion_id\030"
"\030\001 \001(\0132\'.greptime.v1.region.RegionReques" "\001 \001(\004\022\037\n\004rows\030\002 \001(\0132\021.greptime.v1.Rows\"h"
"tHeader\022\021\n\tregion_id\030\002 \001(\004\022\014\n\004plan\030\003 \001(\014" "\n\014QueryRequest\0227\n\006header\030\001 \001(\0132\'.greptim"
"\"E\n\016CreateRequests\0223\n\010requests\030\001 \003(\0132!.g" "e.v1.region.RegionRequestHeader\022\021\n\tregio"
"reptime.v1.region.CreateRequest\"\200\002\n\rCrea" "n_id\030\002 \001(\004\022\014\n\004plan\030\003 \001(\014\"E\n\016CreateReques"
"teRequest\022\021\n\tregion_id\030\001 \001(\004\022\016\n\006engine\030\002" "ts\0223\n\010requests\030\001 \003(\0132!.greptime.v1.regio"
" \001(\t\0228\n\013column_defs\030\003 \003(\0132#.greptime.v1." "n.CreateRequest\"\200\002\n\rCreateRequest\022\021\n\treg"
"region.RegionColumnDef\022\023\n\013primary_key\030\004 " "ion_id\030\001 \001(\004\022\016\n\006engine\030\002 \001(\t\0228\n\013column_d"
"\003(\r\022\014\n\004path\030\005 \001(\t\022\?\n\007options\030\006 \003(\0132..gre" "efs\030\003 \003(\0132#.greptime.v1.region.RegionCol"
"ptime.v1.region.CreateRequest.OptionsEnt" "umnDef\022\023\n\013primary_key\030\004 \003(\r\022\014\n\004path\030\005 \001("
"\t\022\?\n\007options\030\006 \003(\0132..greptime.v1.region."
"CreateRequest.OptionsEntry\032.\n\014OptionsEnt"
"ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"A\n\014Dr"
"opRequests\0221\n\010requests\030\001 \003(\0132\037.greptime."
"v1.region.DropRequest\"3\n\013DropRequest\022\021\n\t"
"region_id\030\001 \001(\004\022\021\n\tfast_path\030\002 \001(\010\"\255\001\n\013O"
"penRequest\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,.g"
"reptime.v1.region.OpenRequest.OptionsEnt"
"ry\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" "ry\032.\n\014OptionsEntry\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" "\030\002 \001(\t:\0028\001\"!\n\014CloseRequest\022\021\n\tregion_id\030"
" \003(\0132\037.greptime.v1.region.DropRequest\"3\n" "\001 \001(\004\"C\n\rAlterRequests\0222\n\010requests\030\001 \003(\013"
"\013DropRequest\022\021\n\tregion_id\030\001 \001(\004\022\021\n\tfast_" "2 .greptime.v1.region.AlterRequest\"\306\003\n\014A"
"path\030\002 \001(\010\"\255\001\n\013OpenRequest\022\021\n\tregion_id\030" "lterRequest\022\021\n\tregion_id\030\001 \001(\004\0225\n\013add_co"
"\001 \001(\004\022\016\n\006engine\030\002 \001(\t\022\014\n\004path\030\003 \001(\t\022=\n\007o" "lumns\030\002 \001(\0132\036.greptime.v1.region.AddColu"
"ptions\030\004 \003(\0132,.greptime.v1.region.OpenRe" "mnsH\000\0227\n\014drop_columns\030\003 \001(\0132\037.greptime.v"
"quest.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003ke" "1.region.DropColumnsH\000\022=\n\023modify_column_"
"y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"!\n\014CloseReque" "types\030\005 \001(\0132\036.greptime.v1.ModifyColumnTy"
"st\022\021\n\tregion_id\030\001 \001(\004\"C\n\rAlterRequests\0222" "pesH\000\0229\n\021set_table_options\030\006 \001(\0132\034.grept"
"\n\010requests\030\001 \003(\0132 .greptime.v1.region.Al" "ime.v1.SetTableOptionsH\000\022=\n\023unset_table_"
"terRequest\"\306\003\n\014AlterRequest\022\021\n\tregion_id" "options\030\t \001(\0132\036.greptime.v1.UnsetTableOp"
"\030\001 \001(\004\0225\n\013add_columns\030\002 \001(\0132\036.greptime.v" "tionsH\000\022*\n\tset_index\030\n \001(\0132\025.greptime.v1"
"1.region.AddColumnsH\000\0227\n\014drop_columns\030\003 " ".SetIndexH\000\022.\n\013unset_index\030\013 \001(\0132\027.grept"
"\001(\0132\037.greptime.v1.region.DropColumnsH\000\022=" "ime.v1.UnsetIndexH\000\022\026\n\016schema_version\030\004 "
"\n\023modify_column_types\030\005 \001(\0132\036.greptime.v" "\001(\004B\006\n\004kind\"@\n\nAddColumns\0222\n\013add_columns"
"1.ModifyColumnTypesH\000\0229\n\021set_table_optio" "\030\001 \003(\0132\035.greptime.v1.region.AddColumn\"C\n"
"ns\030\006 \001(\0132\034.greptime.v1.SetTableOptionsH\000" "\013DropColumns\0224\n\014drop_columns\030\001 \003(\0132\036.gre"
"\022=\n\023unset_table_options\030\t \001(\0132\036.greptime" "ptime.v1.region.DropColumn\"v\n\tAddColumn\022"
".v1.UnsetTableOptionsH\000\022*\n\tset_index\030\n \001" "7\n\ncolumn_def\030\001 \001(\0132#.greptime.v1.region"
"(\0132\025.greptime.v1.SetIndexH\000\022.\n\013unset_ind" ".RegionColumnDef\0220\n\010location\030\003 \001(\0132\036.gre"
"ex\030\013 \001(\0132\027.greptime.v1.UnsetIndexH\000\022\026\n\016s" "ptime.v1.AddColumnLocation\"\032\n\nDropColumn"
"chema_version\030\004 \001(\004B\006\n\004kind\"@\n\nAddColumn" "\022\014\n\004name\030\001 \001(\t\"!\n\014FlushRequest\022\021\n\tregion"
"s\0222\n\013add_columns\030\001 \003(\0132\035.greptime.v1.reg" "_id\030\001 \001(\004\"\t\n\007Regular\"&\n\014StrictWindow\022\026\n\016"
"ion.AddColumn\"C\n\013DropColumns\0224\n\014drop_col" "window_seconds\030\001 \001(\003\"\231\001\n\016CompactRequest\022"
"umns\030\001 \003(\0132\036.greptime.v1.region.DropColu" "\021\n\tregion_id\030\001 \001(\004\022.\n\007regular\030\002 \001(\0132\033.gr"
"mn\"v\n\tAddColumn\0227\n\ncolumn_def\030\001 \001(\0132#.gr" "eptime.v1.region.RegularH\000\0229\n\rstrict_win"
"eptime.v1.region.RegionColumnDef\0220\n\010loca" "dow\030\003 \001(\0132 .greptime.v1.region.StrictWin"
"tion\030\003 \001(\0132\036.greptime.v1.AddColumnLocati" "dowH\000B\t\n\007options\"$\n\017TruncateRequest\022\021\n\tr"
"on\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t\"!\n\014FlushR" "egion_id\030\001 \001(\004\"P\n\017RegionColumnDef\022*\n\ncol"
"equest\022\021\n\tregion_id\030\001 \001(\004\"\t\n\007Regular\"&\n\014" "umn_def\030\001 \001(\0132\026.greptime.v1.ColumnDef\022\021\n"
"StrictWindow\022\026\n\016window_seconds\030\001 \001(\003\"\231\001\n" "\tcolumn_id\030\002 \001(\r\"M\n\022BulkInsertRequests\0227"
"\016CompactRequest\022\021\n\tregion_id\030\001 \001(\004\022.\n\007re" "\n\010requests\030\001 \003(\0132%.greptime.v1.region.Bu"
"gular\030\002 \001(\0132\033.greptime.v1.region.Regular" "lkInsertRequest\"q\n\021BulkInsertRequest\022\021\n\t"
"H\000\0229\n\rstrict_window\030\003 \001(\0132 .greptime.v1." "region_id\030\001 \001(\004\0228\n\014payload_type\030\002 \001(\0162\"."
"region.StrictWindowH\000B\t\n\007options\"$\n\017Trun" "greptime.v1.region.BulkInsertType\022\017\n\007pay"
"cateRequest\022\021\n\tregion_id\030\001 \001(\004\"P\n\017Region" "load\030\003 \001(\014*\037\n\016BulkInsertType\022\r\n\tARROW_IP"
"ColumnDef\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime" "C\020\0002Y\n\006Region\022O\n\006Handle\022!.greptime.v1.re"
".v1.ColumnDef\022\021\n\tcolumn_id\030\002 \001(\r2Y\n\006Regi" "gion.RegionRequest\032\".greptime.v1.region."
"on\022O\n\006Handle\022!.greptime.v1.region.Region" "RegionResponseB]\n\025io.greptime.v1.regionB"
"Request\032\".greptime.v1.region.RegionRespo" "\006ServerZ<github.com/GreptimeTeam/greptim"
"nseB]\n\025io.greptime.v1.regionB\006ServerZ<gi" "e-proto/go/greptime/v1/regionb\006proto3"
"thub.com/GreptimeTeam/greptime-proto/go/"
"greptime/v1/regionb\006proto3"
; ;
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps[3] = { static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps[3] = {
&::descriptor_table_greptime_2fv1_2fcommon_2eproto, &::descriptor_table_greptime_2fv1_2fcommon_2eproto,
@@ -874,9 +930,9 @@ static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2freg
}; };
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto = { const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto = {
false, false, 3746, descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto, false, false, 4037, descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto,
"greptime/v1/region/server.proto", "greptime/v1/region/server.proto",
&descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps, 3, 30, &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps, 3, 32,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets, schemas, file_default_instances, TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets,
file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto, file_level_enum_descriptors_greptime_2fv1_2fregion_2fserver_2eproto, file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto, file_level_enum_descriptors_greptime_2fv1_2fregion_2fserver_2eproto,
file_level_service_descriptors_greptime_2fv1_2fregion_2fserver_2eproto, file_level_service_descriptors_greptime_2fv1_2fregion_2fserver_2eproto,
@@ -890,6 +946,19 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_in
namespace greptime { namespace greptime {
namespace v1 { namespace v1 {
namespace region { namespace region {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BulkInsertType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto);
return file_level_enum_descriptors_greptime_2fv1_2fregion_2fserver_2eproto[0];
}
bool BulkInsertType_IsValid(int value) {
switch (value) {
case 0:
return true;
default:
return false;
}
}
// =================================================================== // ===================================================================
@@ -1242,6 +1311,7 @@ class RegionRequest::_Internal {
static const ::greptime::v1::region::CreateRequests& creates(const RegionRequest* msg); static const ::greptime::v1::region::CreateRequests& creates(const RegionRequest* msg);
static const ::greptime::v1::region::DropRequests& drops(const RegionRequest* msg); static const ::greptime::v1::region::DropRequests& drops(const RegionRequest* msg);
static const ::greptime::v1::region::AlterRequests& alters(const RegionRequest* msg); static const ::greptime::v1::region::AlterRequests& alters(const RegionRequest* msg);
static const ::greptime::v1::region::BulkInsertRequests& bulk_inserts(const RegionRequest* msg);
}; };
const ::greptime::v1::region::RegionRequestHeader& const ::greptime::v1::region::RegionRequestHeader&
@@ -1300,6 +1370,10 @@ const ::greptime::v1::region::AlterRequests&
RegionRequest::_Internal::alters(const RegionRequest* msg) { RegionRequest::_Internal::alters(const RegionRequest* msg) {
return *msg->_impl_.body_.alters_; return *msg->_impl_.body_.alters_;
} }
const ::greptime::v1::region::BulkInsertRequests&
RegionRequest::_Internal::bulk_inserts(const RegionRequest* msg) {
return *msg->_impl_.body_.bulk_inserts_;
}
void RegionRequest::set_allocated_inserts(::greptime::v1::region::InsertRequests* inserts) { void RegionRequest::set_allocated_inserts(::greptime::v1::region::InsertRequests* inserts) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_body(); clear_body();
@@ -1495,6 +1569,21 @@ void RegionRequest::set_allocated_alters(::greptime::v1::region::AlterRequests*
} }
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.alters) // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.alters)
} }
void RegionRequest::set_allocated_bulk_inserts(::greptime::v1::region::BulkInsertRequests* bulk_inserts) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_body();
if (bulk_inserts) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(bulk_inserts);
if (message_arena != submessage_arena) {
bulk_inserts = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, bulk_inserts, submessage_arena);
}
set_has_bulk_inserts();
_impl_.body_.bulk_inserts_ = bulk_inserts;
}
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.bulk_inserts)
}
RegionRequest::RegionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, RegionRequest::RegionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned) bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
@@ -1581,6 +1670,11 @@ RegionRequest::RegionRequest(const RegionRequest& from)
from._internal_alters()); from._internal_alters());
break; break;
} }
case kBulkInserts: {
_this->_internal_mutable_bulk_inserts()->::greptime::v1::region::BulkInsertRequests::MergeFrom(
from._internal_bulk_inserts());
break;
}
case BODY_NOT_SET: { case BODY_NOT_SET: {
break; break;
} }
@@ -1703,6 +1797,12 @@ void RegionRequest::clear_body() {
} }
break; break;
} }
case kBulkInserts: {
if (GetArenaForAllocation() == nullptr) {
delete _impl_.body_.bulk_inserts_;
}
break;
}
case BODY_NOT_SET: { case BODY_NOT_SET: {
break; break;
} }
@@ -1843,6 +1943,14 @@ const char* RegionRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext*
} else } else
goto handle_unusual; goto handle_unusual;
continue; continue;
// .greptime.v1.region.BulkInsertRequests bulk_inserts = 16;
case 16:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
ptr = ctx->ParseMessage(_internal_mutable_bulk_inserts(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default: default:
goto handle_unusual; goto handle_unusual;
} // switch } // switch
@@ -1970,6 +2078,13 @@ uint8_t* RegionRequest::_InternalSerialize(
_Internal::alters(this).GetCachedSize(), target, stream); _Internal::alters(this).GetCachedSize(), target, stream);
} }
// .greptime.v1.region.BulkInsertRequests bulk_inserts = 16;
if (_internal_has_bulk_inserts()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(16, _Internal::bulk_inserts(this),
_Internal::bulk_inserts(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
@@ -2085,6 +2200,13 @@ size_t RegionRequest::ByteSizeLong() const {
*_impl_.body_.alters_); *_impl_.body_.alters_);
break; break;
} }
// .greptime.v1.region.BulkInsertRequests bulk_inserts = 16;
case kBulkInserts: {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.body_.bulk_inserts_);
break;
}
case BODY_NOT_SET: { case BODY_NOT_SET: {
break; break;
} }
@@ -2177,6 +2299,11 @@ void RegionRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::
from._internal_alters()); from._internal_alters());
break; break;
} }
case kBulkInserts: {
_this->_internal_mutable_bulk_inserts()->::greptime::v1::region::BulkInsertRequests::MergeFrom(
from._internal_bulk_inserts());
break;
}
case BODY_NOT_SET: { case BODY_NOT_SET: {
break; break;
} }
@@ -8016,6 +8143,452 @@ void RegionColumnDef::InternalSwap(RegionColumnDef* other) {
file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[29]); file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[29]);
} }
// ===================================================================
class BulkInsertRequests::_Internal {
public:
};
BulkInsertRequests::BulkInsertRequests(::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)
}
BulkInsertRequests::BulkInsertRequests(const BulkInsertRequests& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
BulkInsertRequests* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.requests_){from._impl_.requests_}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:greptime.v1.region.BulkInsertRequests)
}
inline void BulkInsertRequests::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.requests_){arena}
, /*decltype(_impl_._cached_size_)*/{}
};
}
BulkInsertRequests::~BulkInsertRequests() {
// @@protoc_insertion_point(destructor:greptime.v1.region.BulkInsertRequests)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void BulkInsertRequests::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.requests_.~RepeatedPtrField();
}
void BulkInsertRequests::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void BulkInsertRequests::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.region.BulkInsertRequests)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.requests_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* BulkInsertRequests::_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;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(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));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* BulkInsertRequests::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.region.BulkInsertRequests)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .greptime.v1.region.BulkInsertRequest requests = 1;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_requests_size()); i < n; i++) {
const auto& repfield = this->_internal_requests(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, repfield, repfield.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)
return target;
}
size_t BulkInsertRequests::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.region.BulkInsertRequests)
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);
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BulkInsertRequests::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
BulkInsertRequests::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BulkInsertRequests::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<BulkInsertRequests*>(&to_msg);
auto& from = static_cast<const BulkInsertRequests&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.region.BulkInsertRequests)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.requests_.MergeFrom(from._impl_.requests_);
_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)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool BulkInsertRequests::IsInitialized() const {
return true;
}
void BulkInsertRequests::InternalSwap(BulkInsertRequests* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.requests_.InternalSwap(&other->_impl_.requests_);
}
::PROTOBUF_NAMESPACE_ID::Metadata BulkInsertRequests::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]);
}
// ===================================================================
class BulkInsertRequest::_Internal {
public:
};
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.BulkInsertRequest)
}
BulkInsertRequest::BulkInsertRequest(const BulkInsertRequest& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
BulkInsertRequest* const _this = this; (void)_this;
new (&_impl_) Impl_{
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_.payload_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.payload_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_payload().empty()) {
_this->_impl_.payload_.Set(from._internal_payload(),
_this->GetArenaForAllocation());
}
::memcpy(&_impl_.region_id_, &from._impl_.region_id_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.payload_type_) -
reinterpret_cast<char*>(&_impl_.region_id_)) + sizeof(_impl_.payload_type_));
// @@protoc_insertion_point(copy_constructor:greptime.v1.region.BulkInsertRequest)
}
inline void BulkInsertRequest::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.payload_){}
, decltype(_impl_.region_id_){uint64_t{0u}}
, decltype(_impl_.payload_type_){0}
, /*decltype(_impl_._cached_size_)*/{}
};
_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)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void BulkInsertRequest::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.payload_.Destroy();
}
void BulkInsertRequest::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
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_.payload_.ClearToEmpty();
::memset(&_impl_.region_id_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.payload_type_) -
reinterpret_cast<char*>(&_impl_.region_id_)) + sizeof(_impl_.payload_type_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
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) {
// uint64 region_id = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_impl_.region_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// .greptime.v1.region.BulkInsertType payload_type = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_payload_type(static_cast<::greptime::v1::region::BulkInsertType>(val));
} else
goto handle_unusual;
continue;
// bytes payload = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_payload();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* BulkInsertRequest::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.region.BulkInsertRequest)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// uint64 region_id = 1;
if (this->_internal_region_id() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_region_id(), target);
}
// .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 payload = 3;
if (!this->_internal_payload().empty()) {
target = stream->WriteBytesMaybeAliased(
3, this->_internal_payload(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.region.BulkInsertRequest)
return target;
}
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;
// bytes payload = 3;
if (!this->_internal_payload().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->_internal_payload());
}
// uint64 region_id = 1;
if (this->_internal_region_id() != 0) {
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_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
BulkInsertRequest::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BulkInsertRequest::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<BulkInsertRequest*>(&to_msg);
auto& from = static_cast<const BulkInsertRequest&>(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;
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)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool BulkInsertRequest::IsInitialized() const {
return true;
}
void BulkInsertRequest::InternalSwap(BulkInsertRequest* 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_.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<char*>(&_impl_.region_id_),
reinterpret_cast<char*>(&other->_impl_.region_id_));
}
::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[31]);
}
// @@protoc_insertion_point(namespace_scope) // @@protoc_insertion_point(namespace_scope)
} // namespace region } // namespace region
} // namespace v1 } // namespace v1
@@ -8141,6 +8714,14 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::region::RegionColumnDef*
Arena::CreateMaybeMessage< ::greptime::v1::region::RegionColumnDef >(Arena* arena) { Arena::CreateMaybeMessage< ::greptime::v1::region::RegionColumnDef >(Arena* arena) {
return Arena::CreateMessageInternal< ::greptime::v1::region::RegionColumnDef >(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);
}
PROTOBUF_NAMESPACE_CLOSE PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope) // @@protoc_insertion_point(global_scope)
+613
View File
@@ -33,6 +33,7 @@
#include <google/protobuf/map.h> // IWYU pragma: export #include <google/protobuf/map.h> // IWYU pragma: export
#include <google/protobuf/map_entry.h> #include <google/protobuf/map_entry.h>
#include <google/protobuf/map_field_inl.h> #include <google/protobuf/map_field_inl.h>
#include <google/protobuf/generated_enum_reflection.h>
#include <google/protobuf/unknown_field_set.h> #include <google/protobuf/unknown_field_set.h>
#include "greptime/v1/common.pb.h" #include "greptime/v1/common.pb.h"
#include "greptime/v1/row.pb.h" #include "greptime/v1/row.pb.h"
@@ -66,6 +67,12 @@ extern AlterRequestDefaultTypeInternal _AlterRequest_default_instance_;
class AlterRequests; class AlterRequests;
struct AlterRequestsDefaultTypeInternal; struct AlterRequestsDefaultTypeInternal;
extern AlterRequestsDefaultTypeInternal _AlterRequests_default_instance_; extern AlterRequestsDefaultTypeInternal _AlterRequests_default_instance_;
class BulkInsertRequest;
struct BulkInsertRequestDefaultTypeInternal;
extern BulkInsertRequestDefaultTypeInternal _BulkInsertRequest_default_instance_;
class BulkInsertRequests;
struct BulkInsertRequestsDefaultTypeInternal;
extern BulkInsertRequestsDefaultTypeInternal _BulkInsertRequests_default_instance_;
class CloseRequest; class CloseRequest;
struct CloseRequestDefaultTypeInternal; struct CloseRequestDefaultTypeInternal;
extern CloseRequestDefaultTypeInternal _CloseRequest_default_instance_; extern CloseRequestDefaultTypeInternal _CloseRequest_default_instance_;
@@ -152,6 +159,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::AddColumns* Arena::CreateMaybeMessage<::greptime::v1::region::AddColumns>(Arena*);
template<> ::greptime::v1::region::AlterRequest* Arena::CreateMaybeMessage<::greptime::v1::region::AlterRequest>(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::AlterRequests* Arena::CreateMaybeMessage<::greptime::v1::region::AlterRequests>(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::CloseRequest* Arena::CreateMaybeMessage<::greptime::v1::region::CloseRequest>(Arena*);
template<> ::greptime::v1::region::CompactRequest* Arena::CreateMaybeMessage<::greptime::v1::region::CompactRequest>(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*); template<> ::greptime::v1::region::CreateRequest* Arena::CreateMaybeMessage<::greptime::v1::region::CreateRequest>(Arena*);
@@ -183,6 +192,30 @@ namespace greptime {
namespace v1 { namespace v1 {
namespace region { namespace region {
enum BulkInsertType : int {
ARROW_IPC = 0,
BulkInsertType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
BulkInsertType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::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<typename T>
inline const std::string& BulkInsertType_Name(T enum_t_value) {
static_assert(::std::is_same<T, BulkInsertType>::value ||
::std::is_integral<T>::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>(
BulkInsertType_descriptor(), name, value);
}
// =================================================================== // ===================================================================
class RegionRequestHeader_TracingContextEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<RegionRequestHeader_TracingContextEntry_DoNotUse, class RegionRequestHeader_TracingContextEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<RegionRequestHeader_TracingContextEntry_DoNotUse,
@@ -469,6 +502,7 @@ class RegionRequest final :
kCreates = 13, kCreates = 13,
kDrops = 14, kDrops = 14,
kAlters = 15, kAlters = 15,
kBulkInserts = 16,
BODY_NOT_SET = 0, BODY_NOT_SET = 0,
}; };
@@ -564,6 +598,7 @@ class RegionRequest final :
kCreatesFieldNumber = 13, kCreatesFieldNumber = 13,
kDropsFieldNumber = 14, kDropsFieldNumber = 14,
kAltersFieldNumber = 15, kAltersFieldNumber = 15,
kBulkInsertsFieldNumber = 16,
}; };
// .greptime.v1.region.RegionRequestHeader header = 1; // .greptime.v1.region.RegionRequestHeader header = 1;
bool has_header() const; bool has_header() const;
@@ -817,6 +852,24 @@ class RegionRequest final :
::greptime::v1::region::AlterRequests* alters); ::greptime::v1::region::AlterRequests* alters);
::greptime::v1::region::AlterRequests* unsafe_arena_release_alters(); ::greptime::v1::region::AlterRequests* unsafe_arena_release_alters();
// .greptime.v1.region.BulkInsertRequests bulk_inserts = 16;
bool has_bulk_inserts() const;
private:
bool _internal_has_bulk_inserts() const;
public:
void clear_bulk_inserts();
const ::greptime::v1::region::BulkInsertRequests& bulk_inserts() const;
PROTOBUF_NODISCARD ::greptime::v1::region::BulkInsertRequests* release_bulk_inserts();
::greptime::v1::region::BulkInsertRequests* mutable_bulk_inserts();
void set_allocated_bulk_inserts(::greptime::v1::region::BulkInsertRequests* bulk_inserts);
private:
const ::greptime::v1::region::BulkInsertRequests& _internal_bulk_inserts() const;
::greptime::v1::region::BulkInsertRequests* _internal_mutable_bulk_inserts();
public:
void unsafe_arena_set_allocated_bulk_inserts(
::greptime::v1::region::BulkInsertRequests* bulk_inserts);
::greptime::v1::region::BulkInsertRequests* unsafe_arena_release_bulk_inserts();
void clear_body(); void clear_body();
BodyCase body_case() const; BodyCase body_case() const;
// @@protoc_insertion_point(class_scope:greptime.v1.region.RegionRequest) // @@protoc_insertion_point(class_scope:greptime.v1.region.RegionRequest)
@@ -835,6 +888,7 @@ class RegionRequest final :
void set_has_creates(); void set_has_creates();
void set_has_drops(); void set_has_drops();
void set_has_alters(); void set_has_alters();
void set_has_bulk_inserts();
inline bool has_body() const; inline bool has_body() const;
inline void clear_has_body(); inline void clear_has_body();
@@ -860,6 +914,7 @@ class RegionRequest final :
::greptime::v1::region::CreateRequests* creates_; ::greptime::v1::region::CreateRequests* creates_;
::greptime::v1::region::DropRequests* drops_; ::greptime::v1::region::DropRequests* drops_;
::greptime::v1::region::AlterRequests* alters_; ::greptime::v1::region::AlterRequests* alters_;
::greptime::v1::region::BulkInsertRequests* bulk_inserts_;
} body_; } body_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
uint32_t _oneof_case_[1]; uint32_t _oneof_case_[1];
@@ -5122,6 +5177,338 @@ class RegionColumnDef final :
union { Impl_ _impl_; }; union { Impl_ _impl_; };
friend struct ::TableStruct_greptime_2fv1_2fregion_2fserver_2eproto; friend struct ::TableStruct_greptime_2fv1_2fregion_2fserver_2eproto;
}; };
// -------------------------------------------------------------------
class BulkInsertRequests final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.region.BulkInsertRequests) */ {
public:
inline BulkInsertRequests() : BulkInsertRequests(nullptr) {}
~BulkInsertRequests() override;
explicit PROTOBUF_CONSTEXPR BulkInsertRequests(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
BulkInsertRequests(const BulkInsertRequests& from);
BulkInsertRequests(BulkInsertRequests&& from) noexcept
: BulkInsertRequests() {
*this = ::std::move(from);
}
inline BulkInsertRequests& operator=(const BulkInsertRequests& from) {
CopyFrom(from);
return *this;
}
inline BulkInsertRequests& operator=(BulkInsertRequests&& 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 BulkInsertRequests& default_instance() {
return *internal_default_instance();
}
static inline const BulkInsertRequests* internal_default_instance() {
return reinterpret_cast<const BulkInsertRequests*>(
&_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<BulkInsertRequests>(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 <typename T> 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:
inline BulkInsertRequest() : BulkInsertRequest(nullptr) {}
~BulkInsertRequest() override;
explicit PROTOBUF_CONSTEXPR BulkInsertRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
BulkInsertRequest(const BulkInsertRequest& from);
BulkInsertRequest(BulkInsertRequest&& from) noexcept
: BulkInsertRequest() {
*this = ::std::move(from);
}
inline BulkInsertRequest& operator=(const BulkInsertRequest& from) {
CopyFrom(from);
return *this;
}
inline BulkInsertRequest& operator=(BulkInsertRequest&& 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 BulkInsertRequest& default_instance() {
return *internal_default_instance();
}
static inline const BulkInsertRequest* internal_default_instance() {
return reinterpret_cast<const BulkInsertRequest*>(
&_BulkInsertRequest_default_instance_);
}
static constexpr int kIndexInFileMessages =
31;
friend void swap(BulkInsertRequest& a, BulkInsertRequest& b) {
a.Swap(&b);
}
inline void Swap(BulkInsertRequest* 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(BulkInsertRequest* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
BulkInsertRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
return CreateMaybeMessage<BulkInsertRequest>(arena);
}
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const BulkInsertRequest& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
void MergeFrom( const BulkInsertRequest& from) {
BulkInsertRequest::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(BulkInsertRequest* other);
private:
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "greptime.v1.region.BulkInsertRequest";
}
protected:
explicit BulkInsertRequest(::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 {
kPayloadFieldNumber = 3,
kRegionIdFieldNumber = 1,
kPayloadTypeFieldNumber = 2,
};
// bytes payload = 3;
void clear_payload();
const std::string& payload() const;
template <typename ArgT0 = const std::string&, typename... ArgT>
void set_payload(ArgT0&& arg0, ArgT... args);
std::string* mutable_payload();
PROTOBUF_NODISCARD std::string* release_payload();
void set_allocated_payload(std::string* payload);
private:
const std::string& _internal_payload() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const std::string& value);
std::string* _internal_mutable_payload();
public:
// uint64 region_id = 1;
void clear_region_id();
uint64_t region_id() const;
void set_region_id(uint64_t value);
private:
uint64_t _internal_region_id() const;
void _internal_set_region_id(uint64_t value);
public:
// .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)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
struct Impl_ {
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_;
uint64_t region_id_;
int payload_type_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
};
union { Impl_ _impl_; };
friend struct ::TableStruct_greptime_2fv1_2fregion_2fserver_2eproto;
};
// =================================================================== // ===================================================================
@@ -6355,6 +6742,80 @@ inline ::greptime::v1::region::AlterRequests* RegionRequest::mutable_alters() {
return _msg; return _msg;
} }
// .greptime.v1.region.BulkInsertRequests bulk_inserts = 16;
inline bool RegionRequest::_internal_has_bulk_inserts() const {
return body_case() == kBulkInserts;
}
inline bool RegionRequest::has_bulk_inserts() const {
return _internal_has_bulk_inserts();
}
inline void RegionRequest::set_has_bulk_inserts() {
_impl_._oneof_case_[0] = kBulkInserts;
}
inline void RegionRequest::clear_bulk_inserts() {
if (_internal_has_bulk_inserts()) {
if (GetArenaForAllocation() == nullptr) {
delete _impl_.body_.bulk_inserts_;
}
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()) {
clear_has_body();
::greptime::v1::region::BulkInsertRequests* temp = _impl_.body_.bulk_inserts_;
if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
}
_impl_.body_.bulk_inserts_ = 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::BulkInsertRequests& RegionRequest::bulk_inserts() const {
// @@protoc_insertion_point(field_get:greptime.v1.region.RegionRequest.bulk_inserts)
return _internal_bulk_inserts();
}
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()) {
clear_has_body();
::greptime::v1::region::BulkInsertRequests* temp = _impl_.body_.bulk_inserts_;
_impl_.body_.bulk_inserts_ = nullptr;
return temp;
} else {
return nullptr;
}
}
inline void RegionRequest::unsafe_arena_set_allocated_bulk_inserts(::greptime::v1::region::BulkInsertRequests* bulk_inserts) {
clear_body();
if (bulk_inserts) {
set_has_bulk_inserts();
_impl_.body_.bulk_inserts_ = bulk_inserts;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.bulk_inserts)
}
inline ::greptime::v1::region::BulkInsertRequests* RegionRequest::_internal_mutable_bulk_inserts() {
if (!_internal_has_bulk_inserts()) {
clear_body();
set_has_bulk_inserts();
_impl_.body_.bulk_inserts_ = CreateMaybeMessage< ::greptime::v1::region::BulkInsertRequests >(GetArenaForAllocation());
}
return _impl_.body_.bulk_inserts_;
}
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)
return _msg;
}
inline bool RegionRequest::has_body() const { inline bool RegionRequest::has_body() const {
return body_case() != BODY_NOT_SET; return body_case() != BODY_NOT_SET;
} }
@@ -8789,6 +9250,144 @@ inline void RegionColumnDef::set_column_id(uint32_t value) {
// @@protoc_insertion_point(field_set:greptime.v1.region.RegionColumnDef.column_id) // @@protoc_insertion_point(field_set:greptime.v1.region.RegionColumnDef.column_id)
} }
// -------------------------------------------------------------------
// 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
// uint64 region_id = 1;
inline void BulkInsertRequest::clear_region_id() {
_impl_.region_id_ = uint64_t{0u};
}
inline uint64_t BulkInsertRequest::_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)
return _internal_region_id();
}
inline void BulkInsertRequest::_internal_set_region_id(uint64_t value) {
_impl_.region_id_ = value;
}
inline void BulkInsertRequest::set_region_id(uint64_t value) {
_internal_set_region_id(value);
// @@protoc_insertion_point(field_set:greptime.v1.region.BulkInsertRequest.region_id)
}
// .greptime.v1.region.BulkInsertType payload_type = 2;
inline void BulkInsertRequest::clear_payload_type() {
_impl_.payload_type_ = 0;
}
inline ::greptime::v1::region::BulkInsertType BulkInsertRequest::_internal_payload_type() const {
return static_cast< ::greptime::v1::region::BulkInsertType >(_impl_.payload_type_);
}
inline ::greptime::v1::region::BulkInsertType BulkInsertRequest::payload_type() const {
// @@protoc_insertion_point(field_get:greptime.v1.region.BulkInsertRequest.payload_type)
return _internal_payload_type();
}
inline void BulkInsertRequest::_internal_set_payload_type(::greptime::v1::region::BulkInsertType value) {
_impl_.payload_type_ = value;
}
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)
}
// bytes payload = 3;
inline void BulkInsertRequest::clear_payload() {
_impl_.payload_.ClearToEmpty();
}
inline const std::string& BulkInsertRequest::payload() const {
// @@protoc_insertion_point(field_get:greptime.v1.region.BulkInsertRequest.payload)
return _internal_payload();
}
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void BulkInsertRequest::set_payload(ArgT0&& arg0, ArgT... args) {
_impl_.payload_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:greptime.v1.region.BulkInsertRequest.payload)
}
inline std::string* BulkInsertRequest::mutable_payload() {
std::string* _s = _internal_mutable_payload();
// @@protoc_insertion_point(field_mutable:greptime.v1.region.BulkInsertRequest.payload)
return _s;
}
inline const std::string& BulkInsertRequest::_internal_payload() const {
return _impl_.payload_.Get();
}
inline void BulkInsertRequest::_internal_set_payload(const std::string& value) {
_impl_.payload_.Set(value, GetArenaForAllocation());
}
inline std::string* BulkInsertRequest::_internal_mutable_payload() {
return _impl_.payload_.Mutable(GetArenaForAllocation());
}
inline std::string* BulkInsertRequest::release_payload() {
// @@protoc_insertion_point(field_release:greptime.v1.region.BulkInsertRequest.payload)
return _impl_.payload_.Release();
}
inline void BulkInsertRequest::set_allocated_payload(std::string* payload) {
if (payload != nullptr) {
} else {
}
_impl_.payload_.SetAllocated(payload, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (_impl_.payload_.IsDefault()) {
_impl_.payload_.Set("", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.BulkInsertRequest.payload)
}
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif // __GNUC__ #endif // __GNUC__
@@ -8850,6 +9449,10 @@ inline void RegionColumnDef::set_column_id(uint32_t value) {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope) // @@protoc_insertion_point(namespace_scope)
@@ -8857,6 +9460,16 @@ inline void RegionColumnDef::set_column_id(uint32_t value) {
} // namespace v1 } // namespace v1
} // namespace greptime } // 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) // @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc> #include <google/protobuf/port_undef.inc>
File diff suppressed because it is too large Load Diff
+14
View File
@@ -53,6 +53,7 @@ message RegionRequest {
CreateRequests creates = 13; CreateRequests creates = 13;
DropRequests drops = 14; DropRequests drops = 14;
AlterRequests alters = 15; AlterRequests alters = 15;
BulkInsertRequests bulk_inserts = 16;
} }
} }
@@ -182,3 +183,16 @@ message RegionColumnDef {
ColumnDef column_def = 1; ColumnDef column_def = 1;
uint32 column_id = 2; uint32 column_id = 2;
} }
// Request of bulk ingestion API.
message BulkInsertRequests { repeated BulkInsertRequest requests = 1; }
enum BulkInsertType {
ARROW_IPC = 0;
}
message BulkInsertRequest {
uint64 region_id = 1;
BulkInsertType payload_type = 2;
bytes payload = 3;
}