feat: use path for ApplyStagingManifestRequest (#297)

Signed-off-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
Weny Xu
2025-12-30 14:57:56 +08:00
committed by GitHub
parent 520fa524f9
commit a2e5099d72
5 changed files with 418 additions and 369 deletions
+86 -48
View File
@@ -559,8 +559,9 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT
PROTOBUF_CONSTEXPR ApplyStagingManifestRequest::ApplyStagingManifestRequest(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.partition_expr_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.files_to_add_)*/nullptr
, /*decltype(_impl_.manifest_path_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.region_id_)*/uint64_t{0u}
, /*decltype(_impl_.central_region_id_)*/uint64_t{0u}
, /*decltype(_impl_._cached_size_)*/{}} {}
struct ApplyStagingManifestRequestDefaultTypeInternal {
PROTOBUF_CONSTEXPR ApplyStagingManifestRequestDefaultTypeInternal()
@@ -937,7 +938,8 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ApplyStagingManifestRequest, _impl_.region_id_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ApplyStagingManifestRequest, _impl_.partition_expr_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ApplyStagingManifestRequest, _impl_.files_to_add_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ApplyStagingManifestRequest, _impl_.central_region_id_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ApplyStagingManifestRequest, _impl_.manifest_path_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 8, -1, sizeof(::greptime::v1::region::RegionRequestHeader_TracingContextEntry_DoNotUse)},
@@ -1150,15 +1152,14 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P
"ifest_info\")\n\023ListMetadataRequest\022\022\n\nreg"
"ion_ids\030\001 \003(\004\"&\n\021BuildIndexRequest\022\021\n\tre"
"gion_id\030\001 \001(\004\"\031\n\tFileMetas\022\014\n\004data\030\001 \001(\014"
"\"}\n\033ApplyStagingManifestRequest\022\021\n\tregio"
"n_id\030\001 \001(\004\022\026\n\016partition_expr\030\002 \001(\t\0223\n\014fi"
"les_to_add\030\003 \001(\0132\035.greptime.v1.region.Fi"
"leMetas2Y\n\006Region\022O\n\006Handle\022!.greptime.v"
"1.region.RegionRequest\032\".greptime.v1.reg"
"ion.RegionResponseB]\n\025io.greptime.v1.reg"
"ionB\006ServerZ<github.com/GreptimeTeam/gre"
"ptime-proto/go/greptime/v1/regionb\006proto"
"3"
"\"z\n\033ApplyStagingManifestRequest\022\021\n\tregio"
"n_id\030\001 \001(\004\022\026\n\016partition_expr\030\002 \001(\t\022\031\n\021ce"
"ntral_region_id\030\003 \001(\004\022\025\n\rmanifest_path\030\004"
" \001(\t2Y\n\006Region\022O\n\006Handle\022!.greptime.v1.r"
"egion.RegionRequest\032\".greptime.v1.region"
".RegionResponseB]\n\025io.greptime.v1.region"
"B\006ServerZ<github.com/GreptimeTeam/grepti"
"me-proto/go/greptime/v1/regionb\006proto3"
;
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps[4] = {
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
@@ -1168,7 +1169,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2freg
};
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto = {
false, false, 5281, descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto,
false, false, 5278, descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto,
"greptime/v1/region/server.proto",
&descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps, 4, 40,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets,
@@ -11023,13 +11024,8 @@ void FileMetas::InternalSwap(FileMetas* other) {
class ApplyStagingManifestRequest::_Internal {
public:
static const ::greptime::v1::region::FileMetas& files_to_add(const ApplyStagingManifestRequest* msg);
};
const ::greptime::v1::region::FileMetas&
ApplyStagingManifestRequest::_Internal::files_to_add(const ApplyStagingManifestRequest* msg) {
return *msg->_impl_.files_to_add_;
}
ApplyStagingManifestRequest::ApplyStagingManifestRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
@@ -11041,8 +11037,9 @@ ApplyStagingManifestRequest::ApplyStagingManifestRequest(const ApplyStagingManif
ApplyStagingManifestRequest* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.partition_expr_){}
, decltype(_impl_.files_to_add_){nullptr}
, decltype(_impl_.manifest_path_){}
, decltype(_impl_.region_id_){}
, decltype(_impl_.central_region_id_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -11054,10 +11051,17 @@ ApplyStagingManifestRequest::ApplyStagingManifestRequest(const ApplyStagingManif
_this->_impl_.partition_expr_.Set(from._internal_partition_expr(),
_this->GetArenaForAllocation());
}
if (from._internal_has_files_to_add()) {
_this->_impl_.files_to_add_ = new ::greptime::v1::region::FileMetas(*from._impl_.files_to_add_);
_impl_.manifest_path_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.manifest_path_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_manifest_path().empty()) {
_this->_impl_.manifest_path_.Set(from._internal_manifest_path(),
_this->GetArenaForAllocation());
}
_this->_impl_.region_id_ = from._impl_.region_id_;
::memcpy(&_impl_.region_id_, &from._impl_.region_id_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.central_region_id_) -
reinterpret_cast<char*>(&_impl_.region_id_)) + sizeof(_impl_.central_region_id_));
// @@protoc_insertion_point(copy_constructor:greptime.v1.region.ApplyStagingManifestRequest)
}
@@ -11067,14 +11071,19 @@ inline void ApplyStagingManifestRequest::SharedCtor(
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.partition_expr_){}
, decltype(_impl_.files_to_add_){nullptr}
, decltype(_impl_.manifest_path_){}
, decltype(_impl_.region_id_){uint64_t{0u}}
, decltype(_impl_.central_region_id_){uint64_t{0u}}
, /*decltype(_impl_._cached_size_)*/{}
};
_impl_.partition_expr_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.partition_expr_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.manifest_path_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.manifest_path_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ApplyStagingManifestRequest::~ApplyStagingManifestRequest() {
@@ -11089,7 +11098,7 @@ ApplyStagingManifestRequest::~ApplyStagingManifestRequest() {
inline void ApplyStagingManifestRequest::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.partition_expr_.Destroy();
if (this != internal_default_instance()) delete _impl_.files_to_add_;
_impl_.manifest_path_.Destroy();
}
void ApplyStagingManifestRequest::SetCachedSize(int size) const {
@@ -11103,11 +11112,10 @@ void ApplyStagingManifestRequest::Clear() {
(void) cached_has_bits;
_impl_.partition_expr_.ClearToEmpty();
if (GetArenaForAllocation() == nullptr && _impl_.files_to_add_ != nullptr) {
delete _impl_.files_to_add_;
}
_impl_.files_to_add_ = nullptr;
_impl_.region_id_ = uint64_t{0u};
_impl_.manifest_path_.ClearToEmpty();
::memset(&_impl_.region_id_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.central_region_id_) -
reinterpret_cast<char*>(&_impl_.region_id_)) + sizeof(_impl_.central_region_id_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -11135,14 +11143,24 @@ const char* ApplyStagingManifestRequest::_InternalParse(const char* ptr, ::_pbi:
} else
goto handle_unusual;
continue;
// .greptime.v1.region.FileMetas files_to_add = 3;
// uint64 central_region_id = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_files_to_add(), ptr);
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_impl_.central_region_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// string manifest_path = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_manifest_path();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.region.ApplyStagingManifestRequest.manifest_path"));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
@@ -11188,11 +11206,20 @@ uint8_t* ApplyStagingManifestRequest::_InternalSerialize(
2, this->_internal_partition_expr(), target);
}
// .greptime.v1.region.FileMetas files_to_add = 3;
if (this->_internal_has_files_to_add()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, _Internal::files_to_add(this),
_Internal::files_to_add(this).GetCachedSize(), target, stream);
// uint64 central_region_id = 3;
if (this->_internal_central_region_id() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_central_region_id(), target);
}
// string manifest_path = 4;
if (!this->_internal_manifest_path().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_manifest_path().data(), static_cast<int>(this->_internal_manifest_path().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"greptime.v1.region.ApplyStagingManifestRequest.manifest_path");
target = stream->WriteStringMaybeAliased(
4, this->_internal_manifest_path(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -11218,11 +11245,11 @@ size_t ApplyStagingManifestRequest::ByteSizeLong() const {
this->_internal_partition_expr());
}
// .greptime.v1.region.FileMetas files_to_add = 3;
if (this->_internal_has_files_to_add()) {
// string manifest_path = 4;
if (!this->_internal_manifest_path().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.files_to_add_);
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_manifest_path());
}
// uint64 region_id = 1;
@@ -11230,6 +11257,11 @@ size_t ApplyStagingManifestRequest::ByteSizeLong() const {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_region_id());
}
// uint64 central_region_id = 3;
if (this->_internal_central_region_id() != 0) {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_central_region_id());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
@@ -11251,13 +11283,15 @@ void ApplyStagingManifestRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to
if (!from._internal_partition_expr().empty()) {
_this->_internal_set_partition_expr(from._internal_partition_expr());
}
if (from._internal_has_files_to_add()) {
_this->_internal_mutable_files_to_add()->::greptime::v1::region::FileMetas::MergeFrom(
from._internal_files_to_add());
if (!from._internal_manifest_path().empty()) {
_this->_internal_set_manifest_path(from._internal_manifest_path());
}
if (from._internal_region_id() != 0) {
_this->_internal_set_region_id(from._internal_region_id());
}
if (from._internal_central_region_id() != 0) {
_this->_internal_set_central_region_id(from._internal_central_region_id());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -11281,12 +11315,16 @@ void ApplyStagingManifestRequest::InternalSwap(ApplyStagingManifestRequest* othe
&_impl_.partition_expr_, lhs_arena,
&other->_impl_.partition_expr_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.manifest_path_, lhs_arena,
&other->_impl_.manifest_path_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ApplyStagingManifestRequest, _impl_.region_id_)
+ sizeof(ApplyStagingManifestRequest::_impl_.region_id_)
- PROTOBUF_FIELD_OFFSET(ApplyStagingManifestRequest, _impl_.files_to_add_)>(
reinterpret_cast<char*>(&_impl_.files_to_add_),
reinterpret_cast<char*>(&other->_impl_.files_to_add_));
PROTOBUF_FIELD_OFFSET(ApplyStagingManifestRequest, _impl_.central_region_id_)
+ sizeof(ApplyStagingManifestRequest::_impl_.central_region_id_)
- PROTOBUF_FIELD_OFFSET(ApplyStagingManifestRequest, _impl_.region_id_)>(
reinterpret_cast<char*>(&_impl_.region_id_),
reinterpret_cast<char*>(&other->_impl_.region_id_));
}
::PROTOBUF_NAMESPACE_ID::Metadata ApplyStagingManifestRequest::GetMetadata() const {
+82 -95
View File
@@ -7050,8 +7050,9 @@ class ApplyStagingManifestRequest final :
enum : int {
kPartitionExprFieldNumber = 2,
kFilesToAddFieldNumber = 3,
kManifestPathFieldNumber = 4,
kRegionIdFieldNumber = 1,
kCentralRegionIdFieldNumber = 3,
};
// string partition_expr = 2;
void clear_partition_expr();
@@ -7067,23 +7068,19 @@ class ApplyStagingManifestRequest final :
std::string* _internal_mutable_partition_expr();
public:
// .greptime.v1.region.FileMetas files_to_add = 3;
bool has_files_to_add() const;
// string manifest_path = 4;
void clear_manifest_path();
const std::string& manifest_path() const;
template <typename ArgT0 = const std::string&, typename... ArgT>
void set_manifest_path(ArgT0&& arg0, ArgT... args);
std::string* mutable_manifest_path();
PROTOBUF_NODISCARD std::string* release_manifest_path();
void set_allocated_manifest_path(std::string* manifest_path);
private:
bool _internal_has_files_to_add() const;
const std::string& _internal_manifest_path() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_manifest_path(const std::string& value);
std::string* _internal_mutable_manifest_path();
public:
void clear_files_to_add();
const ::greptime::v1::region::FileMetas& files_to_add() const;
PROTOBUF_NODISCARD ::greptime::v1::region::FileMetas* release_files_to_add();
::greptime::v1::region::FileMetas* mutable_files_to_add();
void set_allocated_files_to_add(::greptime::v1::region::FileMetas* files_to_add);
private:
const ::greptime::v1::region::FileMetas& _internal_files_to_add() const;
::greptime::v1::region::FileMetas* _internal_mutable_files_to_add();
public:
void unsafe_arena_set_allocated_files_to_add(
::greptime::v1::region::FileMetas* files_to_add);
::greptime::v1::region::FileMetas* unsafe_arena_release_files_to_add();
// uint64 region_id = 1;
void clear_region_id();
@@ -7094,6 +7091,15 @@ class ApplyStagingManifestRequest final :
void _internal_set_region_id(uint64_t value);
public:
// uint64 central_region_id = 3;
void clear_central_region_id();
uint64_t central_region_id() const;
void set_central_region_id(uint64_t value);
private:
uint64_t _internal_central_region_id() const;
void _internal_set_central_region_id(uint64_t value);
public:
// @@protoc_insertion_point(class_scope:greptime.v1.region.ApplyStagingManifestRequest)
private:
class _Internal;
@@ -7103,8 +7109,9 @@ class ApplyStagingManifestRequest final :
typedef void DestructorSkippable_;
struct Impl_ {
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr partition_expr_;
::greptime::v1::region::FileMetas* files_to_add_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr manifest_path_;
uint64_t region_id_;
uint64_t central_region_id_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
};
union { Impl_ _impl_; };
@@ -12388,94 +12395,74 @@ inline void ApplyStagingManifestRequest::set_allocated_partition_expr(std::strin
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.ApplyStagingManifestRequest.partition_expr)
}
// .greptime.v1.region.FileMetas files_to_add = 3;
inline bool ApplyStagingManifestRequest::_internal_has_files_to_add() const {
return this != internal_default_instance() && _impl_.files_to_add_ != nullptr;
// uint64 central_region_id = 3;
inline void ApplyStagingManifestRequest::clear_central_region_id() {
_impl_.central_region_id_ = uint64_t{0u};
}
inline bool ApplyStagingManifestRequest::has_files_to_add() const {
return _internal_has_files_to_add();
inline uint64_t ApplyStagingManifestRequest::_internal_central_region_id() const {
return _impl_.central_region_id_;
}
inline void ApplyStagingManifestRequest::clear_files_to_add() {
if (GetArenaForAllocation() == nullptr && _impl_.files_to_add_ != nullptr) {
delete _impl_.files_to_add_;
}
_impl_.files_to_add_ = nullptr;
inline uint64_t ApplyStagingManifestRequest::central_region_id() const {
// @@protoc_insertion_point(field_get:greptime.v1.region.ApplyStagingManifestRequest.central_region_id)
return _internal_central_region_id();
}
inline const ::greptime::v1::region::FileMetas& ApplyStagingManifestRequest::_internal_files_to_add() const {
const ::greptime::v1::region::FileMetas* p = _impl_.files_to_add_;
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::region::FileMetas&>(
::greptime::v1::region::_FileMetas_default_instance_);
inline void ApplyStagingManifestRequest::_internal_set_central_region_id(uint64_t value) {
_impl_.central_region_id_ = value;
}
inline const ::greptime::v1::region::FileMetas& ApplyStagingManifestRequest::files_to_add() const {
// @@protoc_insertion_point(field_get:greptime.v1.region.ApplyStagingManifestRequest.files_to_add)
return _internal_files_to_add();
inline void ApplyStagingManifestRequest::set_central_region_id(uint64_t value) {
_internal_set_central_region_id(value);
// @@protoc_insertion_point(field_set:greptime.v1.region.ApplyStagingManifestRequest.central_region_id)
}
inline void ApplyStagingManifestRequest::unsafe_arena_set_allocated_files_to_add(
::greptime::v1::region::FileMetas* files_to_add) {
if (GetArenaForAllocation() == nullptr) {
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.files_to_add_);
}
_impl_.files_to_add_ = files_to_add;
if (files_to_add) {
// string manifest_path = 4;
inline void ApplyStagingManifestRequest::clear_manifest_path() {
_impl_.manifest_path_.ClearToEmpty();
}
inline const std::string& ApplyStagingManifestRequest::manifest_path() const {
// @@protoc_insertion_point(field_get:greptime.v1.region.ApplyStagingManifestRequest.manifest_path)
return _internal_manifest_path();
}
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void ApplyStagingManifestRequest::set_manifest_path(ArgT0&& arg0, ArgT... args) {
_impl_.manifest_path_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:greptime.v1.region.ApplyStagingManifestRequest.manifest_path)
}
inline std::string* ApplyStagingManifestRequest::mutable_manifest_path() {
std::string* _s = _internal_mutable_manifest_path();
// @@protoc_insertion_point(field_mutable:greptime.v1.region.ApplyStagingManifestRequest.manifest_path)
return _s;
}
inline const std::string& ApplyStagingManifestRequest::_internal_manifest_path() const {
return _impl_.manifest_path_.Get();
}
inline void ApplyStagingManifestRequest::_internal_set_manifest_path(const std::string& value) {
_impl_.manifest_path_.Set(value, GetArenaForAllocation());
}
inline std::string* ApplyStagingManifestRequest::_internal_mutable_manifest_path() {
return _impl_.manifest_path_.Mutable(GetArenaForAllocation());
}
inline std::string* ApplyStagingManifestRequest::release_manifest_path() {
// @@protoc_insertion_point(field_release:greptime.v1.region.ApplyStagingManifestRequest.manifest_path)
return _impl_.manifest_path_.Release();
}
inline void ApplyStagingManifestRequest::set_allocated_manifest_path(std::string* manifest_path) {
if (manifest_path != nullptr) {
} else {
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.ApplyStagingManifestRequest.files_to_add)
}
inline ::greptime::v1::region::FileMetas* ApplyStagingManifestRequest::release_files_to_add() {
::greptime::v1::region::FileMetas* temp = _impl_.files_to_add_;
_impl_.files_to_add_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
if (GetArenaForAllocation() == nullptr) { delete old; }
#else // PROTOBUF_FORCE_COPY_IN_RELEASE
if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
_impl_.manifest_path_.SetAllocated(manifest_path, GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (_impl_.manifest_path_.IsDefault()) {
_impl_.manifest_path_.Set("", GetArenaForAllocation());
}
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
return temp;
}
inline ::greptime::v1::region::FileMetas* ApplyStagingManifestRequest::unsafe_arena_release_files_to_add() {
// @@protoc_insertion_point(field_release:greptime.v1.region.ApplyStagingManifestRequest.files_to_add)
::greptime::v1::region::FileMetas* temp = _impl_.files_to_add_;
_impl_.files_to_add_ = nullptr;
return temp;
}
inline ::greptime::v1::region::FileMetas* ApplyStagingManifestRequest::_internal_mutable_files_to_add() {
if (_impl_.files_to_add_ == nullptr) {
auto* p = CreateMaybeMessage<::greptime::v1::region::FileMetas>(GetArenaForAllocation());
_impl_.files_to_add_ = p;
}
return _impl_.files_to_add_;
}
inline ::greptime::v1::region::FileMetas* ApplyStagingManifestRequest::mutable_files_to_add() {
::greptime::v1::region::FileMetas* _msg = _internal_mutable_files_to_add();
// @@protoc_insertion_point(field_mutable:greptime.v1.region.ApplyStagingManifestRequest.files_to_add)
return _msg;
}
inline void ApplyStagingManifestRequest::set_allocated_files_to_add(::greptime::v1::region::FileMetas* files_to_add) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
delete _impl_.files_to_add_;
}
if (files_to_add) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(files_to_add);
if (message_arena != submessage_arena) {
files_to_add = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, files_to_add, submessage_arena);
}
} else {
}
_impl_.files_to_add_ = files_to_add;
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.ApplyStagingManifestRequest.files_to_add)
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.ApplyStagingManifestRequest.manifest_path)
}
#ifdef __GNUC__
+28 -19
View File
@@ -2511,8 +2511,10 @@ type ApplyStagingManifestRequest struct {
RegionId uint64 `protobuf:"varint,1,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
// The partition expression of the staging manifest.
PartitionExpr string `protobuf:"bytes,2,opt,name=partition_expr,json=partitionExpr,proto3" json:"partition_expr,omitempty"`
// The file metas to add to the staging manifest.
FilesToAdd *FileMetas `protobuf:"bytes,3,opt,name=files_to_add,json=filesToAdd,proto3" json:"files_to_add,omitempty"`
// The region stores the staging manifest.
CentralRegionId uint64 `protobuf:"varint,3,opt,name=central_region_id,json=centralRegionId,proto3" json:"central_region_id,omitempty"`
// Path to the staging manifest file.
ManifestPath string `protobuf:"bytes,4,opt,name=manifest_path,json=manifestPath,proto3" json:"manifest_path,omitempty"`
}
func (x *ApplyStagingManifestRequest) Reset() {
@@ -2561,11 +2563,18 @@ func (x *ApplyStagingManifestRequest) GetPartitionExpr() string {
return ""
}
func (x *ApplyStagingManifestRequest) GetFilesToAdd() *FileMetas {
func (x *ApplyStagingManifestRequest) GetCentralRegionId() uint64 {
if x != nil {
return x.FilesToAdd
return x.CentralRegionId
}
return nil
return 0
}
func (x *ApplyStagingManifestRequest) GetManifestPath() string {
if x != nil {
return x.ManifestPath
}
return ""
}
var File_greptime_v1_region_server_proto protoreflect.FileDescriptor
@@ -2948,18 +2957,19 @@ var file_greptime_v1_region_server_proto_rawDesc = []byte{
0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x04, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x1f, 0x0a, 0x09, 0x46,
0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa2, 0x01, 0x0a,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb2, 0x01, 0x0a,
0x1b, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x6e,
0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09,
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x72,
0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72,
0x12, 0x3f, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x6c, 0x65,
0x4d, 0x65, 0x74, 0x61, 0x73, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x54, 0x6f, 0x41, 0x64,
0x64, 0x32, 0x59, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x06, 0x48,
0x12, 0x2a, 0x0a, 0x11, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x63, 0x65, 0x6e,
0x74, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d,
0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x50, 0x61, 0x74,
0x68, 0x32, 0x59, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x06, 0x48,
0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f,
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
@@ -3107,14 +3117,13 @@ var file_greptime_v1_region_server_proto_depIdxs = []int32{
56, // 57: greptime.v1.region.BulkInsertRequest.arrow_ipc:type_name -> greptime.v1.ArrowIpc
29, // 58: greptime.v1.region.SyncRequest.mito_manifest_info:type_name -> greptime.v1.region.MitoManifestInfo
30, // 59: greptime.v1.region.SyncRequest.metric_manifest_info:type_name -> greptime.v1.region.MetricManifestInfo
34, // 60: greptime.v1.region.ApplyStagingManifestRequest.files_to_add:type_name -> greptime.v1.region.FileMetas
1, // 61: greptime.v1.region.Region.Handle:input_type -> greptime.v1.region.RegionRequest
2, // 62: greptime.v1.region.Region.Handle:output_type -> greptime.v1.region.RegionResponse
62, // [62:63] is the sub-list for method output_type
61, // [61:62] is the sub-list for method input_type
61, // [61:61] is the sub-list for extension type_name
61, // [61:61] is the sub-list for extension extendee
0, // [0:61] is the sub-list for field type_name
1, // 60: greptime.v1.region.Region.Handle:input_type -> greptime.v1.region.RegionRequest
2, // 61: greptime.v1.region.Region.Handle:output_type -> greptime.v1.region.RegionResponse
61, // [61:62] is the sub-list for method output_type
60, // [60:61] is the sub-list for method input_type
60, // [60:60] is the sub-list for extension type_name
60, // [60:60] is the sub-list for extension extendee
0, // [0:60] is the sub-list for field type_name
}
func init() { file_greptime_v1_region_server_proto_init() }
@@ -34537,30 +34537,33 @@ java.lang.String defaultValue);
/**
* <pre>
* The file metas to add to the staging manifest.
* The region stores the staging manifest.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
* @return Whether the filesToAdd field is set.
* <code>uint64 central_region_id = 3;</code>
* @return The centralRegionId.
*/
boolean hasFilesToAdd();
long getCentralRegionId();
/**
* <pre>
* The file metas to add to the staging manifest.
* Path to the staging manifest file.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
* @return The filesToAdd.
* <code>string manifest_path = 4;</code>
* @return The manifestPath.
*/
io.greptime.v1.region.Server.FileMetas getFilesToAdd();
java.lang.String getManifestPath();
/**
* <pre>
* The file metas to add to the staging manifest.
* Path to the staging manifest file.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
* <code>string manifest_path = 4;</code>
* @return The bytes for manifestPath.
*/
io.greptime.v1.region.Server.FileMetasOrBuilder getFilesToAddOrBuilder();
com.google.protobuf.ByteString
getManifestPathBytes();
}
/**
* <pre>
@@ -34580,6 +34583,7 @@ java.lang.String defaultValue);
}
private ApplyStagingManifestRequest() {
partitionExpr_ = "";
manifestPath_ = "";
}
@java.lang.Override
@@ -34623,17 +34627,15 @@ java.lang.String defaultValue);
partitionExpr_ = s;
break;
}
case 26: {
io.greptime.v1.region.Server.FileMetas.Builder subBuilder = null;
if (filesToAdd_ != null) {
subBuilder = filesToAdd_.toBuilder();
}
filesToAdd_ = input.readMessage(io.greptime.v1.region.Server.FileMetas.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(filesToAdd_);
filesToAdd_ = subBuilder.buildPartial();
}
case 24: {
centralRegionId_ = input.readUInt64();
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
manifestPath_ = s;
break;
}
default: {
@@ -34731,42 +34733,65 @@ java.lang.String defaultValue);
}
}
public static final int FILES_TO_ADD_FIELD_NUMBER = 3;
private io.greptime.v1.region.Server.FileMetas filesToAdd_;
public static final int CENTRAL_REGION_ID_FIELD_NUMBER = 3;
private long centralRegionId_;
/**
* <pre>
* The file metas to add to the staging manifest.
* The region stores the staging manifest.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
* @return Whether the filesToAdd field is set.
* <code>uint64 central_region_id = 3;</code>
* @return The centralRegionId.
*/
@java.lang.Override
public boolean hasFilesToAdd() {
return filesToAdd_ != null;
public long getCentralRegionId() {
return centralRegionId_;
}
public static final int MANIFEST_PATH_FIELD_NUMBER = 4;
private volatile java.lang.Object manifestPath_;
/**
* <pre>
* Path to the staging manifest file.
* </pre>
*
* <code>string manifest_path = 4;</code>
* @return The manifestPath.
*/
@java.lang.Override
public java.lang.String getManifestPath() {
java.lang.Object ref = manifestPath_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
manifestPath_ = s;
return s;
}
}
/**
* <pre>
* The file metas to add to the staging manifest.
* Path to the staging manifest file.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
* @return The filesToAdd.
* <code>string manifest_path = 4;</code>
* @return The bytes for manifestPath.
*/
@java.lang.Override
public io.greptime.v1.region.Server.FileMetas getFilesToAdd() {
return filesToAdd_ == null ? io.greptime.v1.region.Server.FileMetas.getDefaultInstance() : filesToAdd_;
public com.google.protobuf.ByteString
getManifestPathBytes() {
java.lang.Object ref = manifestPath_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
manifestPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
/**
* <pre>
* The file metas to add to the staging manifest.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
*/
@java.lang.Override
public io.greptime.v1.region.Server.FileMetasOrBuilder getFilesToAddOrBuilder() {
return getFilesToAdd();
}
private byte memoizedIsInitialized = -1;
@@ -34789,8 +34814,11 @@ java.lang.String defaultValue);
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionExpr_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, partitionExpr_);
}
if (filesToAdd_ != null) {
output.writeMessage(3, getFilesToAdd());
if (centralRegionId_ != 0L) {
output.writeUInt64(3, centralRegionId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manifestPath_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, manifestPath_);
}
unknownFields.writeTo(output);
}
@@ -34808,9 +34836,12 @@ java.lang.String defaultValue);
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionExpr_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, partitionExpr_);
}
if (filesToAdd_ != null) {
if (centralRegionId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getFilesToAdd());
.computeUInt64Size(3, centralRegionId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manifestPath_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, manifestPath_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
@@ -34831,11 +34862,10 @@ java.lang.String defaultValue);
!= other.getRegionId()) return false;
if (!getPartitionExpr()
.equals(other.getPartitionExpr())) return false;
if (hasFilesToAdd() != other.hasFilesToAdd()) return false;
if (hasFilesToAdd()) {
if (!getFilesToAdd()
.equals(other.getFilesToAdd())) return false;
}
if (getCentralRegionId()
!= other.getCentralRegionId()) return false;
if (!getManifestPath()
.equals(other.getManifestPath())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -34852,10 +34882,11 @@ java.lang.String defaultValue);
getRegionId());
hash = (37 * hash) + PARTITION_EXPR_FIELD_NUMBER;
hash = (53 * hash) + getPartitionExpr().hashCode();
if (hasFilesToAdd()) {
hash = (37 * hash) + FILES_TO_ADD_FIELD_NUMBER;
hash = (53 * hash) + getFilesToAdd().hashCode();
}
hash = (37 * hash) + CENTRAL_REGION_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCentralRegionId());
hash = (37 * hash) + MANIFEST_PATH_FIELD_NUMBER;
hash = (53 * hash) + getManifestPath().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -34997,12 +35028,10 @@ java.lang.String defaultValue);
partitionExpr_ = "";
if (filesToAddBuilder_ == null) {
filesToAdd_ = null;
} else {
filesToAdd_ = null;
filesToAddBuilder_ = null;
}
centralRegionId_ = 0L;
manifestPath_ = "";
return this;
}
@@ -35031,11 +35060,8 @@ java.lang.String defaultValue);
io.greptime.v1.region.Server.ApplyStagingManifestRequest result = new io.greptime.v1.region.Server.ApplyStagingManifestRequest(this);
result.regionId_ = regionId_;
result.partitionExpr_ = partitionExpr_;
if (filesToAddBuilder_ == null) {
result.filesToAdd_ = filesToAdd_;
} else {
result.filesToAdd_ = filesToAddBuilder_.build();
}
result.centralRegionId_ = centralRegionId_;
result.manifestPath_ = manifestPath_;
onBuilt();
return result;
}
@@ -35091,8 +35117,12 @@ java.lang.String defaultValue);
partitionExpr_ = other.partitionExpr_;
onChanged();
}
if (other.hasFilesToAdd()) {
mergeFilesToAdd(other.getFilesToAdd());
if (other.getCentralRegionId() != 0L) {
setCentralRegionId(other.getCentralRegionId());
}
if (!other.getManifestPath().isEmpty()) {
manifestPath_ = other.manifestPath_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
@@ -35262,160 +35292,144 @@ java.lang.String defaultValue);
return this;
}
private io.greptime.v1.region.Server.FileMetas filesToAdd_;
private com.google.protobuf.SingleFieldBuilderV3<
io.greptime.v1.region.Server.FileMetas, io.greptime.v1.region.Server.FileMetas.Builder, io.greptime.v1.region.Server.FileMetasOrBuilder> filesToAddBuilder_;
private long centralRegionId_ ;
/**
* <pre>
* The file metas to add to the staging manifest.
* The region stores the staging manifest.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
* @return Whether the filesToAdd field is set.
* <code>uint64 central_region_id = 3;</code>
* @return The centralRegionId.
*/
public boolean hasFilesToAdd() {
return filesToAddBuilder_ != null || filesToAdd_ != null;
@java.lang.Override
public long getCentralRegionId() {
return centralRegionId_;
}
/**
* <pre>
* The file metas to add to the staging manifest.
* The region stores the staging manifest.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
* @return The filesToAdd.
* <code>uint64 central_region_id = 3;</code>
* @param value The centralRegionId to set.
* @return This builder for chaining.
*/
public io.greptime.v1.region.Server.FileMetas getFilesToAdd() {
if (filesToAddBuilder_ == null) {
return filesToAdd_ == null ? io.greptime.v1.region.Server.FileMetas.getDefaultInstance() : filesToAdd_;
public Builder setCentralRegionId(long value) {
centralRegionId_ = value;
onChanged();
return this;
}
/**
* <pre>
* The region stores the staging manifest.
* </pre>
*
* <code>uint64 central_region_id = 3;</code>
* @return This builder for chaining.
*/
public Builder clearCentralRegionId() {
centralRegionId_ = 0L;
onChanged();
return this;
}
private java.lang.Object manifestPath_ = "";
/**
* <pre>
* Path to the staging manifest file.
* </pre>
*
* <code>string manifest_path = 4;</code>
* @return The manifestPath.
*/
public java.lang.String getManifestPath() {
java.lang.Object ref = manifestPath_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
manifestPath_ = s;
return s;
} else {
return filesToAddBuilder_.getMessage();
return (java.lang.String) ref;
}
}
/**
* <pre>
* The file metas to add to the staging manifest.
* Path to the staging manifest file.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
* <code>string manifest_path = 4;</code>
* @return The bytes for manifestPath.
*/
public Builder setFilesToAdd(io.greptime.v1.region.Server.FileMetas value) {
if (filesToAddBuilder_ == null) {
public com.google.protobuf.ByteString
getManifestPathBytes() {
java.lang.Object ref = manifestPath_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
manifestPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Path to the staging manifest file.
* </pre>
*
* <code>string manifest_path = 4;</code>
* @param value The manifestPath to set.
* @return This builder for chaining.
*/
public Builder setManifestPath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
filesToAdd_ = value;
onChanged();
} else {
filesToAddBuilder_.setMessage(value);
}
manifestPath_ = value;
onChanged();
return this;
}
/**
* <pre>
* The file metas to add to the staging manifest.
* Path to the staging manifest file.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
* <code>string manifest_path = 4;</code>
* @return This builder for chaining.
*/
public Builder setFilesToAdd(
io.greptime.v1.region.Server.FileMetas.Builder builderForValue) {
if (filesToAddBuilder_ == null) {
filesToAdd_ = builderForValue.build();
onChanged();
} else {
filesToAddBuilder_.setMessage(builderForValue.build());
}
public Builder clearManifestPath() {
manifestPath_ = getDefaultInstance().getManifestPath();
onChanged();
return this;
}
/**
* <pre>
* The file metas to add to the staging manifest.
* Path to the staging manifest file.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
* <code>string manifest_path = 4;</code>
* @param value The bytes for manifestPath to set.
* @return This builder for chaining.
*/
public Builder mergeFilesToAdd(io.greptime.v1.region.Server.FileMetas value) {
if (filesToAddBuilder_ == null) {
if (filesToAdd_ != null) {
filesToAdd_ =
io.greptime.v1.region.Server.FileMetas.newBuilder(filesToAdd_).mergeFrom(value).buildPartial();
} else {
filesToAdd_ = value;
}
onChanged();
} else {
filesToAddBuilder_.mergeFrom(value);
public Builder setManifestPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
manifestPath_ = value;
onChanged();
return this;
}
/**
* <pre>
* The file metas to add to the staging manifest.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
*/
public Builder clearFilesToAdd() {
if (filesToAddBuilder_ == null) {
filesToAdd_ = null;
onChanged();
} else {
filesToAdd_ = null;
filesToAddBuilder_ = null;
}
return this;
}
/**
* <pre>
* The file metas to add to the staging manifest.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
*/
public io.greptime.v1.region.Server.FileMetas.Builder getFilesToAddBuilder() {
onChanged();
return getFilesToAddFieldBuilder().getBuilder();
}
/**
* <pre>
* The file metas to add to the staging manifest.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
*/
public io.greptime.v1.region.Server.FileMetasOrBuilder getFilesToAddOrBuilder() {
if (filesToAddBuilder_ != null) {
return filesToAddBuilder_.getMessageOrBuilder();
} else {
return filesToAdd_ == null ?
io.greptime.v1.region.Server.FileMetas.getDefaultInstance() : filesToAdd_;
}
}
/**
* <pre>
* The file metas to add to the staging manifest.
* </pre>
*
* <code>.greptime.v1.region.FileMetas files_to_add = 3;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.greptime.v1.region.Server.FileMetas, io.greptime.v1.region.Server.FileMetas.Builder, io.greptime.v1.region.Server.FileMetasOrBuilder>
getFilesToAddFieldBuilder() {
if (filesToAddBuilder_ == null) {
filesToAddBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.greptime.v1.region.Server.FileMetas, io.greptime.v1.region.Server.FileMetas.Builder, io.greptime.v1.region.Server.FileMetasOrBuilder>(
getFilesToAdd(),
getParentForChildren(),
isClean());
filesToAdd_ = null;
}
return filesToAddBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
@@ -35802,15 +35816,14 @@ java.lang.String defaultValue);
"ifest_info\")\n\023ListMetadataRequest\022\022\n\nreg" +
"ion_ids\030\001 \003(\004\"&\n\021BuildIndexRequest\022\021\n\tre" +
"gion_id\030\001 \001(\004\"\031\n\tFileMetas\022\014\n\004data\030\001 \001(\014" +
"\"}\n\033ApplyStagingManifestRequest\022\021\n\tregio" +
"n_id\030\001 \001(\004\022\026\n\016partition_expr\030\002 \001(\t\0223\n\014fi" +
"les_to_add\030\003 \001(\0132\035.greptime.v1.region.Fi" +
"leMetas2Y\n\006Region\022O\n\006Handle\022!.greptime.v" +
"1.region.RegionRequest\032\".greptime.v1.reg" +
"ion.RegionResponseB]\n\025io.greptime.v1.reg" +
"ionB\006ServerZ<github.com/GreptimeTeam/gre" +
"ptime-proto/go/greptime/v1/regionb\006proto" +
"3"
"\"z\n\033ApplyStagingManifestRequest\022\021\n\tregio" +
"n_id\030\001 \001(\004\022\026\n\016partition_expr\030\002 \001(\t\022\031\n\021ce" +
"ntral_region_id\030\003 \001(\004\022\025\n\rmanifest_path\030\004" +
" \001(\t2Y\n\006Region\022O\n\006Handle\022!.greptime.v1.r" +
"egion.RegionRequest\032\".greptime.v1.region" +
".RegionResponseB]\n\025io.greptime.v1.region" +
"B\006ServerZ<github.com/GreptimeTeam/grepti" +
"me-proto/go/greptime/v1/regionb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
@@ -36059,7 +36072,7 @@ java.lang.String defaultValue);
internal_static_greptime_v1_region_ApplyStagingManifestRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_greptime_v1_region_ApplyStagingManifestRequest_descriptor,
new java.lang.String[] { "RegionId", "PartitionExpr", "FilesToAdd", });
new java.lang.String[] { "RegionId", "PartitionExpr", "CentralRegionId", "ManifestPath", });
io.greptime.v1.Common.getDescriptor();
io.greptime.v1.Ddl.getDescriptor();
greptime.v1.meta.Route.getDescriptor();
+4 -2
View File
@@ -287,6 +287,8 @@ message ApplyStagingManifestRequest {
uint64 region_id = 1;
// The partition expression of the staging manifest.
string partition_expr = 2;
// The file metas to add to the staging manifest.
FileMetas files_to_add = 3;
// The region stores the staging manifest.
uint64 central_region_id = 3;
// Path to the staging manifest file.
string manifest_path = 4;
}