diff --git a/build.rs b/build.rs index c1c29f00..3834aba7 100644 --- a/build.rs +++ b/build.rs @@ -43,6 +43,7 @@ fn main() { "proto/greptime/v1/meta/procedure.proto", "proto/greptime/v1/region/server.proto", "proto/greptime/v1/flow/server.proto", + "proto/greptime/v1/index/bloom_filter.proto", "proto/greptime/v1/index/inverted_index.proto", "proto/prometheus/remote/remote.proto", "proto/substrait_extension/promql_plan.proto", diff --git a/c++/greptime/v1/index/bloom_filter.grpc.pb.cc b/c++/greptime/v1/index/bloom_filter.grpc.pb.cc new file mode 100644 index 00000000..2d5afc93 --- /dev/null +++ b/c++/greptime/v1/index/bloom_filter.grpc.pb.cc @@ -0,0 +1,29 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: greptime/v1/index/bloom_filter.proto + +#include "greptime/v1/index/bloom_filter.pb.h" +#include "greptime/v1/index/bloom_filter.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace greptime { +namespace v1 { +namespace index { + +} // namespace greptime +} // namespace v1 +} // namespace index + diff --git a/c++/greptime/v1/index/bloom_filter.grpc.pb.h b/c++/greptime/v1/index/bloom_filter.grpc.pb.h new file mode 100644 index 00000000..1c6931cd --- /dev/null +++ b/c++/greptime/v1/index/bloom_filter.grpc.pb.h @@ -0,0 +1,52 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: greptime/v1/index/bloom_filter.proto +// Original file comments: +// Copyright 2023 Greptime Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#ifndef GRPC_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto__INCLUDED +#define GRPC_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto__INCLUDED + +#include "greptime/v1/index/bloom_filter.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace greptime { +namespace v1 { +namespace index { + +} // namespace index +} // namespace v1 +} // namespace greptime + + +#endif // GRPC_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto__INCLUDED diff --git a/c++/greptime/v1/index/bloom_filter.pb.cc b/c++/greptime/v1/index/bloom_filter.pb.cc new file mode 100644 index 00000000..e863eea8 --- /dev/null +++ b/c++/greptime/v1/index/bloom_filter.pb.cc @@ -0,0 +1,718 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: greptime/v1/index/bloom_filter.proto + +#include "greptime/v1/index/bloom_filter.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace greptime { +namespace v1 { +namespace index { +PROTOBUF_CONSTEXPR BloomFilterMeta::BloomFilterMeta( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.segment_loc_indices_)*/{} + , /*decltype(_impl_._segment_loc_indices_cached_byte_size_)*/{0} + , /*decltype(_impl_.bloom_filter_locs_)*/{} + , /*decltype(_impl_.rows_per_segment_)*/uint64_t{0u} + , /*decltype(_impl_.segment_count_)*/uint64_t{0u} + , /*decltype(_impl_.row_count_)*/uint64_t{0u} + , /*decltype(_impl_.bloom_filter_size_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct BloomFilterMetaDefaultTypeInternal { + PROTOBUF_CONSTEXPR BloomFilterMetaDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BloomFilterMetaDefaultTypeInternal() {} + union { + BloomFilterMeta _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BloomFilterMetaDefaultTypeInternal _BloomFilterMeta_default_instance_; +PROTOBUF_CONSTEXPR BloomFilterLoc::BloomFilterLoc( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.offset_)*/uint64_t{0u} + , /*decltype(_impl_.size_)*/uint64_t{0u} + , /*decltype(_impl_.element_count_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct BloomFilterLocDefaultTypeInternal { + PROTOBUF_CONSTEXPR BloomFilterLocDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BloomFilterLocDefaultTypeInternal() {} + union { + BloomFilterLoc _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BloomFilterLocDefaultTypeInternal _BloomFilterLoc_default_instance_; +} // namespace index +} // namespace v1 +} // namespace greptime +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto[2]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto = nullptr; + +const uint32_t TableStruct_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.rows_per_segment_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.segment_count_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.row_count_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.bloom_filter_size_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.segment_loc_indices_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.bloom_filter_locs_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterLoc, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterLoc, _impl_.offset_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterLoc, _impl_.size_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterLoc, _impl_.element_count_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::greptime::v1::index::BloomFilterMeta)}, + { 12, -1, -1, sizeof(::greptime::v1::index::BloomFilterLoc)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::greptime::v1::index::_BloomFilterMeta_default_instance_._instance, + &::greptime::v1::index::_BloomFilterLoc_default_instance_._instance, +}; + +const char descriptor_table_protodef_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n$greptime/v1/index/bloom_filter.proto\022\021" + "greptime.v1.index\"\313\001\n\017BloomFilterMeta\022\030\n" + "\020rows_per_segment\030\001 \001(\004\022\025\n\rsegment_count" + "\030\002 \001(\004\022\021\n\trow_count\030\003 \001(\004\022\031\n\021bloom_filte" + "r_size\030\004 \001(\004\022\033\n\023segment_loc_indices\030\005 \003(" + "\004\022<\n\021bloom_filter_locs\030\006 \003(\0132!.greptime." + "v1.index.BloomFilterLoc\"E\n\016BloomFilterLo" + "c\022\016\n\006offset\030\001 \001(\004\022\014\n\004size\030\002 \001(\004\022\025\n\releme" + "nt_count\030\003 \001(\004B=Z;github.com/GreptimeTea" + "m/greptime-proto/go/greptime/v1/indexb\006p" + "roto3" + ; +static ::_pbi::once_flag descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto = { + false, false, 405, descriptor_table_protodef_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto, + "greptime/v1/index/bloom_filter.proto", + &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_once, nullptr, 0, 2, + schemas, file_default_instances, TableStruct_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto::offsets, + file_level_metadata_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto, file_level_enum_descriptors_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto, + file_level_service_descriptors_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_getter() { + return &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto(&descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto); +namespace greptime { +namespace v1 { +namespace index { + +// =================================================================== + +class BloomFilterMeta::_Internal { + public: +}; + +BloomFilterMeta::BloomFilterMeta(::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.index.BloomFilterMeta) +} +BloomFilterMeta::BloomFilterMeta(const BloomFilterMeta& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + BloomFilterMeta* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.segment_loc_indices_){from._impl_.segment_loc_indices_} + , /*decltype(_impl_._segment_loc_indices_cached_byte_size_)*/{0} + , decltype(_impl_.bloom_filter_locs_){from._impl_.bloom_filter_locs_} + , decltype(_impl_.rows_per_segment_){} + , decltype(_impl_.segment_count_){} + , decltype(_impl_.row_count_){} + , decltype(_impl_.bloom_filter_size_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&_impl_.rows_per_segment_, &from._impl_.rows_per_segment_, + static_cast(reinterpret_cast(&_impl_.bloom_filter_size_) - + reinterpret_cast(&_impl_.rows_per_segment_)) + sizeof(_impl_.bloom_filter_size_)); + // @@protoc_insertion_point(copy_constructor:greptime.v1.index.BloomFilterMeta) +} + +inline void BloomFilterMeta::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.segment_loc_indices_){arena} + , /*decltype(_impl_._segment_loc_indices_cached_byte_size_)*/{0} + , decltype(_impl_.bloom_filter_locs_){arena} + , decltype(_impl_.rows_per_segment_){uint64_t{0u}} + , decltype(_impl_.segment_count_){uint64_t{0u}} + , decltype(_impl_.row_count_){uint64_t{0u}} + , decltype(_impl_.bloom_filter_size_){uint64_t{0u}} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +BloomFilterMeta::~BloomFilterMeta() { + // @@protoc_insertion_point(destructor:greptime.v1.index.BloomFilterMeta) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BloomFilterMeta::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.segment_loc_indices_.~RepeatedField(); + _impl_.bloom_filter_locs_.~RepeatedPtrField(); +} + +void BloomFilterMeta::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void BloomFilterMeta::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.index.BloomFilterMeta) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.segment_loc_indices_.Clear(); + _impl_.bloom_filter_locs_.Clear(); + ::memset(&_impl_.rows_per_segment_, 0, static_cast( + reinterpret_cast(&_impl_.bloom_filter_size_) - + reinterpret_cast(&_impl_.rows_per_segment_)) + sizeof(_impl_.bloom_filter_size_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BloomFilterMeta::_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 rows_per_segment = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.rows_per_segment_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 segment_count = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.segment_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 row_count = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.row_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 bloom_filter_size = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _impl_.bloom_filter_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated uint64 segment_loc_indices = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_segment_loc_indices(), ptr, ctx); + CHK_(ptr); + } else if (static_cast(tag) == 40) { + _internal_add_segment_loc_indices(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_bloom_filter_locs(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(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* BloomFilterMeta::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.index.BloomFilterMeta) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint64 rows_per_segment = 1; + if (this->_internal_rows_per_segment() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_rows_per_segment(), target); + } + + // uint64 segment_count = 2; + if (this->_internal_segment_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_segment_count(), target); + } + + // uint64 row_count = 3; + if (this->_internal_row_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_row_count(), target); + } + + // uint64 bloom_filter_size = 4; + if (this->_internal_bloom_filter_size() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_bloom_filter_size(), target); + } + + // repeated uint64 segment_loc_indices = 5; + { + int byte_size = _impl_._segment_loc_indices_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteUInt64Packed( + 5, _internal_segment_loc_indices(), byte_size, target); + } + } + + // repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + for (unsigned i = 0, + n = static_cast(this->_internal_bloom_filter_locs_size()); i < n; i++) { + const auto& repfield = this->_internal_bloom_filter_locs(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, 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.index.BloomFilterMeta) + return target; +} + +size_t BloomFilterMeta::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.index.BloomFilterMeta) + 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 uint64 segment_loc_indices = 5; + { + size_t data_size = ::_pbi::WireFormatLite:: + UInt64Size(this->_impl_.segment_loc_indices_); + if (data_size > 0) { + total_size += 1 + + ::_pbi::WireFormatLite::Int32Size(static_cast(data_size)); + } + int cached_size = ::_pbi::ToCachedSize(data_size); + _impl_._segment_loc_indices_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + total_size += 1UL * this->_internal_bloom_filter_locs_size(); + for (const auto& msg : this->_impl_.bloom_filter_locs_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // uint64 rows_per_segment = 1; + if (this->_internal_rows_per_segment() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_rows_per_segment()); + } + + // uint64 segment_count = 2; + if (this->_internal_segment_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_segment_count()); + } + + // uint64 row_count = 3; + if (this->_internal_row_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_row_count()); + } + + // uint64 bloom_filter_size = 4; + if (this->_internal_bloom_filter_size() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_bloom_filter_size()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BloomFilterMeta::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + BloomFilterMeta::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BloomFilterMeta::GetClassData() const { return &_class_data_; } + + +void BloomFilterMeta::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.index.BloomFilterMeta) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.segment_loc_indices_.MergeFrom(from._impl_.segment_loc_indices_); + _this->_impl_.bloom_filter_locs_.MergeFrom(from._impl_.bloom_filter_locs_); + if (from._internal_rows_per_segment() != 0) { + _this->_internal_set_rows_per_segment(from._internal_rows_per_segment()); + } + if (from._internal_segment_count() != 0) { + _this->_internal_set_segment_count(from._internal_segment_count()); + } + if (from._internal_row_count() != 0) { + _this->_internal_set_row_count(from._internal_row_count()); + } + if (from._internal_bloom_filter_size() != 0) { + _this->_internal_set_bloom_filter_size(from._internal_bloom_filter_size()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BloomFilterMeta::CopyFrom(const BloomFilterMeta& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.index.BloomFilterMeta) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BloomFilterMeta::IsInitialized() const { + return true; +} + +void BloomFilterMeta::InternalSwap(BloomFilterMeta* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.segment_loc_indices_.InternalSwap(&other->_impl_.segment_loc_indices_); + _impl_.bloom_filter_locs_.InternalSwap(&other->_impl_.bloom_filter_locs_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BloomFilterMeta, _impl_.bloom_filter_size_) + + sizeof(BloomFilterMeta::_impl_.bloom_filter_size_) + - PROTOBUF_FIELD_OFFSET(BloomFilterMeta, _impl_.rows_per_segment_)>( + reinterpret_cast(&_impl_.rows_per_segment_), + reinterpret_cast(&other->_impl_.rows_per_segment_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BloomFilterMeta::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_getter, &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_once, + file_level_metadata_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto[0]); +} + +// =================================================================== + +class BloomFilterLoc::_Internal { + public: +}; + +BloomFilterLoc::BloomFilterLoc(::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.index.BloomFilterLoc) +} +BloomFilterLoc::BloomFilterLoc(const BloomFilterLoc& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + BloomFilterLoc* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.offset_){} + , decltype(_impl_.size_){} + , decltype(_impl_.element_count_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&_impl_.offset_, &from._impl_.offset_, + static_cast(reinterpret_cast(&_impl_.element_count_) - + reinterpret_cast(&_impl_.offset_)) + sizeof(_impl_.element_count_)); + // @@protoc_insertion_point(copy_constructor:greptime.v1.index.BloomFilterLoc) +} + +inline void BloomFilterLoc::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.offset_){uint64_t{0u}} + , decltype(_impl_.size_){uint64_t{0u}} + , decltype(_impl_.element_count_){uint64_t{0u}} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +BloomFilterLoc::~BloomFilterLoc() { + // @@protoc_insertion_point(destructor:greptime.v1.index.BloomFilterLoc) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BloomFilterLoc::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void BloomFilterLoc::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void BloomFilterLoc::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.index.BloomFilterLoc) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&_impl_.offset_, 0, static_cast( + reinterpret_cast(&_impl_.element_count_) - + reinterpret_cast(&_impl_.offset_)) + sizeof(_impl_.element_count_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BloomFilterLoc::_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 offset = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 size = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 element_count = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.element_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BloomFilterLoc::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.index.BloomFilterLoc) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint64 offset = 1; + if (this->_internal_offset() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_offset(), target); + } + + // uint64 size = 2; + if (this->_internal_size() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_size(), target); + } + + // uint64 element_count = 3; + if (this->_internal_element_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_element_count(), 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.index.BloomFilterLoc) + return target; +} + +size_t BloomFilterLoc::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.index.BloomFilterLoc) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint64 offset = 1; + if (this->_internal_offset() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_offset()); + } + + // uint64 size = 2; + if (this->_internal_size() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_size()); + } + + // uint64 element_count = 3; + if (this->_internal_element_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_element_count()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BloomFilterLoc::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + BloomFilterLoc::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BloomFilterLoc::GetClassData() const { return &_class_data_; } + + +void BloomFilterLoc::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.index.BloomFilterLoc) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_offset() != 0) { + _this->_internal_set_offset(from._internal_offset()); + } + if (from._internal_size() != 0) { + _this->_internal_set_size(from._internal_size()); + } + if (from._internal_element_count() != 0) { + _this->_internal_set_element_count(from._internal_element_count()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BloomFilterLoc::CopyFrom(const BloomFilterLoc& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.index.BloomFilterLoc) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BloomFilterLoc::IsInitialized() const { + return true; +} + +void BloomFilterLoc::InternalSwap(BloomFilterLoc* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BloomFilterLoc, _impl_.element_count_) + + sizeof(BloomFilterLoc::_impl_.element_count_) + - PROTOBUF_FIELD_OFFSET(BloomFilterLoc, _impl_.offset_)>( + reinterpret_cast(&_impl_.offset_), + reinterpret_cast(&other->_impl_.offset_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BloomFilterLoc::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_getter, &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_once, + file_level_metadata_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto[1]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace index +} // namespace v1 +} // namespace greptime +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::greptime::v1::index::BloomFilterMeta* +Arena::CreateMaybeMessage< ::greptime::v1::index::BloomFilterMeta >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::index::BloomFilterMeta >(arena); +} +template<> PROTOBUF_NOINLINE ::greptime::v1::index::BloomFilterLoc* +Arena::CreateMaybeMessage< ::greptime::v1::index::BloomFilterLoc >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::index::BloomFilterLoc >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/c++/greptime/v1/index/bloom_filter.pb.h b/c++/greptime/v1/index/bloom_filter.pb.h new file mode 100644 index 00000000..81d55249 --- /dev/null +++ b/c++/greptime/v1/index/bloom_filter.pb.h @@ -0,0 +1,720 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: greptime/v1/index/bloom_filter.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto; +namespace greptime { +namespace v1 { +namespace index { +class BloomFilterLoc; +struct BloomFilterLocDefaultTypeInternal; +extern BloomFilterLocDefaultTypeInternal _BloomFilterLoc_default_instance_; +class BloomFilterMeta; +struct BloomFilterMetaDefaultTypeInternal; +extern BloomFilterMetaDefaultTypeInternal _BloomFilterMeta_default_instance_; +} // namespace index +} // namespace v1 +} // namespace greptime +PROTOBUF_NAMESPACE_OPEN +template<> ::greptime::v1::index::BloomFilterLoc* Arena::CreateMaybeMessage<::greptime::v1::index::BloomFilterLoc>(Arena*); +template<> ::greptime::v1::index::BloomFilterMeta* Arena::CreateMaybeMessage<::greptime::v1::index::BloomFilterMeta>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace greptime { +namespace v1 { +namespace index { + +// =================================================================== + +class BloomFilterMeta final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.index.BloomFilterMeta) */ { + public: + inline BloomFilterMeta() : BloomFilterMeta(nullptr) {} + ~BloomFilterMeta() override; + explicit PROTOBUF_CONSTEXPR BloomFilterMeta(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BloomFilterMeta(const BloomFilterMeta& from); + BloomFilterMeta(BloomFilterMeta&& from) noexcept + : BloomFilterMeta() { + *this = ::std::move(from); + } + + inline BloomFilterMeta& operator=(const BloomFilterMeta& from) { + CopyFrom(from); + return *this; + } + inline BloomFilterMeta& operator=(BloomFilterMeta&& 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 BloomFilterMeta& default_instance() { + return *internal_default_instance(); + } + static inline const BloomFilterMeta* internal_default_instance() { + return reinterpret_cast( + &_BloomFilterMeta_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(BloomFilterMeta& a, BloomFilterMeta& b) { + a.Swap(&b); + } + inline void Swap(BloomFilterMeta* 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(BloomFilterMeta* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BloomFilterMeta* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BloomFilterMeta& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const BloomFilterMeta& from) { + BloomFilterMeta::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(BloomFilterMeta* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.index.BloomFilterMeta"; + } + protected: + explicit BloomFilterMeta(::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 { + kSegmentLocIndicesFieldNumber = 5, + kBloomFilterLocsFieldNumber = 6, + kRowsPerSegmentFieldNumber = 1, + kSegmentCountFieldNumber = 2, + kRowCountFieldNumber = 3, + kBloomFilterSizeFieldNumber = 4, + }; + // repeated uint64 segment_loc_indices = 5; + int segment_loc_indices_size() const; + private: + int _internal_segment_loc_indices_size() const; + public: + void clear_segment_loc_indices(); + private: + uint64_t _internal_segment_loc_indices(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >& + _internal_segment_loc_indices() const; + void _internal_add_segment_loc_indices(uint64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >* + _internal_mutable_segment_loc_indices(); + public: + uint64_t segment_loc_indices(int index) const; + void set_segment_loc_indices(int index, uint64_t value); + void add_segment_loc_indices(uint64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >& + segment_loc_indices() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >* + mutable_segment_loc_indices(); + + // repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + int bloom_filter_locs_size() const; + private: + int _internal_bloom_filter_locs_size() const; + public: + void clear_bloom_filter_locs(); + ::greptime::v1::index::BloomFilterLoc* mutable_bloom_filter_locs(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::index::BloomFilterLoc >* + mutable_bloom_filter_locs(); + private: + const ::greptime::v1::index::BloomFilterLoc& _internal_bloom_filter_locs(int index) const; + ::greptime::v1::index::BloomFilterLoc* _internal_add_bloom_filter_locs(); + public: + const ::greptime::v1::index::BloomFilterLoc& bloom_filter_locs(int index) const; + ::greptime::v1::index::BloomFilterLoc* add_bloom_filter_locs(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::index::BloomFilterLoc >& + bloom_filter_locs() const; + + // uint64 rows_per_segment = 1; + void clear_rows_per_segment(); + uint64_t rows_per_segment() const; + void set_rows_per_segment(uint64_t value); + private: + uint64_t _internal_rows_per_segment() const; + void _internal_set_rows_per_segment(uint64_t value); + public: + + // uint64 segment_count = 2; + void clear_segment_count(); + uint64_t segment_count() const; + void set_segment_count(uint64_t value); + private: + uint64_t _internal_segment_count() const; + void _internal_set_segment_count(uint64_t value); + public: + + // uint64 row_count = 3; + void clear_row_count(); + uint64_t row_count() const; + void set_row_count(uint64_t value); + private: + uint64_t _internal_row_count() const; + void _internal_set_row_count(uint64_t value); + public: + + // uint64 bloom_filter_size = 4; + void clear_bloom_filter_size(); + uint64_t bloom_filter_size() const; + void set_bloom_filter_size(uint64_t value); + private: + uint64_t _internal_bloom_filter_size() const; + void _internal_set_bloom_filter_size(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.index.BloomFilterMeta) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t > segment_loc_indices_; + mutable std::atomic _segment_loc_indices_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::index::BloomFilterLoc > bloom_filter_locs_; + uint64_t rows_per_segment_; + uint64_t segment_count_; + uint64_t row_count_; + uint64_t bloom_filter_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto; +}; +// ------------------------------------------------------------------- + +class BloomFilterLoc final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.index.BloomFilterLoc) */ { + public: + inline BloomFilterLoc() : BloomFilterLoc(nullptr) {} + ~BloomFilterLoc() override; + explicit PROTOBUF_CONSTEXPR BloomFilterLoc(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BloomFilterLoc(const BloomFilterLoc& from); + BloomFilterLoc(BloomFilterLoc&& from) noexcept + : BloomFilterLoc() { + *this = ::std::move(from); + } + + inline BloomFilterLoc& operator=(const BloomFilterLoc& from) { + CopyFrom(from); + return *this; + } + inline BloomFilterLoc& operator=(BloomFilterLoc&& 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 BloomFilterLoc& default_instance() { + return *internal_default_instance(); + } + static inline const BloomFilterLoc* internal_default_instance() { + return reinterpret_cast( + &_BloomFilterLoc_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(BloomFilterLoc& a, BloomFilterLoc& b) { + a.Swap(&b); + } + inline void Swap(BloomFilterLoc* 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(BloomFilterLoc* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BloomFilterLoc* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BloomFilterLoc& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const BloomFilterLoc& from) { + BloomFilterLoc::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(BloomFilterLoc* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.index.BloomFilterLoc"; + } + protected: + explicit BloomFilterLoc(::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 { + kOffsetFieldNumber = 1, + kSizeFieldNumber = 2, + kElementCountFieldNumber = 3, + }; + // uint64 offset = 1; + void clear_offset(); + uint64_t offset() const; + void set_offset(uint64_t value); + private: + uint64_t _internal_offset() const; + void _internal_set_offset(uint64_t value); + public: + + // uint64 size = 2; + void clear_size(); + uint64_t size() const; + void set_size(uint64_t value); + private: + uint64_t _internal_size() const; + void _internal_set_size(uint64_t value); + public: + + // uint64 element_count = 3; + void clear_element_count(); + uint64_t element_count() const; + void set_element_count(uint64_t value); + private: + uint64_t _internal_element_count() const; + void _internal_set_element_count(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.index.BloomFilterLoc) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + uint64_t offset_; + uint64_t size_; + uint64_t element_count_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// BloomFilterMeta + +// uint64 rows_per_segment = 1; +inline void BloomFilterMeta::clear_rows_per_segment() { + _impl_.rows_per_segment_ = uint64_t{0u}; +} +inline uint64_t BloomFilterMeta::_internal_rows_per_segment() const { + return _impl_.rows_per_segment_; +} +inline uint64_t BloomFilterMeta::rows_per_segment() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.BloomFilterMeta.rows_per_segment) + return _internal_rows_per_segment(); +} +inline void BloomFilterMeta::_internal_set_rows_per_segment(uint64_t value) { + + _impl_.rows_per_segment_ = value; +} +inline void BloomFilterMeta::set_rows_per_segment(uint64_t value) { + _internal_set_rows_per_segment(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.BloomFilterMeta.rows_per_segment) +} + +// uint64 segment_count = 2; +inline void BloomFilterMeta::clear_segment_count() { + _impl_.segment_count_ = uint64_t{0u}; +} +inline uint64_t BloomFilterMeta::_internal_segment_count() const { + return _impl_.segment_count_; +} +inline uint64_t BloomFilterMeta::segment_count() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.BloomFilterMeta.segment_count) + return _internal_segment_count(); +} +inline void BloomFilterMeta::_internal_set_segment_count(uint64_t value) { + + _impl_.segment_count_ = value; +} +inline void BloomFilterMeta::set_segment_count(uint64_t value) { + _internal_set_segment_count(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.BloomFilterMeta.segment_count) +} + +// uint64 row_count = 3; +inline void BloomFilterMeta::clear_row_count() { + _impl_.row_count_ = uint64_t{0u}; +} +inline uint64_t BloomFilterMeta::_internal_row_count() const { + return _impl_.row_count_; +} +inline uint64_t BloomFilterMeta::row_count() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.BloomFilterMeta.row_count) + return _internal_row_count(); +} +inline void BloomFilterMeta::_internal_set_row_count(uint64_t value) { + + _impl_.row_count_ = value; +} +inline void BloomFilterMeta::set_row_count(uint64_t value) { + _internal_set_row_count(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.BloomFilterMeta.row_count) +} + +// uint64 bloom_filter_size = 4; +inline void BloomFilterMeta::clear_bloom_filter_size() { + _impl_.bloom_filter_size_ = uint64_t{0u}; +} +inline uint64_t BloomFilterMeta::_internal_bloom_filter_size() const { + return _impl_.bloom_filter_size_; +} +inline uint64_t BloomFilterMeta::bloom_filter_size() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.BloomFilterMeta.bloom_filter_size) + return _internal_bloom_filter_size(); +} +inline void BloomFilterMeta::_internal_set_bloom_filter_size(uint64_t value) { + + _impl_.bloom_filter_size_ = value; +} +inline void BloomFilterMeta::set_bloom_filter_size(uint64_t value) { + _internal_set_bloom_filter_size(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.BloomFilterMeta.bloom_filter_size) +} + +// repeated uint64 segment_loc_indices = 5; +inline int BloomFilterMeta::_internal_segment_loc_indices_size() const { + return _impl_.segment_loc_indices_.size(); +} +inline int BloomFilterMeta::segment_loc_indices_size() const { + return _internal_segment_loc_indices_size(); +} +inline void BloomFilterMeta::clear_segment_loc_indices() { + _impl_.segment_loc_indices_.Clear(); +} +inline uint64_t BloomFilterMeta::_internal_segment_loc_indices(int index) const { + return _impl_.segment_loc_indices_.Get(index); +} +inline uint64_t BloomFilterMeta::segment_loc_indices(int index) const { + // @@protoc_insertion_point(field_get:greptime.v1.index.BloomFilterMeta.segment_loc_indices) + return _internal_segment_loc_indices(index); +} +inline void BloomFilterMeta::set_segment_loc_indices(int index, uint64_t value) { + _impl_.segment_loc_indices_.Set(index, value); + // @@protoc_insertion_point(field_set:greptime.v1.index.BloomFilterMeta.segment_loc_indices) +} +inline void BloomFilterMeta::_internal_add_segment_loc_indices(uint64_t value) { + _impl_.segment_loc_indices_.Add(value); +} +inline void BloomFilterMeta::add_segment_loc_indices(uint64_t value) { + _internal_add_segment_loc_indices(value); + // @@protoc_insertion_point(field_add:greptime.v1.index.BloomFilterMeta.segment_loc_indices) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >& +BloomFilterMeta::_internal_segment_loc_indices() const { + return _impl_.segment_loc_indices_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >& +BloomFilterMeta::segment_loc_indices() const { + // @@protoc_insertion_point(field_list:greptime.v1.index.BloomFilterMeta.segment_loc_indices) + return _internal_segment_loc_indices(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >* +BloomFilterMeta::_internal_mutable_segment_loc_indices() { + return &_impl_.segment_loc_indices_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >* +BloomFilterMeta::mutable_segment_loc_indices() { + // @@protoc_insertion_point(field_mutable_list:greptime.v1.index.BloomFilterMeta.segment_loc_indices) + return _internal_mutable_segment_loc_indices(); +} + +// repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; +inline int BloomFilterMeta::_internal_bloom_filter_locs_size() const { + return _impl_.bloom_filter_locs_.size(); +} +inline int BloomFilterMeta::bloom_filter_locs_size() const { + return _internal_bloom_filter_locs_size(); +} +inline void BloomFilterMeta::clear_bloom_filter_locs() { + _impl_.bloom_filter_locs_.Clear(); +} +inline ::greptime::v1::index::BloomFilterLoc* BloomFilterMeta::mutable_bloom_filter_locs(int index) { + // @@protoc_insertion_point(field_mutable:greptime.v1.index.BloomFilterMeta.bloom_filter_locs) + return _impl_.bloom_filter_locs_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::index::BloomFilterLoc >* +BloomFilterMeta::mutable_bloom_filter_locs() { + // @@protoc_insertion_point(field_mutable_list:greptime.v1.index.BloomFilterMeta.bloom_filter_locs) + return &_impl_.bloom_filter_locs_; +} +inline const ::greptime::v1::index::BloomFilterLoc& BloomFilterMeta::_internal_bloom_filter_locs(int index) const { + return _impl_.bloom_filter_locs_.Get(index); +} +inline const ::greptime::v1::index::BloomFilterLoc& BloomFilterMeta::bloom_filter_locs(int index) const { + // @@protoc_insertion_point(field_get:greptime.v1.index.BloomFilterMeta.bloom_filter_locs) + return _internal_bloom_filter_locs(index); +} +inline ::greptime::v1::index::BloomFilterLoc* BloomFilterMeta::_internal_add_bloom_filter_locs() { + return _impl_.bloom_filter_locs_.Add(); +} +inline ::greptime::v1::index::BloomFilterLoc* BloomFilterMeta::add_bloom_filter_locs() { + ::greptime::v1::index::BloomFilterLoc* _add = _internal_add_bloom_filter_locs(); + // @@protoc_insertion_point(field_add:greptime.v1.index.BloomFilterMeta.bloom_filter_locs) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::index::BloomFilterLoc >& +BloomFilterMeta::bloom_filter_locs() const { + // @@protoc_insertion_point(field_list:greptime.v1.index.BloomFilterMeta.bloom_filter_locs) + return _impl_.bloom_filter_locs_; +} + +// ------------------------------------------------------------------- + +// BloomFilterLoc + +// uint64 offset = 1; +inline void BloomFilterLoc::clear_offset() { + _impl_.offset_ = uint64_t{0u}; +} +inline uint64_t BloomFilterLoc::_internal_offset() const { + return _impl_.offset_; +} +inline uint64_t BloomFilterLoc::offset() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.BloomFilterLoc.offset) + return _internal_offset(); +} +inline void BloomFilterLoc::_internal_set_offset(uint64_t value) { + + _impl_.offset_ = value; +} +inline void BloomFilterLoc::set_offset(uint64_t value) { + _internal_set_offset(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.BloomFilterLoc.offset) +} + +// uint64 size = 2; +inline void BloomFilterLoc::clear_size() { + _impl_.size_ = uint64_t{0u}; +} +inline uint64_t BloomFilterLoc::_internal_size() const { + return _impl_.size_; +} +inline uint64_t BloomFilterLoc::size() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.BloomFilterLoc.size) + return _internal_size(); +} +inline void BloomFilterLoc::_internal_set_size(uint64_t value) { + + _impl_.size_ = value; +} +inline void BloomFilterLoc::set_size(uint64_t value) { + _internal_set_size(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.BloomFilterLoc.size) +} + +// uint64 element_count = 3; +inline void BloomFilterLoc::clear_element_count() { + _impl_.element_count_ = uint64_t{0u}; +} +inline uint64_t BloomFilterLoc::_internal_element_count() const { + return _impl_.element_count_; +} +inline uint64_t BloomFilterLoc::element_count() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.BloomFilterLoc.element_count) + return _internal_element_count(); +} +inline void BloomFilterLoc::_internal_set_element_count(uint64_t value) { + + _impl_.element_count_ = value; +} +inline void BloomFilterLoc::set_element_count(uint64_t value) { + _internal_set_element_count(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.BloomFilterLoc.element_count) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace index +} // namespace v1 +} // namespace greptime + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto diff --git a/c++/greptime/v1/index/inverted_index.pb.cc b/c++/greptime/v1/index/inverted_index.pb.cc index 4305078f..6c827579 100644 --- a/c++/greptime/v1/index/inverted_index.pb.cc +++ b/c++/greptime/v1/index/inverted_index.pb.cc @@ -167,14 +167,13 @@ const char descriptor_table_protodef_greptime_2fv1_2findex_2finverted_5findex_2e "4\n\005stats\030\010 \001(\0132%.greptime.v1.index.Inver" "tedIndexStats\"f\n\022InvertedIndexStats\022\022\n\nn" "ull_count\030\001 \001(\004\022\026\n\016distinct_count\030\002 \001(\004\022" - "\021\n\tmin_value\030\003 \001(\014\022\021\n\tmax_value\030\004 \001(\014BZ\n" - "\024io.greptime.v1.indexB\005IndexZ;github.com" - "/GreptimeTeam/greptime-proto/go/greptime" - "/v1/indexb\006proto3" + "\021\n\tmin_value\030\003 \001(\014\022\021\n\tmax_value\030\004 \001(\014B=Z" + ";github.com/GreptimeTeam/greptime-proto/" + "go/greptime/v1/indexb\006proto3" ; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto = { - false, false, 737, descriptor_table_protodef_greptime_2fv1_2findex_2finverted_5findex_2eproto, + false, false, 708, descriptor_table_protodef_greptime_2fv1_2findex_2finverted_5findex_2eproto, "greptime/v1/index/inverted_index.proto", &descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_once, nullptr, 0, 4, schemas, file_default_instances, TableStruct_greptime_2fv1_2findex_2finverted_5findex_2eproto::offsets, diff --git a/java/src/main/java/greptime/v1/index/BloomFilter.java b/java/src/main/java/greptime/v1/index/BloomFilter.java new file mode 100644 index 00000000..d3b7f973 --- /dev/null +++ b/java/src/main/java/greptime/v1/index/BloomFilter.java @@ -0,0 +1,2293 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: greptime/v1/index/bloom_filter.proto + +package greptime.v1.index; + +public final class BloomFilter { + private BloomFilter() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface BloomFilterMetaOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.index.BloomFilterMeta) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The number of rows per segment.
+     * 
+ * + * uint64 rows_per_segment = 1; + * @return The rowsPerSegment. + */ + long getRowsPerSegment(); + + /** + *
+     * The number of segments.
+     * 
+ * + * uint64 segment_count = 2; + * @return The segmentCount. + */ + long getSegmentCount(); + + /** + *
+     * The number of total rows.
+     * 
+ * + * uint64 row_count = 3; + * @return The rowCount. + */ + long getRowCount(); + + /** + *
+     * The size of the bloom filter in bytes excluding the metadata.
+     * 
+ * + * uint64 bloom_filter_size = 4; + * @return The bloomFilterSize. + */ + long getBloomFilterSize(); + + /** + *
+     * The indices to the bloom filter location of each segment.
+     * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @return A list containing the segmentLocIndices. + */ + java.util.List getSegmentLocIndicesList(); + /** + *
+     * The indices to the bloom filter location of each segment.
+     * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @return The count of segmentLocIndices. + */ + int getSegmentLocIndicesCount(); + /** + *
+     * The indices to the bloom filter location of each segment.
+     * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @param index The index of the element to return. + * @return The segmentLocIndices at the given index. + */ + long getSegmentLocIndices(int index); + + /** + *
+     * The bloom filter locations.
+     * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + java.util.List + getBloomFilterLocsList(); + /** + *
+     * The bloom filter locations.
+     * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + greptime.v1.index.BloomFilter.BloomFilterLoc getBloomFilterLocs(int index); + /** + *
+     * The bloom filter locations.
+     * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + int getBloomFilterLocsCount(); + /** + *
+     * The bloom filter locations.
+     * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + java.util.List + getBloomFilterLocsOrBuilderList(); + /** + *
+     * The bloom filter locations.
+     * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + greptime.v1.index.BloomFilter.BloomFilterLocOrBuilder getBloomFilterLocsOrBuilder( + int index); + } + /** + *
+   * BloomFilterMeta defines the metadata for a bloom filter.
+   * 
+ * + * Protobuf type {@code greptime.v1.index.BloomFilterMeta} + */ + public static final class BloomFilterMeta extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.index.BloomFilterMeta) + BloomFilterMetaOrBuilder { + private static final long serialVersionUID = 0L; + // Use BloomFilterMeta.newBuilder() to construct. + private BloomFilterMeta(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BloomFilterMeta() { + segmentLocIndices_ = emptyLongList(); + bloomFilterLocs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BloomFilterMeta(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BloomFilterMeta( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + rowsPerSegment_ = input.readUInt64(); + break; + } + case 16: { + + segmentCount_ = input.readUInt64(); + break; + } + case 24: { + + rowCount_ = input.readUInt64(); + break; + } + case 32: { + + bloomFilterSize_ = input.readUInt64(); + break; + } + case 40: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + segmentLocIndices_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + segmentLocIndices_.addLong(input.readUInt64()); + break; + } + case 42: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + segmentLocIndices_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + segmentLocIndices_.addLong(input.readUInt64()); + } + input.popLimit(limit); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + bloomFilterLocs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + bloomFilterLocs_.add( + input.readMessage(greptime.v1.index.BloomFilter.BloomFilterLoc.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + segmentLocIndices_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + bloomFilterLocs_ = java.util.Collections.unmodifiableList(bloomFilterLocs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.index.BloomFilter.internal_static_greptime_v1_index_BloomFilterMeta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.index.BloomFilter.internal_static_greptime_v1_index_BloomFilterMeta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.index.BloomFilter.BloomFilterMeta.class, greptime.v1.index.BloomFilter.BloomFilterMeta.Builder.class); + } + + public static final int ROWS_PER_SEGMENT_FIELD_NUMBER = 1; + private long rowsPerSegment_; + /** + *
+     * The number of rows per segment.
+     * 
+ * + * uint64 rows_per_segment = 1; + * @return The rowsPerSegment. + */ + @java.lang.Override + public long getRowsPerSegment() { + return rowsPerSegment_; + } + + public static final int SEGMENT_COUNT_FIELD_NUMBER = 2; + private long segmentCount_; + /** + *
+     * The number of segments.
+     * 
+ * + * uint64 segment_count = 2; + * @return The segmentCount. + */ + @java.lang.Override + public long getSegmentCount() { + return segmentCount_; + } + + public static final int ROW_COUNT_FIELD_NUMBER = 3; + private long rowCount_; + /** + *
+     * The number of total rows.
+     * 
+ * + * uint64 row_count = 3; + * @return The rowCount. + */ + @java.lang.Override + public long getRowCount() { + return rowCount_; + } + + public static final int BLOOM_FILTER_SIZE_FIELD_NUMBER = 4; + private long bloomFilterSize_; + /** + *
+     * The size of the bloom filter in bytes excluding the metadata.
+     * 
+ * + * uint64 bloom_filter_size = 4; + * @return The bloomFilterSize. + */ + @java.lang.Override + public long getBloomFilterSize() { + return bloomFilterSize_; + } + + public static final int SEGMENT_LOC_INDICES_FIELD_NUMBER = 5; + private com.google.protobuf.Internal.LongList segmentLocIndices_; + /** + *
+     * The indices to the bloom filter location of each segment.
+     * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @return A list containing the segmentLocIndices. + */ + @java.lang.Override + public java.util.List + getSegmentLocIndicesList() { + return segmentLocIndices_; + } + /** + *
+     * The indices to the bloom filter location of each segment.
+     * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @return The count of segmentLocIndices. + */ + public int getSegmentLocIndicesCount() { + return segmentLocIndices_.size(); + } + /** + *
+     * The indices to the bloom filter location of each segment.
+     * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @param index The index of the element to return. + * @return The segmentLocIndices at the given index. + */ + public long getSegmentLocIndices(int index) { + return segmentLocIndices_.getLong(index); + } + private int segmentLocIndicesMemoizedSerializedSize = -1; + + public static final int BLOOM_FILTER_LOCS_FIELD_NUMBER = 6; + private java.util.List bloomFilterLocs_; + /** + *
+     * The bloom filter locations.
+     * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + @java.lang.Override + public java.util.List getBloomFilterLocsList() { + return bloomFilterLocs_; + } + /** + *
+     * The bloom filter locations.
+     * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + @java.lang.Override + public java.util.List + getBloomFilterLocsOrBuilderList() { + return bloomFilterLocs_; + } + /** + *
+     * The bloom filter locations.
+     * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + @java.lang.Override + public int getBloomFilterLocsCount() { + return bloomFilterLocs_.size(); + } + /** + *
+     * The bloom filter locations.
+     * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + @java.lang.Override + public greptime.v1.index.BloomFilter.BloomFilterLoc getBloomFilterLocs(int index) { + return bloomFilterLocs_.get(index); + } + /** + *
+     * The bloom filter locations.
+     * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + @java.lang.Override + public greptime.v1.index.BloomFilter.BloomFilterLocOrBuilder getBloomFilterLocsOrBuilder( + int index) { + return bloomFilterLocs_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (rowsPerSegment_ != 0L) { + output.writeUInt64(1, rowsPerSegment_); + } + if (segmentCount_ != 0L) { + output.writeUInt64(2, segmentCount_); + } + if (rowCount_ != 0L) { + output.writeUInt64(3, rowCount_); + } + if (bloomFilterSize_ != 0L) { + output.writeUInt64(4, bloomFilterSize_); + } + if (getSegmentLocIndicesList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(segmentLocIndicesMemoizedSerializedSize); + } + for (int i = 0; i < segmentLocIndices_.size(); i++) { + output.writeUInt64NoTag(segmentLocIndices_.getLong(i)); + } + for (int i = 0; i < bloomFilterLocs_.size(); i++) { + output.writeMessage(6, bloomFilterLocs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rowsPerSegment_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, rowsPerSegment_); + } + if (segmentCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, segmentCount_); + } + if (rowCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, rowCount_); + } + if (bloomFilterSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, bloomFilterSize_); + } + { + int dataSize = 0; + for (int i = 0; i < segmentLocIndices_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt64SizeNoTag(segmentLocIndices_.getLong(i)); + } + size += dataSize; + if (!getSegmentLocIndicesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + segmentLocIndicesMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < bloomFilterLocs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, bloomFilterLocs_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof greptime.v1.index.BloomFilter.BloomFilterMeta)) { + return super.equals(obj); + } + greptime.v1.index.BloomFilter.BloomFilterMeta other = (greptime.v1.index.BloomFilter.BloomFilterMeta) obj; + + if (getRowsPerSegment() + != other.getRowsPerSegment()) return false; + if (getSegmentCount() + != other.getSegmentCount()) return false; + if (getRowCount() + != other.getRowCount()) return false; + if (getBloomFilterSize() + != other.getBloomFilterSize()) return false; + if (!getSegmentLocIndicesList() + .equals(other.getSegmentLocIndicesList())) return false; + if (!getBloomFilterLocsList() + .equals(other.getBloomFilterLocsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ROWS_PER_SEGMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRowsPerSegment()); + hash = (37 * hash) + SEGMENT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSegmentCount()); + hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRowCount()); + hash = (37 * hash) + BLOOM_FILTER_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBloomFilterSize()); + if (getSegmentLocIndicesCount() > 0) { + hash = (37 * hash) + SEGMENT_LOC_INDICES_FIELD_NUMBER; + hash = (53 * hash) + getSegmentLocIndicesList().hashCode(); + } + if (getBloomFilterLocsCount() > 0) { + hash = (37 * hash) + BLOOM_FILTER_LOCS_FIELD_NUMBER; + hash = (53 * hash) + getBloomFilterLocsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.index.BloomFilter.BloomFilterMeta parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(greptime.v1.index.BloomFilter.BloomFilterMeta prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * BloomFilterMeta defines the metadata for a bloom filter.
+     * 
+ * + * Protobuf type {@code greptime.v1.index.BloomFilterMeta} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.index.BloomFilterMeta) + greptime.v1.index.BloomFilter.BloomFilterMetaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.index.BloomFilter.internal_static_greptime_v1_index_BloomFilterMeta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.index.BloomFilter.internal_static_greptime_v1_index_BloomFilterMeta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.index.BloomFilter.BloomFilterMeta.class, greptime.v1.index.BloomFilter.BloomFilterMeta.Builder.class); + } + + // Construct using greptime.v1.index.BloomFilter.BloomFilterMeta.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBloomFilterLocsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + rowsPerSegment_ = 0L; + + segmentCount_ = 0L; + + rowCount_ = 0L; + + bloomFilterSize_ = 0L; + + segmentLocIndices_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (bloomFilterLocsBuilder_ == null) { + bloomFilterLocs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + bloomFilterLocsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return greptime.v1.index.BloomFilter.internal_static_greptime_v1_index_BloomFilterMeta_descriptor; + } + + @java.lang.Override + public greptime.v1.index.BloomFilter.BloomFilterMeta getDefaultInstanceForType() { + return greptime.v1.index.BloomFilter.BloomFilterMeta.getDefaultInstance(); + } + + @java.lang.Override + public greptime.v1.index.BloomFilter.BloomFilterMeta build() { + greptime.v1.index.BloomFilter.BloomFilterMeta result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public greptime.v1.index.BloomFilter.BloomFilterMeta buildPartial() { + greptime.v1.index.BloomFilter.BloomFilterMeta result = new greptime.v1.index.BloomFilter.BloomFilterMeta(this); + int from_bitField0_ = bitField0_; + result.rowsPerSegment_ = rowsPerSegment_; + result.segmentCount_ = segmentCount_; + result.rowCount_ = rowCount_; + result.bloomFilterSize_ = bloomFilterSize_; + if (((bitField0_ & 0x00000001) != 0)) { + segmentLocIndices_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.segmentLocIndices_ = segmentLocIndices_; + if (bloomFilterLocsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + bloomFilterLocs_ = java.util.Collections.unmodifiableList(bloomFilterLocs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.bloomFilterLocs_ = bloomFilterLocs_; + } else { + result.bloomFilterLocs_ = bloomFilterLocsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof greptime.v1.index.BloomFilter.BloomFilterMeta) { + return mergeFrom((greptime.v1.index.BloomFilter.BloomFilterMeta)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(greptime.v1.index.BloomFilter.BloomFilterMeta other) { + if (other == greptime.v1.index.BloomFilter.BloomFilterMeta.getDefaultInstance()) return this; + if (other.getRowsPerSegment() != 0L) { + setRowsPerSegment(other.getRowsPerSegment()); + } + if (other.getSegmentCount() != 0L) { + setSegmentCount(other.getSegmentCount()); + } + if (other.getRowCount() != 0L) { + setRowCount(other.getRowCount()); + } + if (other.getBloomFilterSize() != 0L) { + setBloomFilterSize(other.getBloomFilterSize()); + } + if (!other.segmentLocIndices_.isEmpty()) { + if (segmentLocIndices_.isEmpty()) { + segmentLocIndices_ = other.segmentLocIndices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSegmentLocIndicesIsMutable(); + segmentLocIndices_.addAll(other.segmentLocIndices_); + } + onChanged(); + } + if (bloomFilterLocsBuilder_ == null) { + if (!other.bloomFilterLocs_.isEmpty()) { + if (bloomFilterLocs_.isEmpty()) { + bloomFilterLocs_ = other.bloomFilterLocs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureBloomFilterLocsIsMutable(); + bloomFilterLocs_.addAll(other.bloomFilterLocs_); + } + onChanged(); + } + } else { + if (!other.bloomFilterLocs_.isEmpty()) { + if (bloomFilterLocsBuilder_.isEmpty()) { + bloomFilterLocsBuilder_.dispose(); + bloomFilterLocsBuilder_ = null; + bloomFilterLocs_ = other.bloomFilterLocs_; + bitField0_ = (bitField0_ & ~0x00000002); + bloomFilterLocsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBloomFilterLocsFieldBuilder() : null; + } else { + bloomFilterLocsBuilder_.addAllMessages(other.bloomFilterLocs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + greptime.v1.index.BloomFilter.BloomFilterMeta parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (greptime.v1.index.BloomFilter.BloomFilterMeta) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long rowsPerSegment_ ; + /** + *
+       * The number of rows per segment.
+       * 
+ * + * uint64 rows_per_segment = 1; + * @return The rowsPerSegment. + */ + @java.lang.Override + public long getRowsPerSegment() { + return rowsPerSegment_; + } + /** + *
+       * The number of rows per segment.
+       * 
+ * + * uint64 rows_per_segment = 1; + * @param value The rowsPerSegment to set. + * @return This builder for chaining. + */ + public Builder setRowsPerSegment(long value) { + + rowsPerSegment_ = value; + onChanged(); + return this; + } + /** + *
+       * The number of rows per segment.
+       * 
+ * + * uint64 rows_per_segment = 1; + * @return This builder for chaining. + */ + public Builder clearRowsPerSegment() { + + rowsPerSegment_ = 0L; + onChanged(); + return this; + } + + private long segmentCount_ ; + /** + *
+       * The number of segments.
+       * 
+ * + * uint64 segment_count = 2; + * @return The segmentCount. + */ + @java.lang.Override + public long getSegmentCount() { + return segmentCount_; + } + /** + *
+       * The number of segments.
+       * 
+ * + * uint64 segment_count = 2; + * @param value The segmentCount to set. + * @return This builder for chaining. + */ + public Builder setSegmentCount(long value) { + + segmentCount_ = value; + onChanged(); + return this; + } + /** + *
+       * The number of segments.
+       * 
+ * + * uint64 segment_count = 2; + * @return This builder for chaining. + */ + public Builder clearSegmentCount() { + + segmentCount_ = 0L; + onChanged(); + return this; + } + + private long rowCount_ ; + /** + *
+       * The number of total rows.
+       * 
+ * + * uint64 row_count = 3; + * @return The rowCount. + */ + @java.lang.Override + public long getRowCount() { + return rowCount_; + } + /** + *
+       * The number of total rows.
+       * 
+ * + * uint64 row_count = 3; + * @param value The rowCount to set. + * @return This builder for chaining. + */ + public Builder setRowCount(long value) { + + rowCount_ = value; + onChanged(); + return this; + } + /** + *
+       * The number of total rows.
+       * 
+ * + * uint64 row_count = 3; + * @return This builder for chaining. + */ + public Builder clearRowCount() { + + rowCount_ = 0L; + onChanged(); + return this; + } + + private long bloomFilterSize_ ; + /** + *
+       * The size of the bloom filter in bytes excluding the metadata.
+       * 
+ * + * uint64 bloom_filter_size = 4; + * @return The bloomFilterSize. + */ + @java.lang.Override + public long getBloomFilterSize() { + return bloomFilterSize_; + } + /** + *
+       * The size of the bloom filter in bytes excluding the metadata.
+       * 
+ * + * uint64 bloom_filter_size = 4; + * @param value The bloomFilterSize to set. + * @return This builder for chaining. + */ + public Builder setBloomFilterSize(long value) { + + bloomFilterSize_ = value; + onChanged(); + return this; + } + /** + *
+       * The size of the bloom filter in bytes excluding the metadata.
+       * 
+ * + * uint64 bloom_filter_size = 4; + * @return This builder for chaining. + */ + public Builder clearBloomFilterSize() { + + bloomFilterSize_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList segmentLocIndices_ = emptyLongList(); + private void ensureSegmentLocIndicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + segmentLocIndices_ = mutableCopy(segmentLocIndices_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * The indices to the bloom filter location of each segment.
+       * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @return A list containing the segmentLocIndices. + */ + public java.util.List + getSegmentLocIndicesList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(segmentLocIndices_) : segmentLocIndices_; + } + /** + *
+       * The indices to the bloom filter location of each segment.
+       * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @return The count of segmentLocIndices. + */ + public int getSegmentLocIndicesCount() { + return segmentLocIndices_.size(); + } + /** + *
+       * The indices to the bloom filter location of each segment.
+       * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @param index The index of the element to return. + * @return The segmentLocIndices at the given index. + */ + public long getSegmentLocIndices(int index) { + return segmentLocIndices_.getLong(index); + } + /** + *
+       * The indices to the bloom filter location of each segment.
+       * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @param index The index to set the value at. + * @param value The segmentLocIndices to set. + * @return This builder for chaining. + */ + public Builder setSegmentLocIndices( + int index, long value) { + ensureSegmentLocIndicesIsMutable(); + segmentLocIndices_.setLong(index, value); + onChanged(); + return this; + } + /** + *
+       * The indices to the bloom filter location of each segment.
+       * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @param value The segmentLocIndices to add. + * @return This builder for chaining. + */ + public Builder addSegmentLocIndices(long value) { + ensureSegmentLocIndicesIsMutable(); + segmentLocIndices_.addLong(value); + onChanged(); + return this; + } + /** + *
+       * The indices to the bloom filter location of each segment.
+       * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @param values The segmentLocIndices to add. + * @return This builder for chaining. + */ + public Builder addAllSegmentLocIndices( + java.lang.Iterable values) { + ensureSegmentLocIndicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, segmentLocIndices_); + onChanged(); + return this; + } + /** + *
+       * The indices to the bloom filter location of each segment.
+       * 
+ * + * repeated uint64 segment_loc_indices = 5; + * @return This builder for chaining. + */ + public Builder clearSegmentLocIndices() { + segmentLocIndices_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private java.util.List bloomFilterLocs_ = + java.util.Collections.emptyList(); + private void ensureBloomFilterLocsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + bloomFilterLocs_ = new java.util.ArrayList(bloomFilterLocs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + greptime.v1.index.BloomFilter.BloomFilterLoc, greptime.v1.index.BloomFilter.BloomFilterLoc.Builder, greptime.v1.index.BloomFilter.BloomFilterLocOrBuilder> bloomFilterLocsBuilder_; + + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public java.util.List getBloomFilterLocsList() { + if (bloomFilterLocsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bloomFilterLocs_); + } else { + return bloomFilterLocsBuilder_.getMessageList(); + } + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public int getBloomFilterLocsCount() { + if (bloomFilterLocsBuilder_ == null) { + return bloomFilterLocs_.size(); + } else { + return bloomFilterLocsBuilder_.getCount(); + } + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public greptime.v1.index.BloomFilter.BloomFilterLoc getBloomFilterLocs(int index) { + if (bloomFilterLocsBuilder_ == null) { + return bloomFilterLocs_.get(index); + } else { + return bloomFilterLocsBuilder_.getMessage(index); + } + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public Builder setBloomFilterLocs( + int index, greptime.v1.index.BloomFilter.BloomFilterLoc value) { + if (bloomFilterLocsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBloomFilterLocsIsMutable(); + bloomFilterLocs_.set(index, value); + onChanged(); + } else { + bloomFilterLocsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public Builder setBloomFilterLocs( + int index, greptime.v1.index.BloomFilter.BloomFilterLoc.Builder builderForValue) { + if (bloomFilterLocsBuilder_ == null) { + ensureBloomFilterLocsIsMutable(); + bloomFilterLocs_.set(index, builderForValue.build()); + onChanged(); + } else { + bloomFilterLocsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public Builder addBloomFilterLocs(greptime.v1.index.BloomFilter.BloomFilterLoc value) { + if (bloomFilterLocsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBloomFilterLocsIsMutable(); + bloomFilterLocs_.add(value); + onChanged(); + } else { + bloomFilterLocsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public Builder addBloomFilterLocs( + int index, greptime.v1.index.BloomFilter.BloomFilterLoc value) { + if (bloomFilterLocsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBloomFilterLocsIsMutable(); + bloomFilterLocs_.add(index, value); + onChanged(); + } else { + bloomFilterLocsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public Builder addBloomFilterLocs( + greptime.v1.index.BloomFilter.BloomFilterLoc.Builder builderForValue) { + if (bloomFilterLocsBuilder_ == null) { + ensureBloomFilterLocsIsMutable(); + bloomFilterLocs_.add(builderForValue.build()); + onChanged(); + } else { + bloomFilterLocsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public Builder addBloomFilterLocs( + int index, greptime.v1.index.BloomFilter.BloomFilterLoc.Builder builderForValue) { + if (bloomFilterLocsBuilder_ == null) { + ensureBloomFilterLocsIsMutable(); + bloomFilterLocs_.add(index, builderForValue.build()); + onChanged(); + } else { + bloomFilterLocsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public Builder addAllBloomFilterLocs( + java.lang.Iterable values) { + if (bloomFilterLocsBuilder_ == null) { + ensureBloomFilterLocsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bloomFilterLocs_); + onChanged(); + } else { + bloomFilterLocsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public Builder clearBloomFilterLocs() { + if (bloomFilterLocsBuilder_ == null) { + bloomFilterLocs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + bloomFilterLocsBuilder_.clear(); + } + return this; + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public Builder removeBloomFilterLocs(int index) { + if (bloomFilterLocsBuilder_ == null) { + ensureBloomFilterLocsIsMutable(); + bloomFilterLocs_.remove(index); + onChanged(); + } else { + bloomFilterLocsBuilder_.remove(index); + } + return this; + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public greptime.v1.index.BloomFilter.BloomFilterLoc.Builder getBloomFilterLocsBuilder( + int index) { + return getBloomFilterLocsFieldBuilder().getBuilder(index); + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public greptime.v1.index.BloomFilter.BloomFilterLocOrBuilder getBloomFilterLocsOrBuilder( + int index) { + if (bloomFilterLocsBuilder_ == null) { + return bloomFilterLocs_.get(index); } else { + return bloomFilterLocsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public java.util.List + getBloomFilterLocsOrBuilderList() { + if (bloomFilterLocsBuilder_ != null) { + return bloomFilterLocsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bloomFilterLocs_); + } + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public greptime.v1.index.BloomFilter.BloomFilterLoc.Builder addBloomFilterLocsBuilder() { + return getBloomFilterLocsFieldBuilder().addBuilder( + greptime.v1.index.BloomFilter.BloomFilterLoc.getDefaultInstance()); + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public greptime.v1.index.BloomFilter.BloomFilterLoc.Builder addBloomFilterLocsBuilder( + int index) { + return getBloomFilterLocsFieldBuilder().addBuilder( + index, greptime.v1.index.BloomFilter.BloomFilterLoc.getDefaultInstance()); + } + /** + *
+       * The bloom filter locations.
+       * 
+ * + * repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6; + */ + public java.util.List + getBloomFilterLocsBuilderList() { + return getBloomFilterLocsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + greptime.v1.index.BloomFilter.BloomFilterLoc, greptime.v1.index.BloomFilter.BloomFilterLoc.Builder, greptime.v1.index.BloomFilter.BloomFilterLocOrBuilder> + getBloomFilterLocsFieldBuilder() { + if (bloomFilterLocsBuilder_ == null) { + bloomFilterLocsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + greptime.v1.index.BloomFilter.BloomFilterLoc, greptime.v1.index.BloomFilter.BloomFilterLoc.Builder, greptime.v1.index.BloomFilter.BloomFilterLocOrBuilder>( + bloomFilterLocs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + bloomFilterLocs_ = null; + } + return bloomFilterLocsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.index.BloomFilterMeta) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.index.BloomFilterMeta) + private static final greptime.v1.index.BloomFilter.BloomFilterMeta DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new greptime.v1.index.BloomFilter.BloomFilterMeta(); + } + + public static greptime.v1.index.BloomFilter.BloomFilterMeta getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BloomFilterMeta parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BloomFilterMeta(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public greptime.v1.index.BloomFilter.BloomFilterMeta getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BloomFilterLocOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.index.BloomFilterLoc) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The byte offset of the bloom filter data.
+     * 
+ * + * uint64 offset = 1; + * @return The offset. + */ + long getOffset(); + + /** + *
+     * The size of the bloom filter data.
+     * 
+ * + * uint64 size = 2; + * @return The size. + */ + long getSize(); + + /** + *
+     * The number of elements in the bloom filter.
+     * 
+ * + * uint64 element_count = 3; + * @return The elementCount. + */ + long getElementCount(); + } + /** + *
+   * BloomFilterLoc defines the location of a bloom filter.
+   * 
+ * + * Protobuf type {@code greptime.v1.index.BloomFilterLoc} + */ + public static final class BloomFilterLoc extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.index.BloomFilterLoc) + BloomFilterLocOrBuilder { + private static final long serialVersionUID = 0L; + // Use BloomFilterLoc.newBuilder() to construct. + private BloomFilterLoc(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BloomFilterLoc() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BloomFilterLoc(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BloomFilterLoc( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + offset_ = input.readUInt64(); + break; + } + case 16: { + + size_ = input.readUInt64(); + break; + } + case 24: { + + elementCount_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.index.BloomFilter.internal_static_greptime_v1_index_BloomFilterLoc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.index.BloomFilter.internal_static_greptime_v1_index_BloomFilterLoc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.index.BloomFilter.BloomFilterLoc.class, greptime.v1.index.BloomFilter.BloomFilterLoc.Builder.class); + } + + public static final int OFFSET_FIELD_NUMBER = 1; + private long offset_; + /** + *
+     * The byte offset of the bloom filter data.
+     * 
+ * + * uint64 offset = 1; + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + public static final int SIZE_FIELD_NUMBER = 2; + private long size_; + /** + *
+     * The size of the bloom filter data.
+     * 
+ * + * uint64 size = 2; + * @return The size. + */ + @java.lang.Override + public long getSize() { + return size_; + } + + public static final int ELEMENT_COUNT_FIELD_NUMBER = 3; + private long elementCount_; + /** + *
+     * The number of elements in the bloom filter.
+     * 
+ * + * uint64 element_count = 3; + * @return The elementCount. + */ + @java.lang.Override + public long getElementCount() { + return elementCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (offset_ != 0L) { + output.writeUInt64(1, offset_); + } + if (size_ != 0L) { + output.writeUInt64(2, size_); + } + if (elementCount_ != 0L) { + output.writeUInt64(3, elementCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (offset_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, offset_); + } + if (size_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, size_); + } + if (elementCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, elementCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof greptime.v1.index.BloomFilter.BloomFilterLoc)) { + return super.equals(obj); + } + greptime.v1.index.BloomFilter.BloomFilterLoc other = (greptime.v1.index.BloomFilter.BloomFilterLoc) obj; + + if (getOffset() + != other.getOffset()) return false; + if (getSize() + != other.getSize()) return false; + if (getElementCount() + != other.getElementCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOffset()); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSize()); + hash = (37 * hash) + ELEMENT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getElementCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.index.BloomFilter.BloomFilterLoc parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(greptime.v1.index.BloomFilter.BloomFilterLoc prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * BloomFilterLoc defines the location of a bloom filter.
+     * 
+ * + * Protobuf type {@code greptime.v1.index.BloomFilterLoc} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.index.BloomFilterLoc) + greptime.v1.index.BloomFilter.BloomFilterLocOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.index.BloomFilter.internal_static_greptime_v1_index_BloomFilterLoc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.index.BloomFilter.internal_static_greptime_v1_index_BloomFilterLoc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.index.BloomFilter.BloomFilterLoc.class, greptime.v1.index.BloomFilter.BloomFilterLoc.Builder.class); + } + + // Construct using greptime.v1.index.BloomFilter.BloomFilterLoc.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + offset_ = 0L; + + size_ = 0L; + + elementCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return greptime.v1.index.BloomFilter.internal_static_greptime_v1_index_BloomFilterLoc_descriptor; + } + + @java.lang.Override + public greptime.v1.index.BloomFilter.BloomFilterLoc getDefaultInstanceForType() { + return greptime.v1.index.BloomFilter.BloomFilterLoc.getDefaultInstance(); + } + + @java.lang.Override + public greptime.v1.index.BloomFilter.BloomFilterLoc build() { + greptime.v1.index.BloomFilter.BloomFilterLoc result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public greptime.v1.index.BloomFilter.BloomFilterLoc buildPartial() { + greptime.v1.index.BloomFilter.BloomFilterLoc result = new greptime.v1.index.BloomFilter.BloomFilterLoc(this); + result.offset_ = offset_; + result.size_ = size_; + result.elementCount_ = elementCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof greptime.v1.index.BloomFilter.BloomFilterLoc) { + return mergeFrom((greptime.v1.index.BloomFilter.BloomFilterLoc)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(greptime.v1.index.BloomFilter.BloomFilterLoc other) { + if (other == greptime.v1.index.BloomFilter.BloomFilterLoc.getDefaultInstance()) return this; + if (other.getOffset() != 0L) { + setOffset(other.getOffset()); + } + if (other.getSize() != 0L) { + setSize(other.getSize()); + } + if (other.getElementCount() != 0L) { + setElementCount(other.getElementCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + greptime.v1.index.BloomFilter.BloomFilterLoc parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (greptime.v1.index.BloomFilter.BloomFilterLoc) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long offset_ ; + /** + *
+       * The byte offset of the bloom filter data.
+       * 
+ * + * uint64 offset = 1; + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + /** + *
+       * The byte offset of the bloom filter data.
+       * 
+ * + * uint64 offset = 1; + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(long value) { + + offset_ = value; + onChanged(); + return this; + } + /** + *
+       * The byte offset of the bloom filter data.
+       * 
+ * + * uint64 offset = 1; + * @return This builder for chaining. + */ + public Builder clearOffset() { + + offset_ = 0L; + onChanged(); + return this; + } + + private long size_ ; + /** + *
+       * The size of the bloom filter data.
+       * 
+ * + * uint64 size = 2; + * @return The size. + */ + @java.lang.Override + public long getSize() { + return size_; + } + /** + *
+       * The size of the bloom filter data.
+       * 
+ * + * uint64 size = 2; + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(long value) { + + size_ = value; + onChanged(); + return this; + } + /** + *
+       * The size of the bloom filter data.
+       * 
+ * + * uint64 size = 2; + * @return This builder for chaining. + */ + public Builder clearSize() { + + size_ = 0L; + onChanged(); + return this; + } + + private long elementCount_ ; + /** + *
+       * The number of elements in the bloom filter.
+       * 
+ * + * uint64 element_count = 3; + * @return The elementCount. + */ + @java.lang.Override + public long getElementCount() { + return elementCount_; + } + /** + *
+       * The number of elements in the bloom filter.
+       * 
+ * + * uint64 element_count = 3; + * @param value The elementCount to set. + * @return This builder for chaining. + */ + public Builder setElementCount(long value) { + + elementCount_ = value; + onChanged(); + return this; + } + /** + *
+       * The number of elements in the bloom filter.
+       * 
+ * + * uint64 element_count = 3; + * @return This builder for chaining. + */ + public Builder clearElementCount() { + + elementCount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.index.BloomFilterLoc) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.index.BloomFilterLoc) + private static final greptime.v1.index.BloomFilter.BloomFilterLoc DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new greptime.v1.index.BloomFilter.BloomFilterLoc(); + } + + public static greptime.v1.index.BloomFilter.BloomFilterLoc getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BloomFilterLoc parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BloomFilterLoc(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public greptime.v1.index.BloomFilter.BloomFilterLoc getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_index_BloomFilterMeta_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_index_BloomFilterMeta_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_index_BloomFilterLoc_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_index_BloomFilterLoc_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n$greptime/v1/index/bloom_filter.proto\022\021" + + "greptime.v1.index\"\313\001\n\017BloomFilterMeta\022\030\n" + + "\020rows_per_segment\030\001 \001(\004\022\025\n\rsegment_count" + + "\030\002 \001(\004\022\021\n\trow_count\030\003 \001(\004\022\031\n\021bloom_filte" + + "r_size\030\004 \001(\004\022\033\n\023segment_loc_indices\030\005 \003(" + + "\004\022<\n\021bloom_filter_locs\030\006 \003(\0132!.greptime." + + "v1.index.BloomFilterLoc\"E\n\016BloomFilterLo" + + "c\022\016\n\006offset\030\001 \001(\004\022\014\n\004size\030\002 \001(\004\022\025\n\releme" + + "nt_count\030\003 \001(\004B=Z;github.com/GreptimeTea" + + "m/greptime-proto/go/greptime/v1/indexb\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_greptime_v1_index_BloomFilterMeta_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_greptime_v1_index_BloomFilterMeta_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_index_BloomFilterMeta_descriptor, + new java.lang.String[] { "RowsPerSegment", "SegmentCount", "RowCount", "BloomFilterSize", "SegmentLocIndices", "BloomFilterLocs", }); + internal_static_greptime_v1_index_BloomFilterLoc_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_greptime_v1_index_BloomFilterLoc_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_index_BloomFilterLoc_descriptor, + new java.lang.String[] { "Offset", "Size", "ElementCount", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java/src/main/java/greptime/v1/index/InvertedIndex.java b/java/src/main/java/greptime/v1/index/InvertedIndex.java new file mode 100644 index 00000000..ee54abbb --- /dev/null +++ b/java/src/main/java/greptime/v1/index/InvertedIndex.java @@ -0,0 +1,3360 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: greptime/v1/index/inverted_index.proto + +package greptime.v1.index; + +public final class InvertedIndex { + private InvertedIndex() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface InvertedIndexMetasOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.index.InvertedIndexMetas) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the inverted index blob.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + int getMetasCount(); + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the inverted index blob.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + boolean containsMetas( + java.lang.String key); + /** + * Use {@link #getMetasMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMetas(); + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the inverted index blob.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + java.util.Map + getMetasMap(); + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the inverted index blob.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + /* nullable */ +greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrDefault( + java.lang.String key, + /* nullable */ +greptime.v1.index.InvertedIndex.InvertedIndexMeta defaultValue); + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the inverted index blob.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrThrow( + java.lang.String key); + + /** + *
+     * The total count of rows within the inverted index blob.
+     * This is used to determine the number of segments within the bitmap.
+     * 
+ * + * uint64 total_row_count = 2; + * @return The totalRowCount. + */ + long getTotalRowCount(); + + /** + *
+     * The number of rows per group for bitmap indexing which determines how rows are
+     * batched for indexing. Each batch corresponds to a segment in the bitmap and allows
+     * for efficient retrieval during queries by reducing the search space.
+     * 
+ * + * uint64 segment_row_count = 3; + * @return The segmentRowCount. + */ + long getSegmentRowCount(); + } + /** + *
+   * InvertedIndexMetas defines the metadata for an inverted index
+   * within an inverted index blob.
+   * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexMetas} + */ + public static final class InvertedIndexMetas extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.index.InvertedIndexMetas) + InvertedIndexMetasOrBuilder { + private static final long serialVersionUID = 0L; + // Use InvertedIndexMetas.newBuilder() to construct. + private InvertedIndexMetas(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InvertedIndexMetas() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InvertedIndexMetas(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InvertedIndexMetas( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + metas_ = com.google.protobuf.MapField.newMapField( + MetasDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + metas__ = input.readMessage( + MetasDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + metas_.getMutableMap().put( + metas__.getKey(), metas__.getValue()); + break; + } + case 16: { + + totalRowCount_ = input.readUInt64(); + break; + } + case 24: { + + segmentRowCount_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetMetas(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.index.InvertedIndex.InvertedIndexMetas.class, greptime.v1.index.InvertedIndex.InvertedIndexMetas.Builder.class); + } + + public static final int METAS_FIELD_NUMBER = 1; + private static final class MetasDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + greptime.v1.index.InvertedIndex.InvertedIndexMeta.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> metas_; + private com.google.protobuf.MapField + internalGetMetas() { + if (metas_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetasDefaultEntryHolder.defaultEntry); + } + return metas_; + } + + public int getMetasCount() { + return internalGetMetas().getMap().size(); + } + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the inverted index blob.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + @java.lang.Override + public boolean containsMetas( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetas().getMap().containsKey(key); + } + /** + * Use {@link #getMetasMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetas() { + return getMetasMap(); + } + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the inverted index blob.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public java.util.Map getMetasMap() { + return internalGetMetas().getMap(); + } + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the inverted index blob.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrDefault( + java.lang.String key, + greptime.v1.index.InvertedIndex.InvertedIndexMeta defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetas().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the inverted index blob.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetas().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TOTAL_ROW_COUNT_FIELD_NUMBER = 2; + private long totalRowCount_; + /** + *
+     * The total count of rows within the inverted index blob.
+     * This is used to determine the number of segments within the bitmap.
+     * 
+ * + * uint64 total_row_count = 2; + * @return The totalRowCount. + */ + @java.lang.Override + public long getTotalRowCount() { + return totalRowCount_; + } + + public static final int SEGMENT_ROW_COUNT_FIELD_NUMBER = 3; + private long segmentRowCount_; + /** + *
+     * The number of rows per group for bitmap indexing which determines how rows are
+     * batched for indexing. Each batch corresponds to a segment in the bitmap and allows
+     * for efficient retrieval during queries by reducing the search space.
+     * 
+ * + * uint64 segment_row_count = 3; + * @return The segmentRowCount. + */ + @java.lang.Override + public long getSegmentRowCount() { + return segmentRowCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetMetas(), + MetasDefaultEntryHolder.defaultEntry, + 1); + if (totalRowCount_ != 0L) { + output.writeUInt64(2, totalRowCount_); + } + if (segmentRowCount_ != 0L) { + output.writeUInt64(3, segmentRowCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetMetas().getMap().entrySet()) { + com.google.protobuf.MapEntry + metas__ = MetasDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, metas__); + } + if (totalRowCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, totalRowCount_); + } + if (segmentRowCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, segmentRowCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof greptime.v1.index.InvertedIndex.InvertedIndexMetas)) { + return super.equals(obj); + } + greptime.v1.index.InvertedIndex.InvertedIndexMetas other = (greptime.v1.index.InvertedIndex.InvertedIndexMetas) obj; + + if (!internalGetMetas().equals( + other.internalGetMetas())) return false; + if (getTotalRowCount() + != other.getTotalRowCount()) return false; + if (getSegmentRowCount() + != other.getSegmentRowCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetMetas().getMap().isEmpty()) { + hash = (37 * hash) + METAS_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetas().hashCode(); + } + hash = (37 * hash) + TOTAL_ROW_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalRowCount()); + hash = (37 * hash) + SEGMENT_ROW_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSegmentRowCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(greptime.v1.index.InvertedIndex.InvertedIndexMetas prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * InvertedIndexMetas defines the metadata for an inverted index
+     * within an inverted index blob.
+     * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexMetas} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.index.InvertedIndexMetas) + greptime.v1.index.InvertedIndex.InvertedIndexMetasOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetMetas(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableMetas(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.index.InvertedIndex.InvertedIndexMetas.class, greptime.v1.index.InvertedIndex.InvertedIndexMetas.Builder.class); + } + + // Construct using greptime.v1.index.InvertedIndex.InvertedIndexMetas.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableMetas().clear(); + totalRowCount_ = 0L; + + segmentRowCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_descriptor; + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexMetas getDefaultInstanceForType() { + return greptime.v1.index.InvertedIndex.InvertedIndexMetas.getDefaultInstance(); + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexMetas build() { + greptime.v1.index.InvertedIndex.InvertedIndexMetas result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexMetas buildPartial() { + greptime.v1.index.InvertedIndex.InvertedIndexMetas result = new greptime.v1.index.InvertedIndex.InvertedIndexMetas(this); + int from_bitField0_ = bitField0_; + result.metas_ = internalGetMetas(); + result.metas_.makeImmutable(); + result.totalRowCount_ = totalRowCount_; + result.segmentRowCount_ = segmentRowCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof greptime.v1.index.InvertedIndex.InvertedIndexMetas) { + return mergeFrom((greptime.v1.index.InvertedIndex.InvertedIndexMetas)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(greptime.v1.index.InvertedIndex.InvertedIndexMetas other) { + if (other == greptime.v1.index.InvertedIndex.InvertedIndexMetas.getDefaultInstance()) return this; + internalGetMutableMetas().mergeFrom( + other.internalGetMetas()); + if (other.getTotalRowCount() != 0L) { + setTotalRowCount(other.getTotalRowCount()); + } + if (other.getSegmentRowCount() != 0L) { + setSegmentRowCount(other.getSegmentRowCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + greptime.v1.index.InvertedIndex.InvertedIndexMetas parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (greptime.v1.index.InvertedIndex.InvertedIndexMetas) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> metas_; + private com.google.protobuf.MapField + internalGetMetas() { + if (metas_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetasDefaultEntryHolder.defaultEntry); + } + return metas_; + } + private com.google.protobuf.MapField + internalGetMutableMetas() { + onChanged();; + if (metas_ == null) { + metas_ = com.google.protobuf.MapField.newMapField( + MetasDefaultEntryHolder.defaultEntry); + } + if (!metas_.isMutable()) { + metas_ = metas_.copy(); + } + return metas_; + } + + public int getMetasCount() { + return internalGetMetas().getMap().size(); + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the inverted index blob.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + @java.lang.Override + public boolean containsMetas( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetas().getMap().containsKey(key); + } + /** + * Use {@link #getMetasMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetas() { + return getMetasMap(); + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the inverted index blob.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public java.util.Map getMetasMap() { + return internalGetMetas().getMap(); + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the inverted index blob.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrDefault( + java.lang.String key, + greptime.v1.index.InvertedIndex.InvertedIndexMeta defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetas().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the inverted index blob.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetas().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetas() { + internalGetMutableMetas().getMutableMap() + .clear(); + return this; + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the inverted index blob.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + public Builder removeMetas( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableMetas().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMetas() { + return internalGetMutableMetas().getMutableMap(); + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the inverted index blob.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + public Builder putMetas( + java.lang.String key, + greptime.v1.index.InvertedIndex.InvertedIndexMeta value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableMetas().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the inverted index blob.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + public Builder putAllMetas( + java.util.Map values) { + internalGetMutableMetas().getMutableMap() + .putAll(values); + return this; + } + + private long totalRowCount_ ; + /** + *
+       * The total count of rows within the inverted index blob.
+       * This is used to determine the number of segments within the bitmap.
+       * 
+ * + * uint64 total_row_count = 2; + * @return The totalRowCount. + */ + @java.lang.Override + public long getTotalRowCount() { + return totalRowCount_; + } + /** + *
+       * The total count of rows within the inverted index blob.
+       * This is used to determine the number of segments within the bitmap.
+       * 
+ * + * uint64 total_row_count = 2; + * @param value The totalRowCount to set. + * @return This builder for chaining. + */ + public Builder setTotalRowCount(long value) { + + totalRowCount_ = value; + onChanged(); + return this; + } + /** + *
+       * The total count of rows within the inverted index blob.
+       * This is used to determine the number of segments within the bitmap.
+       * 
+ * + * uint64 total_row_count = 2; + * @return This builder for chaining. + */ + public Builder clearTotalRowCount() { + + totalRowCount_ = 0L; + onChanged(); + return this; + } + + private long segmentRowCount_ ; + /** + *
+       * The number of rows per group for bitmap indexing which determines how rows are
+       * batched for indexing. Each batch corresponds to a segment in the bitmap and allows
+       * for efficient retrieval during queries by reducing the search space.
+       * 
+ * + * uint64 segment_row_count = 3; + * @return The segmentRowCount. + */ + @java.lang.Override + public long getSegmentRowCount() { + return segmentRowCount_; + } + /** + *
+       * The number of rows per group for bitmap indexing which determines how rows are
+       * batched for indexing. Each batch corresponds to a segment in the bitmap and allows
+       * for efficient retrieval during queries by reducing the search space.
+       * 
+ * + * uint64 segment_row_count = 3; + * @param value The segmentRowCount to set. + * @return This builder for chaining. + */ + public Builder setSegmentRowCount(long value) { + + segmentRowCount_ = value; + onChanged(); + return this; + } + /** + *
+       * The number of rows per group for bitmap indexing which determines how rows are
+       * batched for indexing. Each batch corresponds to a segment in the bitmap and allows
+       * for efficient retrieval during queries by reducing the search space.
+       * 
+ * + * uint64 segment_row_count = 3; + * @return This builder for chaining. + */ + public Builder clearSegmentRowCount() { + + segmentRowCount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.index.InvertedIndexMetas) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexMetas) + private static final greptime.v1.index.InvertedIndex.InvertedIndexMetas DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new greptime.v1.index.InvertedIndex.InvertedIndexMetas(); + } + + public static greptime.v1.index.InvertedIndex.InvertedIndexMetas getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InvertedIndexMetas parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InvertedIndexMetas(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexMetas getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface InvertedIndexMetaOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.index.InvertedIndexMeta) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name of the tag associated with the inverted index.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name of the tag associated with the inverted index.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The base byte offset for this tag's inverted index data within the blob.
+     * Other offsets in this message are relative to this base offset.
+     * 
+ * + * uint64 base_offset = 2; + * @return The baseOffset. + */ + long getBaseOffset(); + + /** + *
+     * The total size in bytes of this tag's inverted index data, including bitmaps,
+     * FST data.
+     * 
+ * + * uint64 inverted_index_size = 3; + * @return The invertedIndexSize. + */ + long getInvertedIndexSize(); + + /** + *
+     * The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`.
+     * 
+ * + * uint32 relative_fst_offset = 4; + * @return The relativeFstOffset. + */ + int getRelativeFstOffset(); + + /** + *
+     * The size in bytes of the FST data.
+     * 
+ * + * uint32 fst_size = 5; + * @return The fstSize. + */ + int getFstSize(); + + /** + *
+     * The byte offset relative to the `base_offset` where the null bitmap for this tag
+     * starts.
+     * 
+ * + * uint32 relative_null_bitmap_offset = 6; + * @return The relativeNullBitmapOffset. + */ + int getRelativeNullBitmapOffset(); + + /** + *
+     * The size in bytes of the null bitmap.
+     * 
+ * + * uint32 null_bitmap_size = 7; + * @return The nullBitmapSize. + */ + int getNullBitmapSize(); + + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + * @return Whether the stats field is set. + */ + boolean hasStats(); + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + * @return The stats. + */ + greptime.v1.index.InvertedIndex.InvertedIndexStats getStats(); + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + */ + greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder getStatsOrBuilder(); + } + /** + *
+   * InvertedIndexMeta contains the metadata for a specific tag's inverted index.
+   * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexMeta} + */ + public static final class InvertedIndexMeta extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.index.InvertedIndexMeta) + InvertedIndexMetaOrBuilder { + private static final long serialVersionUID = 0L; + // Use InvertedIndexMeta.newBuilder() to construct. + private InvertedIndexMeta(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InvertedIndexMeta() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InvertedIndexMeta(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InvertedIndexMeta( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + baseOffset_ = input.readUInt64(); + break; + } + case 24: { + + invertedIndexSize_ = input.readUInt64(); + break; + } + case 32: { + + relativeFstOffset_ = input.readUInt32(); + break; + } + case 40: { + + fstSize_ = input.readUInt32(); + break; + } + case 48: { + + relativeNullBitmapOffset_ = input.readUInt32(); + break; + } + case 56: { + + nullBitmapSize_ = input.readUInt32(); + break; + } + case 66: { + greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder subBuilder = null; + if (stats_ != null) { + subBuilder = stats_.toBuilder(); + } + stats_ = input.readMessage(greptime.v1.index.InvertedIndex.InvertedIndexStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(stats_); + stats_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.index.InvertedIndex.InvertedIndexMeta.class, greptime.v1.index.InvertedIndex.InvertedIndexMeta.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * Name of the tag associated with the inverted index.
+     * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + *
+     * Name of the tag associated with the inverted index.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE_OFFSET_FIELD_NUMBER = 2; + private long baseOffset_; + /** + *
+     * The base byte offset for this tag's inverted index data within the blob.
+     * Other offsets in this message are relative to this base offset.
+     * 
+ * + * uint64 base_offset = 2; + * @return The baseOffset. + */ + @java.lang.Override + public long getBaseOffset() { + return baseOffset_; + } + + public static final int INVERTED_INDEX_SIZE_FIELD_NUMBER = 3; + private long invertedIndexSize_; + /** + *
+     * The total size in bytes of this tag's inverted index data, including bitmaps,
+     * FST data.
+     * 
+ * + * uint64 inverted_index_size = 3; + * @return The invertedIndexSize. + */ + @java.lang.Override + public long getInvertedIndexSize() { + return invertedIndexSize_; + } + + public static final int RELATIVE_FST_OFFSET_FIELD_NUMBER = 4; + private int relativeFstOffset_; + /** + *
+     * The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`.
+     * 
+ * + * uint32 relative_fst_offset = 4; + * @return The relativeFstOffset. + */ + @java.lang.Override + public int getRelativeFstOffset() { + return relativeFstOffset_; + } + + public static final int FST_SIZE_FIELD_NUMBER = 5; + private int fstSize_; + /** + *
+     * The size in bytes of the FST data.
+     * 
+ * + * uint32 fst_size = 5; + * @return The fstSize. + */ + @java.lang.Override + public int getFstSize() { + return fstSize_; + } + + public static final int RELATIVE_NULL_BITMAP_OFFSET_FIELD_NUMBER = 6; + private int relativeNullBitmapOffset_; + /** + *
+     * The byte offset relative to the `base_offset` where the null bitmap for this tag
+     * starts.
+     * 
+ * + * uint32 relative_null_bitmap_offset = 6; + * @return The relativeNullBitmapOffset. + */ + @java.lang.Override + public int getRelativeNullBitmapOffset() { + return relativeNullBitmapOffset_; + } + + public static final int NULL_BITMAP_SIZE_FIELD_NUMBER = 7; + private int nullBitmapSize_; + /** + *
+     * The size in bytes of the null bitmap.
+     * 
+ * + * uint32 null_bitmap_size = 7; + * @return The nullBitmapSize. + */ + @java.lang.Override + public int getNullBitmapSize() { + return nullBitmapSize_; + } + + public static final int STATS_FIELD_NUMBER = 8; + private greptime.v1.index.InvertedIndex.InvertedIndexStats stats_; + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + * @return Whether the stats field is set. + */ + @java.lang.Override + public boolean hasStats() { + return stats_ != null; + } + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + * @return The stats. + */ + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexStats getStats() { + return stats_ == null ? greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance() : stats_; + } + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + */ + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder getStatsOrBuilder() { + return getStats(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (baseOffset_ != 0L) { + output.writeUInt64(2, baseOffset_); + } + if (invertedIndexSize_ != 0L) { + output.writeUInt64(3, invertedIndexSize_); + } + if (relativeFstOffset_ != 0) { + output.writeUInt32(4, relativeFstOffset_); + } + if (fstSize_ != 0) { + output.writeUInt32(5, fstSize_); + } + if (relativeNullBitmapOffset_ != 0) { + output.writeUInt32(6, relativeNullBitmapOffset_); + } + if (nullBitmapSize_ != 0) { + output.writeUInt32(7, nullBitmapSize_); + } + if (stats_ != null) { + output.writeMessage(8, getStats()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (baseOffset_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, baseOffset_); + } + if (invertedIndexSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, invertedIndexSize_); + } + if (relativeFstOffset_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, relativeFstOffset_); + } + if (fstSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, fstSize_); + } + if (relativeNullBitmapOffset_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, relativeNullBitmapOffset_); + } + if (nullBitmapSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, nullBitmapSize_); + } + if (stats_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getStats()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof greptime.v1.index.InvertedIndex.InvertedIndexMeta)) { + return super.equals(obj); + } + greptime.v1.index.InvertedIndex.InvertedIndexMeta other = (greptime.v1.index.InvertedIndex.InvertedIndexMeta) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getBaseOffset() + != other.getBaseOffset()) return false; + if (getInvertedIndexSize() + != other.getInvertedIndexSize()) return false; + if (getRelativeFstOffset() + != other.getRelativeFstOffset()) return false; + if (getFstSize() + != other.getFstSize()) return false; + if (getRelativeNullBitmapOffset() + != other.getRelativeNullBitmapOffset()) return false; + if (getNullBitmapSize() + != other.getNullBitmapSize()) return false; + if (hasStats() != other.hasStats()) return false; + if (hasStats()) { + if (!getStats() + .equals(other.getStats())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + BASE_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBaseOffset()); + hash = (37 * hash) + INVERTED_INDEX_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getInvertedIndexSize()); + hash = (37 * hash) + RELATIVE_FST_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getRelativeFstOffset(); + hash = (37 * hash) + FST_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getFstSize(); + hash = (37 * hash) + RELATIVE_NULL_BITMAP_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getRelativeNullBitmapOffset(); + hash = (37 * hash) + NULL_BITMAP_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getNullBitmapSize(); + if (hasStats()) { + hash = (37 * hash) + STATS_FIELD_NUMBER; + hash = (53 * hash) + getStats().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(greptime.v1.index.InvertedIndex.InvertedIndexMeta prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * InvertedIndexMeta contains the metadata for a specific tag's inverted index.
+     * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexMeta} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.index.InvertedIndexMeta) + greptime.v1.index.InvertedIndex.InvertedIndexMetaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.index.InvertedIndex.InvertedIndexMeta.class, greptime.v1.index.InvertedIndex.InvertedIndexMeta.Builder.class); + } + + // Construct using greptime.v1.index.InvertedIndex.InvertedIndexMeta.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + baseOffset_ = 0L; + + invertedIndexSize_ = 0L; + + relativeFstOffset_ = 0; + + fstSize_ = 0; + + relativeNullBitmapOffset_ = 0; + + nullBitmapSize_ = 0; + + if (statsBuilder_ == null) { + stats_ = null; + } else { + stats_ = null; + statsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_descriptor; + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexMeta getDefaultInstanceForType() { + return greptime.v1.index.InvertedIndex.InvertedIndexMeta.getDefaultInstance(); + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexMeta build() { + greptime.v1.index.InvertedIndex.InvertedIndexMeta result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexMeta buildPartial() { + greptime.v1.index.InvertedIndex.InvertedIndexMeta result = new greptime.v1.index.InvertedIndex.InvertedIndexMeta(this); + result.name_ = name_; + result.baseOffset_ = baseOffset_; + result.invertedIndexSize_ = invertedIndexSize_; + result.relativeFstOffset_ = relativeFstOffset_; + result.fstSize_ = fstSize_; + result.relativeNullBitmapOffset_ = relativeNullBitmapOffset_; + result.nullBitmapSize_ = nullBitmapSize_; + if (statsBuilder_ == null) { + result.stats_ = stats_; + } else { + result.stats_ = statsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof greptime.v1.index.InvertedIndex.InvertedIndexMeta) { + return mergeFrom((greptime.v1.index.InvertedIndex.InvertedIndexMeta)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(greptime.v1.index.InvertedIndex.InvertedIndexMeta other) { + if (other == greptime.v1.index.InvertedIndex.InvertedIndexMeta.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getBaseOffset() != 0L) { + setBaseOffset(other.getBaseOffset()); + } + if (other.getInvertedIndexSize() != 0L) { + setInvertedIndexSize(other.getInvertedIndexSize()); + } + if (other.getRelativeFstOffset() != 0) { + setRelativeFstOffset(other.getRelativeFstOffset()); + } + if (other.getFstSize() != 0) { + setFstSize(other.getFstSize()); + } + if (other.getRelativeNullBitmapOffset() != 0) { + setRelativeNullBitmapOffset(other.getRelativeNullBitmapOffset()); + } + if (other.getNullBitmapSize() != 0) { + setNullBitmapSize(other.getNullBitmapSize()); + } + if (other.hasStats()) { + mergeStats(other.getStats()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + greptime.v1.index.InvertedIndex.InvertedIndexMeta parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (greptime.v1.index.InvertedIndex.InvertedIndexMeta) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name of the tag associated with the inverted index.
+       * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Name of the tag associated with the inverted index.
+       * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Name of the tag associated with the inverted index.
+       * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * Name of the tag associated with the inverted index.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name of the tag associated with the inverted index.
+       * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private long baseOffset_ ; + /** + *
+       * The base byte offset for this tag's inverted index data within the blob.
+       * Other offsets in this message are relative to this base offset.
+       * 
+ * + * uint64 base_offset = 2; + * @return The baseOffset. + */ + @java.lang.Override + public long getBaseOffset() { + return baseOffset_; + } + /** + *
+       * The base byte offset for this tag's inverted index data within the blob.
+       * Other offsets in this message are relative to this base offset.
+       * 
+ * + * uint64 base_offset = 2; + * @param value The baseOffset to set. + * @return This builder for chaining. + */ + public Builder setBaseOffset(long value) { + + baseOffset_ = value; + onChanged(); + return this; + } + /** + *
+       * The base byte offset for this tag's inverted index data within the blob.
+       * Other offsets in this message are relative to this base offset.
+       * 
+ * + * uint64 base_offset = 2; + * @return This builder for chaining. + */ + public Builder clearBaseOffset() { + + baseOffset_ = 0L; + onChanged(); + return this; + } + + private long invertedIndexSize_ ; + /** + *
+       * The total size in bytes of this tag's inverted index data, including bitmaps,
+       * FST data.
+       * 
+ * + * uint64 inverted_index_size = 3; + * @return The invertedIndexSize. + */ + @java.lang.Override + public long getInvertedIndexSize() { + return invertedIndexSize_; + } + /** + *
+       * The total size in bytes of this tag's inverted index data, including bitmaps,
+       * FST data.
+       * 
+ * + * uint64 inverted_index_size = 3; + * @param value The invertedIndexSize to set. + * @return This builder for chaining. + */ + public Builder setInvertedIndexSize(long value) { + + invertedIndexSize_ = value; + onChanged(); + return this; + } + /** + *
+       * The total size in bytes of this tag's inverted index data, including bitmaps,
+       * FST data.
+       * 
+ * + * uint64 inverted_index_size = 3; + * @return This builder for chaining. + */ + public Builder clearInvertedIndexSize() { + + invertedIndexSize_ = 0L; + onChanged(); + return this; + } + + private int relativeFstOffset_ ; + /** + *
+       * The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`.
+       * 
+ * + * uint32 relative_fst_offset = 4; + * @return The relativeFstOffset. + */ + @java.lang.Override + public int getRelativeFstOffset() { + return relativeFstOffset_; + } + /** + *
+       * The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`.
+       * 
+ * + * uint32 relative_fst_offset = 4; + * @param value The relativeFstOffset to set. + * @return This builder for chaining. + */ + public Builder setRelativeFstOffset(int value) { + + relativeFstOffset_ = value; + onChanged(); + return this; + } + /** + *
+       * The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`.
+       * 
+ * + * uint32 relative_fst_offset = 4; + * @return This builder for chaining. + */ + public Builder clearRelativeFstOffset() { + + relativeFstOffset_ = 0; + onChanged(); + return this; + } + + private int fstSize_ ; + /** + *
+       * The size in bytes of the FST data.
+       * 
+ * + * uint32 fst_size = 5; + * @return The fstSize. + */ + @java.lang.Override + public int getFstSize() { + return fstSize_; + } + /** + *
+       * The size in bytes of the FST data.
+       * 
+ * + * uint32 fst_size = 5; + * @param value The fstSize to set. + * @return This builder for chaining. + */ + public Builder setFstSize(int value) { + + fstSize_ = value; + onChanged(); + return this; + } + /** + *
+       * The size in bytes of the FST data.
+       * 
+ * + * uint32 fst_size = 5; + * @return This builder for chaining. + */ + public Builder clearFstSize() { + + fstSize_ = 0; + onChanged(); + return this; + } + + private int relativeNullBitmapOffset_ ; + /** + *
+       * The byte offset relative to the `base_offset` where the null bitmap for this tag
+       * starts.
+       * 
+ * + * uint32 relative_null_bitmap_offset = 6; + * @return The relativeNullBitmapOffset. + */ + @java.lang.Override + public int getRelativeNullBitmapOffset() { + return relativeNullBitmapOffset_; + } + /** + *
+       * The byte offset relative to the `base_offset` where the null bitmap for this tag
+       * starts.
+       * 
+ * + * uint32 relative_null_bitmap_offset = 6; + * @param value The relativeNullBitmapOffset to set. + * @return This builder for chaining. + */ + public Builder setRelativeNullBitmapOffset(int value) { + + relativeNullBitmapOffset_ = value; + onChanged(); + return this; + } + /** + *
+       * The byte offset relative to the `base_offset` where the null bitmap for this tag
+       * starts.
+       * 
+ * + * uint32 relative_null_bitmap_offset = 6; + * @return This builder for chaining. + */ + public Builder clearRelativeNullBitmapOffset() { + + relativeNullBitmapOffset_ = 0; + onChanged(); + return this; + } + + private int nullBitmapSize_ ; + /** + *
+       * The size in bytes of the null bitmap.
+       * 
+ * + * uint32 null_bitmap_size = 7; + * @return The nullBitmapSize. + */ + @java.lang.Override + public int getNullBitmapSize() { + return nullBitmapSize_; + } + /** + *
+       * The size in bytes of the null bitmap.
+       * 
+ * + * uint32 null_bitmap_size = 7; + * @param value The nullBitmapSize to set. + * @return This builder for chaining. + */ + public Builder setNullBitmapSize(int value) { + + nullBitmapSize_ = value; + onChanged(); + return this; + } + /** + *
+       * The size in bytes of the null bitmap.
+       * 
+ * + * uint32 null_bitmap_size = 7; + * @return This builder for chaining. + */ + public Builder clearNullBitmapSize() { + + nullBitmapSize_ = 0; + onChanged(); + return this; + } + + private greptime.v1.index.InvertedIndex.InvertedIndexStats stats_; + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.index.InvertedIndex.InvertedIndexStats, greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder, greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder> statsBuilder_; + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + * @return Whether the stats field is set. + */ + public boolean hasStats() { + return statsBuilder_ != null || stats_ != null; + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + * @return The stats. + */ + public greptime.v1.index.InvertedIndex.InvertedIndexStats getStats() { + if (statsBuilder_ == null) { + return stats_ == null ? greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance() : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + */ + public Builder setStats(greptime.v1.index.InvertedIndex.InvertedIndexStats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + onChanged(); + } else { + statsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + */ + public Builder setStats( + greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + onChanged(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + */ + public Builder mergeStats(greptime.v1.index.InvertedIndex.InvertedIndexStats value) { + if (statsBuilder_ == null) { + if (stats_ != null) { + stats_ = + greptime.v1.index.InvertedIndex.InvertedIndexStats.newBuilder(stats_).mergeFrom(value).buildPartial(); + } else { + stats_ = value; + } + onChanged(); + } else { + statsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + */ + public Builder clearStats() { + if (statsBuilder_ == null) { + stats_ = null; + onChanged(); + } else { + stats_ = null; + statsBuilder_ = null; + } + + return this; + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + */ + public greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder getStatsBuilder() { + + onChanged(); + return getStatsFieldBuilder().getBuilder(); + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + */ + public greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null ? + greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance() : stats_; + } + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.index.InvertedIndex.InvertedIndexStats, greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder, greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder> + getStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.index.InvertedIndex.InvertedIndexStats, greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder, greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder>( + getStats(), + getParentForChildren(), + isClean()); + stats_ = null; + } + return statsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.index.InvertedIndexMeta) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexMeta) + private static final greptime.v1.index.InvertedIndex.InvertedIndexMeta DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new greptime.v1.index.InvertedIndex.InvertedIndexMeta(); + } + + public static greptime.v1.index.InvertedIndex.InvertedIndexMeta getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InvertedIndexMeta parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InvertedIndexMeta(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexMeta getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface InvertedIndexStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.index.InvertedIndexStats) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The count of null entries within the tag's column.
+     * 
+ * + * uint64 null_count = 1; + * @return The nullCount. + */ + long getNullCount(); + + /** + *
+     * The number of distinct values within the tag's column.
+     * 
+ * + * uint64 distinct_count = 2; + * @return The distinctCount. + */ + long getDistinctCount(); + + /** + *
+     * The minimum value found within the tag's column, encoded as bytes.
+     * 
+ * + * bytes min_value = 3; + * @return The minValue. + */ + com.google.protobuf.ByteString getMinValue(); + + /** + *
+     * The maximum value found within the tag's column, encoded as bytes.
+     * 
+ * + * bytes max_value = 4; + * @return The maxValue. + */ + com.google.protobuf.ByteString getMaxValue(); + } + /** + *
+   * InvertedIndexStats provides statistical data on a tag's inverted index.
+   * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexStats} + */ + public static final class InvertedIndexStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.index.InvertedIndexStats) + InvertedIndexStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use InvertedIndexStats.newBuilder() to construct. + private InvertedIndexStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InvertedIndexStats() { + minValue_ = com.google.protobuf.ByteString.EMPTY; + maxValue_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InvertedIndexStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InvertedIndexStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + nullCount_ = input.readUInt64(); + break; + } + case 16: { + + distinctCount_ = input.readUInt64(); + break; + } + case 26: { + + minValue_ = input.readBytes(); + break; + } + case 34: { + + maxValue_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.index.InvertedIndex.InvertedIndexStats.class, greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder.class); + } + + public static final int NULL_COUNT_FIELD_NUMBER = 1; + private long nullCount_; + /** + *
+     * The count of null entries within the tag's column.
+     * 
+ * + * uint64 null_count = 1; + * @return The nullCount. + */ + @java.lang.Override + public long getNullCount() { + return nullCount_; + } + + public static final int DISTINCT_COUNT_FIELD_NUMBER = 2; + private long distinctCount_; + /** + *
+     * The number of distinct values within the tag's column.
+     * 
+ * + * uint64 distinct_count = 2; + * @return The distinctCount. + */ + @java.lang.Override + public long getDistinctCount() { + return distinctCount_; + } + + public static final int MIN_VALUE_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString minValue_; + /** + *
+     * The minimum value found within the tag's column, encoded as bytes.
+     * 
+ * + * bytes min_value = 3; + * @return The minValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMinValue() { + return minValue_; + } + + public static final int MAX_VALUE_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString maxValue_; + /** + *
+     * The maximum value found within the tag's column, encoded as bytes.
+     * 
+ * + * bytes max_value = 4; + * @return The maxValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMaxValue() { + return maxValue_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (nullCount_ != 0L) { + output.writeUInt64(1, nullCount_); + } + if (distinctCount_ != 0L) { + output.writeUInt64(2, distinctCount_); + } + if (!minValue_.isEmpty()) { + output.writeBytes(3, minValue_); + } + if (!maxValue_.isEmpty()) { + output.writeBytes(4, maxValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (nullCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, nullCount_); + } + if (distinctCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, distinctCount_); + } + if (!minValue_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, minValue_); + } + if (!maxValue_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, maxValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof greptime.v1.index.InvertedIndex.InvertedIndexStats)) { + return super.equals(obj); + } + greptime.v1.index.InvertedIndex.InvertedIndexStats other = (greptime.v1.index.InvertedIndex.InvertedIndexStats) obj; + + if (getNullCount() + != other.getNullCount()) return false; + if (getDistinctCount() + != other.getDistinctCount()) return false; + if (!getMinValue() + .equals(other.getMinValue())) return false; + if (!getMaxValue() + .equals(other.getMaxValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NULL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNullCount()); + hash = (37 * hash) + DISTINCT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDistinctCount()); + hash = (37 * hash) + MIN_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMinValue().hashCode(); + hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMaxValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(greptime.v1.index.InvertedIndex.InvertedIndexStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * InvertedIndexStats provides statistical data on a tag's inverted index.
+     * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.index.InvertedIndexStats) + greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.index.InvertedIndex.InvertedIndexStats.class, greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder.class); + } + + // Construct using greptime.v1.index.InvertedIndex.InvertedIndexStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + nullCount_ = 0L; + + distinctCount_ = 0L; + + minValue_ = com.google.protobuf.ByteString.EMPTY; + + maxValue_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_descriptor; + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexStats getDefaultInstanceForType() { + return greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance(); + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexStats build() { + greptime.v1.index.InvertedIndex.InvertedIndexStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexStats buildPartial() { + greptime.v1.index.InvertedIndex.InvertedIndexStats result = new greptime.v1.index.InvertedIndex.InvertedIndexStats(this); + result.nullCount_ = nullCount_; + result.distinctCount_ = distinctCount_; + result.minValue_ = minValue_; + result.maxValue_ = maxValue_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof greptime.v1.index.InvertedIndex.InvertedIndexStats) { + return mergeFrom((greptime.v1.index.InvertedIndex.InvertedIndexStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(greptime.v1.index.InvertedIndex.InvertedIndexStats other) { + if (other == greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance()) return this; + if (other.getNullCount() != 0L) { + setNullCount(other.getNullCount()); + } + if (other.getDistinctCount() != 0L) { + setDistinctCount(other.getDistinctCount()); + } + if (other.getMinValue() != com.google.protobuf.ByteString.EMPTY) { + setMinValue(other.getMinValue()); + } + if (other.getMaxValue() != com.google.protobuf.ByteString.EMPTY) { + setMaxValue(other.getMaxValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + greptime.v1.index.InvertedIndex.InvertedIndexStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (greptime.v1.index.InvertedIndex.InvertedIndexStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long nullCount_ ; + /** + *
+       * The count of null entries within the tag's column.
+       * 
+ * + * uint64 null_count = 1; + * @return The nullCount. + */ + @java.lang.Override + public long getNullCount() { + return nullCount_; + } + /** + *
+       * The count of null entries within the tag's column.
+       * 
+ * + * uint64 null_count = 1; + * @param value The nullCount to set. + * @return This builder for chaining. + */ + public Builder setNullCount(long value) { + + nullCount_ = value; + onChanged(); + return this; + } + /** + *
+       * The count of null entries within the tag's column.
+       * 
+ * + * uint64 null_count = 1; + * @return This builder for chaining. + */ + public Builder clearNullCount() { + + nullCount_ = 0L; + onChanged(); + return this; + } + + private long distinctCount_ ; + /** + *
+       * The number of distinct values within the tag's column.
+       * 
+ * + * uint64 distinct_count = 2; + * @return The distinctCount. + */ + @java.lang.Override + public long getDistinctCount() { + return distinctCount_; + } + /** + *
+       * The number of distinct values within the tag's column.
+       * 
+ * + * uint64 distinct_count = 2; + * @param value The distinctCount to set. + * @return This builder for chaining. + */ + public Builder setDistinctCount(long value) { + + distinctCount_ = value; + onChanged(); + return this; + } + /** + *
+       * The number of distinct values within the tag's column.
+       * 
+ * + * uint64 distinct_count = 2; + * @return This builder for chaining. + */ + public Builder clearDistinctCount() { + + distinctCount_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString minValue_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The minimum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes min_value = 3; + * @return The minValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMinValue() { + return minValue_; + } + /** + *
+       * The minimum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes min_value = 3; + * @param value The minValue to set. + * @return This builder for chaining. + */ + public Builder setMinValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + minValue_ = value; + onChanged(); + return this; + } + /** + *
+       * The minimum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes min_value = 3; + * @return This builder for chaining. + */ + public Builder clearMinValue() { + + minValue_ = getDefaultInstance().getMinValue(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString maxValue_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The maximum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes max_value = 4; + * @return The maxValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMaxValue() { + return maxValue_; + } + /** + *
+       * The maximum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes max_value = 4; + * @param value The maxValue to set. + * @return This builder for chaining. + */ + public Builder setMaxValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + maxValue_ = value; + onChanged(); + return this; + } + /** + *
+       * The maximum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes max_value = 4; + * @return This builder for chaining. + */ + public Builder clearMaxValue() { + + maxValue_ = getDefaultInstance().getMaxValue(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.index.InvertedIndexStats) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexStats) + private static final greptime.v1.index.InvertedIndex.InvertedIndexStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new greptime.v1.index.InvertedIndex.InvertedIndexStats(); + } + + public static greptime.v1.index.InvertedIndex.InvertedIndexStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InvertedIndexStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InvertedIndexStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public greptime.v1.index.InvertedIndex.InvertedIndexStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_index_InvertedIndexMetas_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_index_InvertedIndexMetas_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_index_InvertedIndexMeta_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_index_InvertedIndexStats_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n&greptime/v1/index/inverted_index.proto" + + "\022\021greptime.v1.index\"\335\001\n\022InvertedIndexMet" + + "as\022?\n\005metas\030\001 \003(\01320.greptime.v1.index.In" + + "vertedIndexMetas.MetasEntry\022\027\n\017total_row" + + "_count\030\002 \001(\004\022\031\n\021segment_row_count\030\003 \001(\004\032" + + "R\n\nMetasEntry\022\013\n\003key\030\001 \001(\t\0223\n\005value\030\002 \001(" + + "\0132$.greptime.v1.index.InvertedIndexMeta:" + + "\0028\001\"\367\001\n\021InvertedIndexMeta\022\014\n\004name\030\001 \001(\t\022" + + "\023\n\013base_offset\030\002 \001(\004\022\033\n\023inverted_index_s" + + "ize\030\003 \001(\004\022\033\n\023relative_fst_offset\030\004 \001(\r\022\020" + + "\n\010fst_size\030\005 \001(\r\022#\n\033relative_null_bitmap" + + "_offset\030\006 \001(\r\022\030\n\020null_bitmap_size\030\007 \001(\r\022" + + "4\n\005stats\030\010 \001(\0132%.greptime.v1.index.Inver" + + "tedIndexStats\"f\n\022InvertedIndexStats\022\022\n\nn" + + "ull_count\030\001 \001(\004\022\026\n\016distinct_count\030\002 \001(\004\022" + + "\021\n\tmin_value\030\003 \001(\014\022\021\n\tmax_value\030\004 \001(\014B=Z" + + ";github.com/GreptimeTeam/greptime-proto/" + + "go/greptime/v1/indexb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_greptime_v1_index_InvertedIndexMetas_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_greptime_v1_index_InvertedIndexMetas_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_index_InvertedIndexMetas_descriptor, + new java.lang.String[] { "Metas", "TotalRowCount", "SegmentRowCount", }); + internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_descriptor = + internal_static_greptime_v1_index_InvertedIndexMetas_descriptor.getNestedTypes().get(0); + internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_greptime_v1_index_InvertedIndexMeta_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_index_InvertedIndexMeta_descriptor, + new java.lang.String[] { "Name", "BaseOffset", "InvertedIndexSize", "RelativeFstOffset", "FstSize", "RelativeNullBitmapOffset", "NullBitmapSize", "Stats", }); + internal_static_greptime_v1_index_InvertedIndexStats_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_index_InvertedIndexStats_descriptor, + new java.lang.String[] { "NullCount", "DistinctCount", "MinValue", "MaxValue", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto/greptime/v1/index/bloom_filter.proto b/proto/greptime/v1/index/bloom_filter.proto new file mode 100644 index 00000000..36e13d6e --- /dev/null +++ b/proto/greptime/v1/index/bloom_filter.proto @@ -0,0 +1,52 @@ +// Copyright 2023 Greptime Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package greptime.v1.index; + +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/index"; + +// BloomFilterMeta defines the metadata for a bloom filter. +message BloomFilterMeta { + // The number of rows per segment. + uint64 rows_per_segment = 1; + + // The number of segments. + uint64 segment_count = 2; + + // The number of total rows. + uint64 row_count = 3; + + // The size of the bloom filter in bytes excluding the metadata. + uint64 bloom_filter_size = 4; + + // The indices to the bloom filter location of each segment. + repeated uint64 segment_loc_indices = 5; + + // The bloom filter locations. + repeated BloomFilterLoc bloom_filter_locs = 6; +} + +// BloomFilterLoc defines the location of a bloom filter. +message BloomFilterLoc { + // The byte offset of the bloom filter data. + uint64 offset = 1; + + // The size of the bloom filter data. + uint64 size = 2; + + // The number of elements in the bloom filter. + uint64 element_count = 3; +} diff --git a/proto/greptime/v1/index/inverted_index.proto b/proto/greptime/v1/index/inverted_index.proto index eae4fc58..9d9d4379 100644 --- a/proto/greptime/v1/index/inverted_index.proto +++ b/proto/greptime/v1/index/inverted_index.proto @@ -16,8 +16,6 @@ syntax = "proto3"; package greptime.v1.index; -option java_package = "io.greptime.v1.index"; -option java_outer_classname = "Index"; option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/index"; // InvertedIndexMetas defines the metadata for an inverted index