From c27b3844e5e094df09f2c54b121f40679c1a9975 Mon Sep 17 00:00:00 2001 From: Weny Xu Date: Tue, 31 Oct 2023 13:12:55 +0900 Subject: [PATCH] refactor: remove router rpc (#114) --- c++/greptime/v1/meta/route.grpc.pb.cc | 61 - c++/greptime/v1/meta/route.grpc.pb.h | 264 -- c++/greptime/v1/meta/route.pb.cc | 645 +---- c++/greptime/v1/meta/route.pb.h | 690 +---- go/greptime/v1/meta/route.pb.go | 388 +-- .../src/main/java/greptime/v1/meta/Route.java | 2451 +---------------- proto/greptime/v1/meta/route.proto | 38 +- src/lib.rs | 1 - src/serde.rs | 38 - src/v1/meta.rs | 1 - 10 files changed, 176 insertions(+), 4401 deletions(-) delete mode 100644 src/serde.rs diff --git a/c++/greptime/v1/meta/route.grpc.pb.cc b/c++/greptime/v1/meta/route.grpc.pb.cc index 23b2eae6..0e97b281 100644 --- a/c++/greptime/v1/meta/route.grpc.pb.cc +++ b/c++/greptime/v1/meta/route.grpc.pb.cc @@ -23,67 +23,6 @@ namespace greptime { namespace v1 { namespace meta { -static const char* Router_method_names[] = { - "/greptime.v1.meta.Router/Route", -}; - -std::unique_ptr< Router::Stub> Router::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { - (void)options; - std::unique_ptr< Router::Stub> stub(new Router::Stub(channel, options)); - return stub; -} - -Router::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) - : channel_(channel), rpcmethod_Route_(Router_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - {} - -::grpc::Status Router::Stub::Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::greptime::v1::meta::RouteResponse* response) { - return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Route_, context, request, response); -} - -void Router::Stub::async::Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, std::function f) { - ::grpc::internal::CallbackUnaryCall< ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Route_, context, request, response, std::move(f)); -} - -void Router::Stub::async::Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Route_, context, request, response, reactor); -} - -::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>* Router::Stub::PrepareAsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::meta::RouteResponse, ::greptime::v1::meta::RouteRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Route_, context, request); -} - -::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>* Router::Stub::AsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) { - auto* result = - this->PrepareAsyncRouteRaw(context, request, cq); - result->StartCall(); - return result; -} - -Router::Service::Service() { - AddMethod(new ::grpc::internal::RpcServiceMethod( - Router_method_names[0], - ::grpc::internal::RpcMethod::NORMAL_RPC, - new ::grpc::internal::RpcMethodHandler< Router::Service, ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( - [](Router::Service* service, - ::grpc::ServerContext* ctx, - const ::greptime::v1::meta::RouteRequest* req, - ::greptime::v1::meta::RouteResponse* resp) { - return service->Route(ctx, req, resp); - }, this))); -} - -Router::Service::~Service() { -} - -::grpc::Status Router::Service::Route(::grpc::ServerContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response) { - (void) context; - (void) request; - (void) response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - - } // namespace greptime } // namespace v1 } // namespace meta diff --git a/c++/greptime/v1/meta/route.grpc.pb.h b/c++/greptime/v1/meta/route.grpc.pb.h index 3e4d8185..e251c114 100644 --- a/c++/greptime/v1/meta/route.grpc.pb.h +++ b/c++/greptime/v1/meta/route.grpc.pb.h @@ -44,270 +44,6 @@ namespace greptime { namespace v1 { namespace meta { -class Router final { - public: - static constexpr char const* service_full_name() { - return "greptime.v1.meta.Router"; - } - class StubInterface { - public: - virtual ~StubInterface() {} - // Fetch routing information for tables. The smallest unit is the complete - // routing information(all regions) of a table. - // - // ```text - // table_1 - // table_name - // table_schema - // regions - // region_1 - // leader_peer - // follower_peer_1, follower_peer_2 - // region_2 - // leader_peer - // follower_peer_1, follower_peer_2, follower_peer_3 - // region_xxx - // table_2 - // ... - // ``` - // - virtual ::grpc::Status Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::greptime::v1::meta::RouteResponse* response) = 0; - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>> AsyncRoute(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>>(AsyncRouteRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>> PrepareAsyncRoute(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>>(PrepareAsyncRouteRaw(context, request, cq)); - } - class async_interface { - public: - virtual ~async_interface() {} - // Fetch routing information for tables. The smallest unit is the complete - // routing information(all regions) of a table. - // - // ```text - // table_1 - // table_name - // table_schema - // regions - // region_1 - // leader_peer - // follower_peer_1, follower_peer_2 - // region_2 - // leader_peer - // follower_peer_1, follower_peer_2, follower_peer_3 - // region_xxx - // table_2 - // ... - // ``` - // - virtual void Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, std::function) = 0; - virtual void Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; - }; - typedef class async_interface experimental_async_interface; - virtual class async_interface* async() { return nullptr; } - class async_interface* experimental_async() { return async(); } - private: - virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>* AsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::RouteResponse>* PrepareAsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) = 0; - }; - class Stub final : public StubInterface { - public: - Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); - ::grpc::Status Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::greptime::v1::meta::RouteResponse* response) override; - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>> AsyncRoute(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>>(AsyncRouteRaw(context, request, cq)); - } - std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>> PrepareAsyncRoute(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>>(PrepareAsyncRouteRaw(context, request, cq)); - } - class async final : - public StubInterface::async_interface { - public: - void Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, std::function) override; - void Route(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response, ::grpc::ClientUnaryReactor* reactor) override; - private: - friend class Stub; - explicit async(Stub* stub): stub_(stub) { } - Stub* stub() { return stub_; } - Stub* stub_; - }; - class async* async() override { return &async_stub_; } - - private: - std::shared_ptr< ::grpc::ChannelInterface> channel_; - class async async_stub_{this}; - ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>* AsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RouteResponse>* PrepareAsyncRouteRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RouteRequest& request, ::grpc::CompletionQueue* cq) override; - const ::grpc::internal::RpcMethod rpcmethod_Route_; - }; - static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); - - class Service : public ::grpc::Service { - public: - Service(); - virtual ~Service(); - // Fetch routing information for tables. The smallest unit is the complete - // routing information(all regions) of a table. - // - // ```text - // table_1 - // table_name - // table_schema - // regions - // region_1 - // leader_peer - // follower_peer_1, follower_peer_2 - // region_2 - // leader_peer - // follower_peer_1, follower_peer_2, follower_peer_3 - // region_xxx - // table_2 - // ... - // ``` - // - virtual ::grpc::Status Route(::grpc::ServerContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response); - }; - template - class WithAsyncMethod_Route : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithAsyncMethod_Route() { - ::grpc::Service::MarkMethodAsync(0); - } - ~WithAsyncMethod_Route() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestRoute(::grpc::ServerContext* context, ::greptime::v1::meta::RouteRequest* request, ::grpc::ServerAsyncResponseWriter< ::greptime::v1::meta::RouteResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); - } - }; - typedef WithAsyncMethod_Route AsyncService; - template - class WithCallbackMethod_Route : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithCallbackMethod_Route() { - ::grpc::Service::MarkMethodCallback(0, - new ::grpc::internal::CallbackUnaryHandler< ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse>( - [this]( - ::grpc::CallbackServerContext* context, const ::greptime::v1::meta::RouteRequest* request, ::greptime::v1::meta::RouteResponse* response) { return this->Route(context, request, response); }));} - void SetMessageAllocatorFor_Route( - ::grpc::MessageAllocator< ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); - static_cast<::grpc::internal::CallbackUnaryHandler< ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse>*>(handler) - ->SetMessageAllocator(allocator); - } - ~WithCallbackMethod_Route() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* Route( - ::grpc::CallbackServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) { return nullptr; } - }; - typedef WithCallbackMethod_Route CallbackService; - typedef CallbackService ExperimentalCallbackService; - template - class WithGenericMethod_Route : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithGenericMethod_Route() { - ::grpc::Service::MarkMethodGeneric(0); - } - ~WithGenericMethod_Route() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithRawMethod_Route : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawMethod_Route() { - ::grpc::Service::MarkMethodRaw(0); - } - ~WithRawMethod_Route() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestRoute(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); - } - }; - template - class WithRawCallbackMethod_Route : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithRawCallbackMethod_Route() { - ::grpc::Service::MarkMethodRawCallback(0, - new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( - [this]( - ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Route(context, request, response); })); - } - ~WithRawCallbackMethod_Route() override { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - virtual ::grpc::ServerUnaryReactor* Route( - ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } - }; - template - class WithStreamedUnaryMethod_Route : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} - public: - WithStreamedUnaryMethod_Route() { - ::grpc::Service::MarkMethodStreamed(0, - new ::grpc::internal::StreamedUnaryHandler< - ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse>( - [this](::grpc::ServerContext* context, - ::grpc::ServerUnaryStreamer< - ::greptime::v1::meta::RouteRequest, ::greptime::v1::meta::RouteResponse>* streamer) { - return this->StreamedRoute(context, - streamer); - })); - } - ~WithStreamedUnaryMethod_Route() override { - BaseClassMustBeDerivedFromService(this); - } - // disable regular version of this method - ::grpc::Status Route(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::RouteRequest* /*request*/, ::greptime::v1::meta::RouteResponse* /*response*/) override { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - // replace default version of method with streamed unary - virtual ::grpc::Status StreamedRoute(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::greptime::v1::meta::RouteRequest,::greptime::v1::meta::RouteResponse>* server_unary_streamer) = 0; - }; - typedef WithStreamedUnaryMethod_Route StreamedUnaryService; - typedef Service SplitStreamedService; - typedef WithStreamedUnaryMethod_Route StreamedService; -}; - } // namespace meta } // namespace v1 } // namespace greptime diff --git a/c++/greptime/v1/meta/route.pb.cc b/c++/greptime/v1/meta/route.pb.cc index fc354c66..b2ebd76b 100644 --- a/c++/greptime/v1/meta/route.pb.cc +++ b/c++/greptime/v1/meta/route.pb.cc @@ -23,35 +23,6 @@ namespace _pbi = _pb::internal; namespace greptime { namespace v1 { namespace meta { -PROTOBUF_CONSTEXPR RouteRequest::RouteRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.table_ids_)*/{} - , /*decltype(_impl_.header_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RouteRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR RouteRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RouteRequestDefaultTypeInternal() {} - union { - RouteRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RouteRequestDefaultTypeInternal _RouteRequest_default_instance_; -PROTOBUF_CONSTEXPR RouteResponse::RouteResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.peers_)*/{} - , /*decltype(_impl_.table_routes_)*/{} - , /*decltype(_impl_.header_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RouteResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RouteResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RouteResponseDefaultTypeInternal() {} - union { - RouteResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RouteResponseDefaultTypeInternal _RouteResponse_default_instance_; PROTOBUF_CONSTEXPR TableRoute::TableRoute( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.region_routes_)*/{} @@ -155,28 +126,11 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT } // namespace meta } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[9]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[7]; static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fmeta_2froute_2eproto = nullptr; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fmeta_2froute_2eproto = nullptr; const uint32_t TableStruct_greptime_2fv1_2fmeta_2froute_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteRequest, _impl_.header_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteRequest, _impl_.table_ids_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteResponse, _impl_.header_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteResponse, _impl_.peers_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RouteResponse, _impl_.table_routes_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::TableRoute, _internal_metadata_), ~0u, // no _extensions_ @@ -241,20 +195,16 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2froute_2eproto::offsets[] PROTO PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::TableRouteValue, _impl_.table_route_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::greptime::v1::meta::RouteRequest)}, - { 8, -1, -1, sizeof(::greptime::v1::meta::RouteResponse)}, - { 17, -1, -1, sizeof(::greptime::v1::meta::TableRoute)}, - { 25, -1, -1, sizeof(::greptime::v1::meta::RegionRoute)}, - { 34, -1, -1, sizeof(::greptime::v1::meta::Table)}, - { 43, 51, -1, sizeof(::greptime::v1::meta::Region_AttrsEntry_DoNotUse)}, - { 53, -1, -1, sizeof(::greptime::v1::meta::Region)}, - { 63, -1, -1, sizeof(::greptime::v1::meta::Partition)}, - { 71, -1, -1, sizeof(::greptime::v1::meta::TableRouteValue)}, + { 0, -1, -1, sizeof(::greptime::v1::meta::TableRoute)}, + { 8, -1, -1, sizeof(::greptime::v1::meta::RegionRoute)}, + { 17, -1, -1, sizeof(::greptime::v1::meta::Table)}, + { 26, 34, -1, sizeof(::greptime::v1::meta::Region_AttrsEntry_DoNotUse)}, + { 36, -1, -1, sizeof(::greptime::v1::meta::Region)}, + { 46, -1, -1, sizeof(::greptime::v1::meta::Partition)}, + { 54, -1, -1, sizeof(::greptime::v1::meta::TableRouteValue)}, }; static const ::_pb::Message* const file_default_instances[] = { - &::greptime::v1::meta::_RouteRequest_default_instance_._instance, - &::greptime::v1::meta::_RouteResponse_default_instance_._instance, &::greptime::v1::meta::_TableRoute_default_instance_._instance, &::greptime::v1::meta::_RegionRoute_default_instance_._instance, &::greptime::v1::meta::_Table_default_instance_._instance, @@ -267,43 +217,34 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_greptime_2fv1_2fmeta_2froute_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\034greptime/v1/meta/route.proto\022\020greptime" ".v1.meta\032\035greptime/v1/meta/common.proto\"" - "m\n\014RouteRequest\022/\n\006header\030\001 \001(\0132\037.grepti" - "me.v1.meta.RequestHeader\022,\n\ttable_ids\030\002 " - "\003(\0132\031.greptime.v1.meta.TableId\"\234\001\n\rRoute" - "Response\0220\n\006header\030\001 \001(\0132 .greptime.v1.m" - "eta.ResponseHeader\022%\n\005peers\030\002 \003(\0132\026.grep" - "time.v1.meta.Peer\0222\n\014table_routes\030\003 \003(\0132" - "\034.greptime.v1.meta.TableRoute\"j\n\nTableRo" - "ute\022&\n\005table\030\001 \001(\0132\027.greptime.v1.meta.Ta" - "ble\0224\n\rregion_routes\030\002 \003(\0132\035.greptime.v1" - ".meta.RegionRoute\"q\n\013RegionRoute\022(\n\006regi" - "on\030\001 \001(\0132\030.greptime.v1.meta.Region\022\031\n\021le" - "ader_peer_index\030\002 \001(\004\022\035\n\025follower_peer_i" - "ndexes\030\003 \003(\004\"Z\n\005Table\022\n\n\002id\030\001 \001(\004\022/\n\ntab" - "le_name\030\002 \001(\0132\033.greptime.v1.meta.TableNa" - "me\022\024\n\014table_schema\030\003 \001(\014\"\264\001\n\006Region\022\n\n\002i" - "d\030\001 \001(\004\022\014\n\004name\030\002 \001(\t\022.\n\tpartition\030\003 \001(\013" - "2\033.greptime.v1.meta.Partition\0222\n\005attrs\030d" - " \003(\0132#.greptime.v1.meta.Region.AttrsEntr" - "y\032,\n\nAttrsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - "\001(\t:\0028\001\"4\n\tPartition\022\023\n\013column_list\030\001 \003(" - "\014\022\022\n\nvalue_list\030\002 \003(\014\"k\n\017TableRouteValue" - "\022%\n\005peers\030\001 \003(\0132\026.greptime.v1.meta.Peer\022" - "1\n\013table_route\030\002 \001(\0132\034.greptime.v1.meta." - "TableRoute2T\n\006Router\022J\n\005Route\022\036.greptime" - ".v1.meta.RouteRequest\032\037.greptime.v1.meta" - ".RouteResponse\"\000B_impl_.header_; -} -void RouteRequest::clear_header() { - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; -} -void RouteRequest::clear_table_ids() { - _impl_.table_ids_.Clear(); -} -RouteRequest::RouteRequest(::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.meta.RouteRequest) -} -RouteRequest::RouteRequest(const RouteRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RouteRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.table_ids_){from._impl_.table_ids_} - , decltype(_impl_.header_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_header()) { - _this->_impl_.header_ = new ::greptime::v1::meta::RequestHeader(*from._impl_.header_); - } - // @@protoc_insertion_point(copy_constructor:greptime.v1.meta.RouteRequest) -} - -inline void RouteRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.table_ids_){arena} - , decltype(_impl_.header_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -RouteRequest::~RouteRequest() { - // @@protoc_insertion_point(destructor:greptime.v1.meta.RouteRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void RouteRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.table_ids_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.header_; -} - -void RouteRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RouteRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:greptime.v1.meta.RouteRequest) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.table_ids_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RouteRequest::_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) { - // .greptime.v1.meta.RequestHeader header = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_header(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .greptime.v1.meta.TableId table_ids = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_table_ids(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(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* RouteRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.meta.RouteRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // .greptime.v1.meta.RequestHeader header = 1; - if (this->_internal_has_header()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::header(this), - _Internal::header(this).GetCachedSize(), target, stream); - } - - // repeated .greptime.v1.meta.TableId table_ids = 2; - for (unsigned i = 0, - n = static_cast(this->_internal_table_ids_size()); i < n; i++) { - const auto& repfield = this->_internal_table_ids(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, 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.meta.RouteRequest) - return target; -} - -size_t RouteRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:greptime.v1.meta.RouteRequest) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .greptime.v1.meta.TableId table_ids = 2; - total_size += 1UL * this->_internal_table_ids_size(); - for (const auto& msg : this->_impl_.table_ids_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // .greptime.v1.meta.RequestHeader header = 1; - if (this->_internal_has_header()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.header_); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RouteRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RouteRequest::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RouteRequest::GetClassData() const { return &_class_data_; } - - -void RouteRequest::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.meta.RouteRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.table_ids_.MergeFrom(from._impl_.table_ids_); - if (from._internal_has_header()) { - _this->_internal_mutable_header()->::greptime::v1::meta::RequestHeader::MergeFrom( - from._internal_header()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void RouteRequest::CopyFrom(const RouteRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.meta.RouteRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool RouteRequest::IsInitialized() const { - return true; -} - -void RouteRequest::InternalSwap(RouteRequest* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.table_ids_.InternalSwap(&other->_impl_.table_ids_); - swap(_impl_.header_, other->_impl_.header_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata RouteRequest::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[0]); -} - -// =================================================================== - -class RouteResponse::_Internal { - public: - static const ::greptime::v1::meta::ResponseHeader& header(const RouteResponse* msg); -}; - -const ::greptime::v1::meta::ResponseHeader& -RouteResponse::_Internal::header(const RouteResponse* msg) { - return *msg->_impl_.header_; -} -void RouteResponse::clear_header() { - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; -} -void RouteResponse::clear_peers() { - _impl_.peers_.Clear(); -} -RouteResponse::RouteResponse(::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.meta.RouteResponse) -} -RouteResponse::RouteResponse(const RouteResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RouteResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.peers_){from._impl_.peers_} - , decltype(_impl_.table_routes_){from._impl_.table_routes_} - , decltype(_impl_.header_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_header()) { - _this->_impl_.header_ = new ::greptime::v1::meta::ResponseHeader(*from._impl_.header_); - } - // @@protoc_insertion_point(copy_constructor:greptime.v1.meta.RouteResponse) -} - -inline void RouteResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.peers_){arena} - , decltype(_impl_.table_routes_){arena} - , decltype(_impl_.header_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -RouteResponse::~RouteResponse() { - // @@protoc_insertion_point(destructor:greptime.v1.meta.RouteResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void RouteResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.peers_.~RepeatedPtrField(); - _impl_.table_routes_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.header_; -} - -void RouteResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RouteResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:greptime.v1.meta.RouteResponse) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.peers_.Clear(); - _impl_.table_routes_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RouteResponse::_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) { - // .greptime.v1.meta.ResponseHeader header = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_header(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .greptime.v1.meta.Peer peers = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_peers(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - // repeated .greptime.v1.meta.TableRoute table_routes = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_table_routes(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(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* RouteResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.meta.RouteResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // .greptime.v1.meta.ResponseHeader header = 1; - if (this->_internal_has_header()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::header(this), - _Internal::header(this).GetCachedSize(), target, stream); - } - - // repeated .greptime.v1.meta.Peer peers = 2; - for (unsigned i = 0, - n = static_cast(this->_internal_peers_size()); i < n; i++) { - const auto& repfield = this->_internal_peers(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); - } - - // repeated .greptime.v1.meta.TableRoute table_routes = 3; - for (unsigned i = 0, - n = static_cast(this->_internal_table_routes_size()); i < n; i++) { - const auto& repfield = this->_internal_table_routes(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, 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.meta.RouteResponse) - return target; -} - -size_t RouteResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:greptime.v1.meta.RouteResponse) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .greptime.v1.meta.Peer peers = 2; - total_size += 1UL * this->_internal_peers_size(); - for (const auto& msg : this->_impl_.peers_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // repeated .greptime.v1.meta.TableRoute table_routes = 3; - total_size += 1UL * this->_internal_table_routes_size(); - for (const auto& msg : this->_impl_.table_routes_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // .greptime.v1.meta.ResponseHeader header = 1; - if (this->_internal_has_header()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.header_); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RouteResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RouteResponse::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RouteResponse::GetClassData() const { return &_class_data_; } - - -void RouteResponse::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.meta.RouteResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.peers_.MergeFrom(from._impl_.peers_); - _this->_impl_.table_routes_.MergeFrom(from._impl_.table_routes_); - if (from._internal_has_header()) { - _this->_internal_mutable_header()->::greptime::v1::meta::ResponseHeader::MergeFrom( - from._internal_header()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void RouteResponse::CopyFrom(const RouteResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.meta.RouteResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool RouteResponse::IsInitialized() const { - return true; -} - -void RouteResponse::InternalSwap(RouteResponse* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.peers_.InternalSwap(&other->_impl_.peers_); - _impl_.table_routes_.InternalSwap(&other->_impl_.table_routes_); - swap(_impl_.header_, other->_impl_.header_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata RouteResponse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[1]); -} - -// =================================================================== - class TableRoute::_Internal { public: static const ::greptime::v1::meta::Table& table(const TableRoute* msg); @@ -1048,7 +483,7 @@ void TableRoute::InternalSwap(TableRoute* other) { ::PROTOBUF_NAMESPACE_ID::Metadata TableRoute::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[2]); + file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[0]); } // =================================================================== @@ -1314,7 +749,7 @@ void RegionRoute::InternalSwap(RegionRoute* other) { ::PROTOBUF_NAMESPACE_ID::Metadata RegionRoute::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[3]); + file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[1]); } // =================================================================== @@ -1591,7 +1026,7 @@ void Table::InternalSwap(Table* other) { ::PROTOBUF_NAMESPACE_ID::Metadata Table::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[4]); + file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[2]); } // =================================================================== @@ -1605,7 +1040,7 @@ void Region_AttrsEntry_DoNotUse::MergeFrom(const Region_AttrsEntry_DoNotUse& oth ::PROTOBUF_NAMESPACE_ID::Metadata Region_AttrsEntry_DoNotUse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[5]); + file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[3]); } // =================================================================== @@ -1949,7 +1384,7 @@ void Region::InternalSwap(Region* other) { ::PROTOBUF_NAMESPACE_ID::Metadata Region::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[6]); + file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[4]); } // =================================================================== @@ -2168,7 +1603,7 @@ void Partition::InternalSwap(Partition* other) { ::PROTOBUF_NAMESPACE_ID::Metadata Partition::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[7]); + file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[5]); } // =================================================================== @@ -2398,7 +1833,7 @@ void TableRouteValue::InternalSwap(TableRouteValue* other) { ::PROTOBUF_NAMESPACE_ID::Metadata TableRouteValue::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2froute_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[8]); + file_level_metadata_greptime_2fv1_2fmeta_2froute_2eproto[6]); } // @@protoc_insertion_point(namespace_scope) @@ -2406,14 +1841,6 @@ ::PROTOBUF_NAMESPACE_ID::Metadata TableRouteValue::GetMetadata() const { } // namespace v1 } // namespace greptime PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::greptime::v1::meta::RouteRequest* -Arena::CreateMaybeMessage< ::greptime::v1::meta::RouteRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::greptime::v1::meta::RouteRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::greptime::v1::meta::RouteResponse* -Arena::CreateMaybeMessage< ::greptime::v1::meta::RouteResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::greptime::v1::meta::RouteResponse >(arena); -} template<> PROTOBUF_NOINLINE ::greptime::v1::meta::TableRoute* Arena::CreateMaybeMessage< ::greptime::v1::meta::TableRoute >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::meta::TableRoute >(arena); diff --git a/c++/greptime/v1/meta/route.pb.h b/c++/greptime/v1/meta/route.pb.h index cf0f96e0..7f3c514c 100644 --- a/c++/greptime/v1/meta/route.pb.h +++ b/c++/greptime/v1/meta/route.pb.h @@ -63,12 +63,6 @@ extern RegionRouteDefaultTypeInternal _RegionRoute_default_instance_; class Region_AttrsEntry_DoNotUse; struct Region_AttrsEntry_DoNotUseDefaultTypeInternal; extern Region_AttrsEntry_DoNotUseDefaultTypeInternal _Region_AttrsEntry_DoNotUse_default_instance_; -class RouteRequest; -struct RouteRequestDefaultTypeInternal; -extern RouteRequestDefaultTypeInternal _RouteRequest_default_instance_; -class RouteResponse; -struct RouteResponseDefaultTypeInternal; -extern RouteResponseDefaultTypeInternal _RouteResponse_default_instance_; class Table; struct TableDefaultTypeInternal; extern TableDefaultTypeInternal _Table_default_instance_; @@ -86,8 +80,6 @@ template<> ::greptime::v1::meta::Partition* Arena::CreateMaybeMessage<::greptime template<> ::greptime::v1::meta::Region* Arena::CreateMaybeMessage<::greptime::v1::meta::Region>(Arena*); template<> ::greptime::v1::meta::RegionRoute* Arena::CreateMaybeMessage<::greptime::v1::meta::RegionRoute>(Arena*); template<> ::greptime::v1::meta::Region_AttrsEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::meta::Region_AttrsEntry_DoNotUse>(Arena*); -template<> ::greptime::v1::meta::RouteRequest* Arena::CreateMaybeMessage<::greptime::v1::meta::RouteRequest>(Arena*); -template<> ::greptime::v1::meta::RouteResponse* Arena::CreateMaybeMessage<::greptime::v1::meta::RouteResponse>(Arena*); template<> ::greptime::v1::meta::Table* Arena::CreateMaybeMessage<::greptime::v1::meta::Table>(Arena*); template<> ::greptime::v1::meta::TableRoute* Arena::CreateMaybeMessage<::greptime::v1::meta::TableRoute>(Arena*); template<> ::greptime::v1::meta::TableRouteValue* Arena::CreateMaybeMessage<::greptime::v1::meta::TableRouteValue>(Arena*); @@ -98,380 +90,6 @@ namespace meta { // =================================================================== -class RouteRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.RouteRequest) */ { - public: - inline RouteRequest() : RouteRequest(nullptr) {} - ~RouteRequest() override; - explicit PROTOBUF_CONSTEXPR RouteRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - RouteRequest(const RouteRequest& from); - RouteRequest(RouteRequest&& from) noexcept - : RouteRequest() { - *this = ::std::move(from); - } - - inline RouteRequest& operator=(const RouteRequest& from) { - CopyFrom(from); - return *this; - } - inline RouteRequest& operator=(RouteRequest&& 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 RouteRequest& default_instance() { - return *internal_default_instance(); - } - static inline const RouteRequest* internal_default_instance() { - return reinterpret_cast( - &_RouteRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(RouteRequest& a, RouteRequest& b) { - a.Swap(&b); - } - inline void Swap(RouteRequest* 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(RouteRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - RouteRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RouteRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RouteRequest& from) { - RouteRequest::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(RouteRequest* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "greptime.v1.meta.RouteRequest"; - } - protected: - explicit RouteRequest(::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 { - kTableIdsFieldNumber = 2, - kHeaderFieldNumber = 1, - }; - // repeated .greptime.v1.meta.TableId table_ids = 2; - int table_ids_size() const; - private: - int _internal_table_ids_size() const; - public: - void clear_table_ids(); - ::greptime::v1::meta::TableId* mutable_table_ids(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableId >* - mutable_table_ids(); - private: - const ::greptime::v1::meta::TableId& _internal_table_ids(int index) const; - ::greptime::v1::meta::TableId* _internal_add_table_ids(); - public: - const ::greptime::v1::meta::TableId& table_ids(int index) const; - ::greptime::v1::meta::TableId* add_table_ids(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableId >& - table_ids() const; - - // .greptime.v1.meta.RequestHeader header = 1; - bool has_header() const; - private: - bool _internal_has_header() const; - public: - void clear_header(); - const ::greptime::v1::meta::RequestHeader& header() const; - PROTOBUF_NODISCARD ::greptime::v1::meta::RequestHeader* release_header(); - ::greptime::v1::meta::RequestHeader* mutable_header(); - void set_allocated_header(::greptime::v1::meta::RequestHeader* header); - private: - const ::greptime::v1::meta::RequestHeader& _internal_header() const; - ::greptime::v1::meta::RequestHeader* _internal_mutable_header(); - public: - void unsafe_arena_set_allocated_header( - ::greptime::v1::meta::RequestHeader* header); - ::greptime::v1::meta::RequestHeader* unsafe_arena_release_header(); - - // @@protoc_insertion_point(class_scope:greptime.v1.meta.RouteRequest) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableId > table_ids_; - ::greptime::v1::meta::RequestHeader* header_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_greptime_2fv1_2fmeta_2froute_2eproto; -}; -// ------------------------------------------------------------------- - -class RouteResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.RouteResponse) */ { - public: - inline RouteResponse() : RouteResponse(nullptr) {} - ~RouteResponse() override; - explicit PROTOBUF_CONSTEXPR RouteResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - RouteResponse(const RouteResponse& from); - RouteResponse(RouteResponse&& from) noexcept - : RouteResponse() { - *this = ::std::move(from); - } - - inline RouteResponse& operator=(const RouteResponse& from) { - CopyFrom(from); - return *this; - } - inline RouteResponse& operator=(RouteResponse&& 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 RouteResponse& default_instance() { - return *internal_default_instance(); - } - static inline const RouteResponse* internal_default_instance() { - return reinterpret_cast( - &_RouteResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(RouteResponse& a, RouteResponse& b) { - a.Swap(&b); - } - inline void Swap(RouteResponse* 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(RouteResponse* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - RouteResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RouteResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RouteResponse& from) { - RouteResponse::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(RouteResponse* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "greptime.v1.meta.RouteResponse"; - } - protected: - explicit RouteResponse(::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 { - kPeersFieldNumber = 2, - kTableRoutesFieldNumber = 3, - kHeaderFieldNumber = 1, - }; - // repeated .greptime.v1.meta.Peer peers = 2; - int peers_size() const; - private: - int _internal_peers_size() const; - public: - void clear_peers(); - ::greptime::v1::meta::Peer* mutable_peers(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::Peer >* - mutable_peers(); - private: - const ::greptime::v1::meta::Peer& _internal_peers(int index) const; - ::greptime::v1::meta::Peer* _internal_add_peers(); - public: - const ::greptime::v1::meta::Peer& peers(int index) const; - ::greptime::v1::meta::Peer* add_peers(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::Peer >& - peers() const; - - // repeated .greptime.v1.meta.TableRoute table_routes = 3; - int table_routes_size() const; - private: - int _internal_table_routes_size() const; - public: - void clear_table_routes(); - ::greptime::v1::meta::TableRoute* mutable_table_routes(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableRoute >* - mutable_table_routes(); - private: - const ::greptime::v1::meta::TableRoute& _internal_table_routes(int index) const; - ::greptime::v1::meta::TableRoute* _internal_add_table_routes(); - public: - const ::greptime::v1::meta::TableRoute& table_routes(int index) const; - ::greptime::v1::meta::TableRoute* add_table_routes(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableRoute >& - table_routes() const; - - // .greptime.v1.meta.ResponseHeader header = 1; - bool has_header() const; - private: - bool _internal_has_header() const; - public: - void clear_header(); - const ::greptime::v1::meta::ResponseHeader& header() const; - PROTOBUF_NODISCARD ::greptime::v1::meta::ResponseHeader* release_header(); - ::greptime::v1::meta::ResponseHeader* mutable_header(); - void set_allocated_header(::greptime::v1::meta::ResponseHeader* header); - private: - const ::greptime::v1::meta::ResponseHeader& _internal_header() const; - ::greptime::v1::meta::ResponseHeader* _internal_mutable_header(); - public: - void unsafe_arena_set_allocated_header( - ::greptime::v1::meta::ResponseHeader* header); - ::greptime::v1::meta::ResponseHeader* unsafe_arena_release_header(); - - // @@protoc_insertion_point(class_scope:greptime.v1.meta.RouteResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::Peer > peers_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableRoute > table_routes_; - ::greptime::v1::meta::ResponseHeader* header_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_greptime_2fv1_2fmeta_2froute_2eproto; -}; -// ------------------------------------------------------------------- - class TableRoute final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.TableRoute) */ { public: @@ -520,7 +138,7 @@ class TableRoute final : &_TableRoute_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 0; friend void swap(TableRoute& a, TableRoute& b) { a.Swap(&b); @@ -697,7 +315,7 @@ class RegionRoute final : &_RegionRoute_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 1; friend void swap(RegionRoute& a, RegionRoute& b) { a.Swap(&b); @@ -890,7 +508,7 @@ class Table final : &_Table_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 2; friend void swap(Table& a, Table& b) { a.Swap(&b); @@ -1102,7 +720,7 @@ class Region final : &_Region_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 4; friend void swap(Region& a, Region& b) { a.Swap(&b); @@ -1312,7 +930,7 @@ class Partition final : &_Partition_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 5; friend void swap(Partition& a, Partition& b) { a.Swap(&b); @@ -1501,7 +1119,7 @@ class TableRouteValue final : &_TableRouteValue_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 6; friend void swap(TableRouteValue& a, TableRouteValue& b) { a.Swap(&b); @@ -1637,298 +1255,6 @@ class TableRouteValue final : #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ -// RouteRequest - -// .greptime.v1.meta.RequestHeader header = 1; -inline bool RouteRequest::_internal_has_header() const { - return this != internal_default_instance() && _impl_.header_ != nullptr; -} -inline bool RouteRequest::has_header() const { - return _internal_has_header(); -} -inline const ::greptime::v1::meta::RequestHeader& RouteRequest::_internal_header() const { - const ::greptime::v1::meta::RequestHeader* p = _impl_.header_; - return p != nullptr ? *p : reinterpret_cast( - ::greptime::v1::meta::_RequestHeader_default_instance_); -} -inline const ::greptime::v1::meta::RequestHeader& RouteRequest::header() const { - // @@protoc_insertion_point(field_get:greptime.v1.meta.RouteRequest.header) - return _internal_header(); -} -inline void RouteRequest::unsafe_arena_set_allocated_header( - ::greptime::v1::meta::RequestHeader* header) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_); - } - _impl_.header_ = header; - if (header) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.meta.RouteRequest.header) -} -inline ::greptime::v1::meta::RequestHeader* RouteRequest::release_header() { - - ::greptime::v1::meta::RequestHeader* temp = _impl_.header_; - _impl_.header_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::greptime::v1::meta::RequestHeader* RouteRequest::unsafe_arena_release_header() { - // @@protoc_insertion_point(field_release:greptime.v1.meta.RouteRequest.header) - - ::greptime::v1::meta::RequestHeader* temp = _impl_.header_; - _impl_.header_ = nullptr; - return temp; -} -inline ::greptime::v1::meta::RequestHeader* RouteRequest::_internal_mutable_header() { - - if (_impl_.header_ == nullptr) { - auto* p = CreateMaybeMessage<::greptime::v1::meta::RequestHeader>(GetArenaForAllocation()); - _impl_.header_ = p; - } - return _impl_.header_; -} -inline ::greptime::v1::meta::RequestHeader* RouteRequest::mutable_header() { - ::greptime::v1::meta::RequestHeader* _msg = _internal_mutable_header(); - // @@protoc_insertion_point(field_mutable:greptime.v1.meta.RouteRequest.header) - return _msg; -} -inline void RouteRequest::set_allocated_header(::greptime::v1::meta::RequestHeader* header) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_); - } - if (header) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header)); - if (message_arena != submessage_arena) { - header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, header, submessage_arena); - } - - } else { - - } - _impl_.header_ = header; - // @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.RouteRequest.header) -} - -// repeated .greptime.v1.meta.TableId table_ids = 2; -inline int RouteRequest::_internal_table_ids_size() const { - return _impl_.table_ids_.size(); -} -inline int RouteRequest::table_ids_size() const { - return _internal_table_ids_size(); -} -inline ::greptime::v1::meta::TableId* RouteRequest::mutable_table_ids(int index) { - // @@protoc_insertion_point(field_mutable:greptime.v1.meta.RouteRequest.table_ids) - return _impl_.table_ids_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableId >* -RouteRequest::mutable_table_ids() { - // @@protoc_insertion_point(field_mutable_list:greptime.v1.meta.RouteRequest.table_ids) - return &_impl_.table_ids_; -} -inline const ::greptime::v1::meta::TableId& RouteRequest::_internal_table_ids(int index) const { - return _impl_.table_ids_.Get(index); -} -inline const ::greptime::v1::meta::TableId& RouteRequest::table_ids(int index) const { - // @@protoc_insertion_point(field_get:greptime.v1.meta.RouteRequest.table_ids) - return _internal_table_ids(index); -} -inline ::greptime::v1::meta::TableId* RouteRequest::_internal_add_table_ids() { - return _impl_.table_ids_.Add(); -} -inline ::greptime::v1::meta::TableId* RouteRequest::add_table_ids() { - ::greptime::v1::meta::TableId* _add = _internal_add_table_ids(); - // @@protoc_insertion_point(field_add:greptime.v1.meta.RouteRequest.table_ids) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableId >& -RouteRequest::table_ids() const { - // @@protoc_insertion_point(field_list:greptime.v1.meta.RouteRequest.table_ids) - return _impl_.table_ids_; -} - -// ------------------------------------------------------------------- - -// RouteResponse - -// .greptime.v1.meta.ResponseHeader header = 1; -inline bool RouteResponse::_internal_has_header() const { - return this != internal_default_instance() && _impl_.header_ != nullptr; -} -inline bool RouteResponse::has_header() const { - return _internal_has_header(); -} -inline const ::greptime::v1::meta::ResponseHeader& RouteResponse::_internal_header() const { - const ::greptime::v1::meta::ResponseHeader* p = _impl_.header_; - return p != nullptr ? *p : reinterpret_cast( - ::greptime::v1::meta::_ResponseHeader_default_instance_); -} -inline const ::greptime::v1::meta::ResponseHeader& RouteResponse::header() const { - // @@protoc_insertion_point(field_get:greptime.v1.meta.RouteResponse.header) - return _internal_header(); -} -inline void RouteResponse::unsafe_arena_set_allocated_header( - ::greptime::v1::meta::ResponseHeader* header) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_); - } - _impl_.header_ = header; - if (header) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.meta.RouteResponse.header) -} -inline ::greptime::v1::meta::ResponseHeader* RouteResponse::release_header() { - - ::greptime::v1::meta::ResponseHeader* temp = _impl_.header_; - _impl_.header_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::greptime::v1::meta::ResponseHeader* RouteResponse::unsafe_arena_release_header() { - // @@protoc_insertion_point(field_release:greptime.v1.meta.RouteResponse.header) - - ::greptime::v1::meta::ResponseHeader* temp = _impl_.header_; - _impl_.header_ = nullptr; - return temp; -} -inline ::greptime::v1::meta::ResponseHeader* RouteResponse::_internal_mutable_header() { - - if (_impl_.header_ == nullptr) { - auto* p = CreateMaybeMessage<::greptime::v1::meta::ResponseHeader>(GetArenaForAllocation()); - _impl_.header_ = p; - } - return _impl_.header_; -} -inline ::greptime::v1::meta::ResponseHeader* RouteResponse::mutable_header() { - ::greptime::v1::meta::ResponseHeader* _msg = _internal_mutable_header(); - // @@protoc_insertion_point(field_mutable:greptime.v1.meta.RouteResponse.header) - return _msg; -} -inline void RouteResponse::set_allocated_header(::greptime::v1::meta::ResponseHeader* header) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_); - } - if (header) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header)); - if (message_arena != submessage_arena) { - header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, header, submessage_arena); - } - - } else { - - } - _impl_.header_ = header; - // @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.RouteResponse.header) -} - -// repeated .greptime.v1.meta.Peer peers = 2; -inline int RouteResponse::_internal_peers_size() const { - return _impl_.peers_.size(); -} -inline int RouteResponse::peers_size() const { - return _internal_peers_size(); -} -inline ::greptime::v1::meta::Peer* RouteResponse::mutable_peers(int index) { - // @@protoc_insertion_point(field_mutable:greptime.v1.meta.RouteResponse.peers) - return _impl_.peers_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::Peer >* -RouteResponse::mutable_peers() { - // @@protoc_insertion_point(field_mutable_list:greptime.v1.meta.RouteResponse.peers) - return &_impl_.peers_; -} -inline const ::greptime::v1::meta::Peer& RouteResponse::_internal_peers(int index) const { - return _impl_.peers_.Get(index); -} -inline const ::greptime::v1::meta::Peer& RouteResponse::peers(int index) const { - // @@protoc_insertion_point(field_get:greptime.v1.meta.RouteResponse.peers) - return _internal_peers(index); -} -inline ::greptime::v1::meta::Peer* RouteResponse::_internal_add_peers() { - return _impl_.peers_.Add(); -} -inline ::greptime::v1::meta::Peer* RouteResponse::add_peers() { - ::greptime::v1::meta::Peer* _add = _internal_add_peers(); - // @@protoc_insertion_point(field_add:greptime.v1.meta.RouteResponse.peers) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::Peer >& -RouteResponse::peers() const { - // @@protoc_insertion_point(field_list:greptime.v1.meta.RouteResponse.peers) - return _impl_.peers_; -} - -// repeated .greptime.v1.meta.TableRoute table_routes = 3; -inline int RouteResponse::_internal_table_routes_size() const { - return _impl_.table_routes_.size(); -} -inline int RouteResponse::table_routes_size() const { - return _internal_table_routes_size(); -} -inline void RouteResponse::clear_table_routes() { - _impl_.table_routes_.Clear(); -} -inline ::greptime::v1::meta::TableRoute* RouteResponse::mutable_table_routes(int index) { - // @@protoc_insertion_point(field_mutable:greptime.v1.meta.RouteResponse.table_routes) - return _impl_.table_routes_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableRoute >* -RouteResponse::mutable_table_routes() { - // @@protoc_insertion_point(field_mutable_list:greptime.v1.meta.RouteResponse.table_routes) - return &_impl_.table_routes_; -} -inline const ::greptime::v1::meta::TableRoute& RouteResponse::_internal_table_routes(int index) const { - return _impl_.table_routes_.Get(index); -} -inline const ::greptime::v1::meta::TableRoute& RouteResponse::table_routes(int index) const { - // @@protoc_insertion_point(field_get:greptime.v1.meta.RouteResponse.table_routes) - return _internal_table_routes(index); -} -inline ::greptime::v1::meta::TableRoute* RouteResponse::_internal_add_table_routes() { - return _impl_.table_routes_.Add(); -} -inline ::greptime::v1::meta::TableRoute* RouteResponse::add_table_routes() { - ::greptime::v1::meta::TableRoute* _add = _internal_add_table_routes(); - // @@protoc_insertion_point(field_add:greptime.v1.meta.RouteResponse.table_routes) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::meta::TableRoute >& -RouteResponse::table_routes() const { - // @@protoc_insertion_point(field_list:greptime.v1.meta.RouteResponse.table_routes) - return _impl_.table_routes_; -} - -// ------------------------------------------------------------------- - // TableRoute // .greptime.v1.meta.Table table = 1; @@ -2876,10 +2202,6 @@ inline void TableRouteValue::set_allocated_table_route(::greptime::v1::meta::Tab // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) diff --git a/go/greptime/v1/meta/route.pb.go b/go/greptime/v1/meta/route.pb.go index b0d1a4cd..dc5dd029 100644 --- a/go/greptime/v1/meta/route.pb.go +++ b/go/greptime/v1/meta/route.pb.go @@ -34,124 +34,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type RouteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - TableIds []*TableId `protobuf:"bytes,2,rep,name=table_ids,json=tableIds,proto3" json:"table_ids,omitempty"` -} - -func (x *RouteRequest) Reset() { - *x = RouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteRequest) ProtoMessage() {} - -func (x *RouteRequest) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteRequest.ProtoReflect.Descriptor instead. -func (*RouteRequest) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{0} -} - -func (x *RouteRequest) GetHeader() *RequestHeader { - if x != nil { - return x.Header - } - return nil -} - -func (x *RouteRequest) GetTableIds() []*TableId { - if x != nil { - return x.TableIds - } - return nil -} - -type RouteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Peers []*Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` - TableRoutes []*TableRoute `protobuf:"bytes,3,rep,name=table_routes,json=tableRoutes,proto3" json:"table_routes,omitempty"` -} - -func (x *RouteResponse) Reset() { - *x = RouteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteResponse) ProtoMessage() {} - -func (x *RouteResponse) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteResponse.ProtoReflect.Descriptor instead. -func (*RouteResponse) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{1} -} - -func (x *RouteResponse) GetHeader() *ResponseHeader { - if x != nil { - return x.Header - } - return nil -} - -func (x *RouteResponse) GetPeers() []*Peer { - if x != nil { - return x.Peers - } - return nil -} - -func (x *RouteResponse) GetTableRoutes() []*TableRoute { - if x != nil { - return x.TableRoutes - } - return nil -} - type TableRoute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -164,7 +46,7 @@ type TableRoute struct { func (x *TableRoute) Reset() { *x = TableRoute{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[2] + mi := &file_greptime_v1_meta_route_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -177,7 +59,7 @@ func (x *TableRoute) String() string { func (*TableRoute) ProtoMessage() {} func (x *TableRoute) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[2] + mi := &file_greptime_v1_meta_route_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -190,7 +72,7 @@ func (x *TableRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use TableRoute.ProtoReflect.Descriptor instead. func (*TableRoute) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{2} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{0} } func (x *TableRoute) GetTable() *Table { @@ -222,7 +104,7 @@ type RegionRoute struct { func (x *RegionRoute) Reset() { *x = RegionRoute{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[3] + mi := &file_greptime_v1_meta_route_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -235,7 +117,7 @@ func (x *RegionRoute) String() string { func (*RegionRoute) ProtoMessage() {} func (x *RegionRoute) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[3] + mi := &file_greptime_v1_meta_route_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -248,7 +130,7 @@ func (x *RegionRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use RegionRoute.ProtoReflect.Descriptor instead. func (*RegionRoute) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{3} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{1} } func (x *RegionRoute) GetRegion() *Region { @@ -285,7 +167,7 @@ type Table struct { func (x *Table) Reset() { *x = Table{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[4] + mi := &file_greptime_v1_meta_route_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -298,7 +180,7 @@ func (x *Table) String() string { func (*Table) ProtoMessage() {} func (x *Table) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[4] + mi := &file_greptime_v1_meta_route_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -311,7 +193,7 @@ func (x *Table) ProtoReflect() protoreflect.Message { // Deprecated: Use Table.ProtoReflect.Descriptor instead. func (*Table) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{4} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{2} } func (x *Table) GetId() uint64 { @@ -350,7 +232,7 @@ type Region struct { func (x *Region) Reset() { *x = Region{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[5] + mi := &file_greptime_v1_meta_route_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -363,7 +245,7 @@ func (x *Region) String() string { func (*Region) ProtoMessage() {} func (x *Region) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[5] + mi := &file_greptime_v1_meta_route_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -376,7 +258,7 @@ func (x *Region) ProtoReflect() protoreflect.Message { // Deprecated: Use Region.ProtoReflect.Descriptor instead. func (*Region) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{5} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{3} } func (x *Region) GetId() uint64 { @@ -420,7 +302,7 @@ type Partition struct { func (x *Partition) Reset() { *x = Partition{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[6] + mi := &file_greptime_v1_meta_route_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -433,7 +315,7 @@ func (x *Partition) String() string { func (*Partition) ProtoMessage() {} func (x *Partition) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[6] + mi := &file_greptime_v1_meta_route_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -446,7 +328,7 @@ func (x *Partition) ProtoReflect() protoreflect.Message { // Deprecated: Use Partition.ProtoReflect.Descriptor instead. func (*Partition) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{6} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{4} } func (x *Partition) GetColumnList() [][]byte { @@ -464,6 +346,7 @@ func (x *Partition) GetValueList() [][]byte { } // This message is only for saving into store. +// TODO(weny): Remove it, Now, the upgrade tool is still dependent on it. type TableRouteValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -476,7 +359,7 @@ type TableRouteValue struct { func (x *TableRouteValue) Reset() { *x = TableRouteValue{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_route_proto_msgTypes[7] + mi := &file_greptime_v1_meta_route_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -489,7 +372,7 @@ func (x *TableRouteValue) String() string { func (*TableRouteValue) ProtoMessage() {} func (x *TableRouteValue) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_route_proto_msgTypes[7] + mi := &file_greptime_v1_meta_route_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -502,7 +385,7 @@ func (x *TableRouteValue) ProtoReflect() protoreflect.Message { // Deprecated: Use TableRouteValue.ProtoReflect.Descriptor instead. func (*TableRouteValue) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{7} + return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{5} } func (x *TableRouteValue) GetPeers() []*Peer { @@ -527,88 +410,63 @@ var file_greptime_v1_meta_route_proto_rawDesc = []byte{ 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x7f, 0x0a, 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, - 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, - 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x52, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x73, - 0x22, 0xb8, 0x01, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x05, - 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, - 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, - 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, - 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0b, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x7f, 0x0a, 0x0a, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, - 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0c, - 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x9f, 0x01, 0x0a, - 0x0b, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x06, - 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, + 0x7f, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x2d, 0x0a, + 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, - 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x2a, - 0x0a, 0x11, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x6f, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x13, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, - 0x77, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x22, 0x76, - 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, - 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xdc, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, 0x6f, - 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x61, 0x72, 0x74, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x39, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x64, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, - 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x41, - 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, - 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69, - 0x73, 0x74, 0x22, 0x7e, 0x0a, 0x0f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, - 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x32, 0x54, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x05, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, - 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, - 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x42, 0x0a, 0x0d, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, + 0x22, 0x9f, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x12, 0x30, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, + 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, + 0x0a, 0x15, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x13, 0x66, + 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x65, 0x73, 0x22, 0x76, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, + 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xdc, 0x01, 0x0a, 0x06, 0x52, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x64, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, + 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a, + 0x38, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x7e, 0x0a, 0x0f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x65, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, + 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, + 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, + 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -623,44 +481,32 @@ func file_greptime_v1_meta_route_proto_rawDescGZIP() []byte { return file_greptime_v1_meta_route_proto_rawDescData } -var file_greptime_v1_meta_route_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_greptime_v1_meta_route_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_greptime_v1_meta_route_proto_goTypes = []interface{}{ - (*RouteRequest)(nil), // 0: greptime.v1.meta.RouteRequest - (*RouteResponse)(nil), // 1: greptime.v1.meta.RouteResponse - (*TableRoute)(nil), // 2: greptime.v1.meta.TableRoute - (*RegionRoute)(nil), // 3: greptime.v1.meta.RegionRoute - (*Table)(nil), // 4: greptime.v1.meta.Table - (*Region)(nil), // 5: greptime.v1.meta.Region - (*Partition)(nil), // 6: greptime.v1.meta.Partition - (*TableRouteValue)(nil), // 7: greptime.v1.meta.TableRouteValue - nil, // 8: greptime.v1.meta.Region.AttrsEntry - (*RequestHeader)(nil), // 9: greptime.v1.meta.RequestHeader - (*TableId)(nil), // 10: greptime.v1.meta.TableId - (*ResponseHeader)(nil), // 11: greptime.v1.meta.ResponseHeader - (*Peer)(nil), // 12: greptime.v1.meta.Peer - (*TableName)(nil), // 13: greptime.v1.meta.TableName + (*TableRoute)(nil), // 0: greptime.v1.meta.TableRoute + (*RegionRoute)(nil), // 1: greptime.v1.meta.RegionRoute + (*Table)(nil), // 2: greptime.v1.meta.Table + (*Region)(nil), // 3: greptime.v1.meta.Region + (*Partition)(nil), // 4: greptime.v1.meta.Partition + (*TableRouteValue)(nil), // 5: greptime.v1.meta.TableRouteValue + nil, // 6: greptime.v1.meta.Region.AttrsEntry + (*TableName)(nil), // 7: greptime.v1.meta.TableName + (*Peer)(nil), // 8: greptime.v1.meta.Peer } var file_greptime_v1_meta_route_proto_depIdxs = []int32{ - 9, // 0: greptime.v1.meta.RouteRequest.header:type_name -> greptime.v1.meta.RequestHeader - 10, // 1: greptime.v1.meta.RouteRequest.table_ids:type_name -> greptime.v1.meta.TableId - 11, // 2: greptime.v1.meta.RouteResponse.header:type_name -> greptime.v1.meta.ResponseHeader - 12, // 3: greptime.v1.meta.RouteResponse.peers:type_name -> greptime.v1.meta.Peer - 2, // 4: greptime.v1.meta.RouteResponse.table_routes:type_name -> greptime.v1.meta.TableRoute - 4, // 5: greptime.v1.meta.TableRoute.table:type_name -> greptime.v1.meta.Table - 3, // 6: greptime.v1.meta.TableRoute.region_routes:type_name -> greptime.v1.meta.RegionRoute - 5, // 7: greptime.v1.meta.RegionRoute.region:type_name -> greptime.v1.meta.Region - 13, // 8: greptime.v1.meta.Table.table_name:type_name -> greptime.v1.meta.TableName - 6, // 9: greptime.v1.meta.Region.partition:type_name -> greptime.v1.meta.Partition - 8, // 10: greptime.v1.meta.Region.attrs:type_name -> greptime.v1.meta.Region.AttrsEntry - 12, // 11: greptime.v1.meta.TableRouteValue.peers:type_name -> greptime.v1.meta.Peer - 2, // 12: greptime.v1.meta.TableRouteValue.table_route:type_name -> greptime.v1.meta.TableRoute - 0, // 13: greptime.v1.meta.Router.Route:input_type -> greptime.v1.meta.RouteRequest - 1, // 14: greptime.v1.meta.Router.Route:output_type -> greptime.v1.meta.RouteResponse - 14, // [14:15] is the sub-list for method output_type - 13, // [13:14] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 2, // 0: greptime.v1.meta.TableRoute.table:type_name -> greptime.v1.meta.Table + 1, // 1: greptime.v1.meta.TableRoute.region_routes:type_name -> greptime.v1.meta.RegionRoute + 3, // 2: greptime.v1.meta.RegionRoute.region:type_name -> greptime.v1.meta.Region + 7, // 3: greptime.v1.meta.Table.table_name:type_name -> greptime.v1.meta.TableName + 4, // 4: greptime.v1.meta.Region.partition:type_name -> greptime.v1.meta.Partition + 6, // 5: greptime.v1.meta.Region.attrs:type_name -> greptime.v1.meta.Region.AttrsEntry + 8, // 6: greptime.v1.meta.TableRouteValue.peers:type_name -> greptime.v1.meta.Peer + 0, // 7: greptime.v1.meta.TableRouteValue.table_route:type_name -> greptime.v1.meta.TableRoute + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_greptime_v1_meta_route_proto_init() } @@ -671,30 +517,6 @@ func file_greptime_v1_meta_route_proto_init() { file_greptime_v1_meta_common_proto_init() if !protoimpl.UnsafeEnabled { file_greptime_v1_meta_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_greptime_v1_meta_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_greptime_v1_meta_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TableRoute); i { case 0: return &v.state @@ -706,7 +528,7 @@ func file_greptime_v1_meta_route_proto_init() { return nil } } - file_greptime_v1_meta_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_greptime_v1_meta_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegionRoute); i { case 0: return &v.state @@ -718,7 +540,7 @@ func file_greptime_v1_meta_route_proto_init() { return nil } } - file_greptime_v1_meta_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_greptime_v1_meta_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Table); i { case 0: return &v.state @@ -730,7 +552,7 @@ func file_greptime_v1_meta_route_proto_init() { return nil } } - file_greptime_v1_meta_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_greptime_v1_meta_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Region); i { case 0: return &v.state @@ -742,7 +564,7 @@ func file_greptime_v1_meta_route_proto_init() { return nil } } - file_greptime_v1_meta_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_greptime_v1_meta_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Partition); i { case 0: return &v.state @@ -754,7 +576,7 @@ func file_greptime_v1_meta_route_proto_init() { return nil } } - file_greptime_v1_meta_route_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_greptime_v1_meta_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TableRouteValue); i { case 0: return &v.state @@ -773,9 +595,9 @@ func file_greptime_v1_meta_route_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_meta_route_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 7, NumExtensions: 0, - NumServices: 1, + NumServices: 0, }, GoTypes: file_greptime_v1_meta_route_proto_goTypes, DependencyIndexes: file_greptime_v1_meta_route_proto_depIdxs, diff --git a/java/src/main/java/greptime/v1/meta/Route.java b/java/src/main/java/greptime/v1/meta/Route.java index fecb4ca0..c7298456 100644 --- a/java/src/main/java/greptime/v1/meta/Route.java +++ b/java/src/main/java/greptime/v1/meta/Route.java @@ -14,2374 +14,6 @@ public static void registerAllExtensions( registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } - public interface RouteRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:greptime.v1.meta.RouteRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * .greptime.v1.meta.RequestHeader header = 1; - * @return Whether the header field is set. - */ - boolean hasHeader(); - /** - * .greptime.v1.meta.RequestHeader header = 1; - * @return The header. - */ - greptime.v1.meta.Common.RequestHeader getHeader(); - /** - * .greptime.v1.meta.RequestHeader header = 1; - */ - greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder(); - - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - java.util.List - getTableIdsList(); - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - greptime.v1.meta.Common.TableId getTableIds(int index); - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - int getTableIdsCount(); - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - java.util.List - getTableIdsOrBuilderList(); - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - greptime.v1.meta.Common.TableIdOrBuilder getTableIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code greptime.v1.meta.RouteRequest} - */ - public static final class RouteRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:greptime.v1.meta.RouteRequest) - RouteRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use RouteRequest.newBuilder() to construct. - private RouteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RouteRequest() { - tableIds_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RouteRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RouteRequest( - 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: { - greptime.v1.meta.Common.RequestHeader.Builder subBuilder = null; - if (header_ != null) { - subBuilder = header_.toBuilder(); - } - header_ = input.readMessage(greptime.v1.meta.Common.RequestHeader.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(header_); - header_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - tableIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - tableIds_.add( - input.readMessage(greptime.v1.meta.Common.TableId.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)) { - tableIds_ = java.util.Collections.unmodifiableList(tableIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return greptime.v1.meta.Route.internal_static_greptime_v1_meta_RouteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return greptime.v1.meta.Route.internal_static_greptime_v1_meta_RouteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - greptime.v1.meta.Route.RouteRequest.class, greptime.v1.meta.Route.RouteRequest.Builder.class); - } - - public static final int HEADER_FIELD_NUMBER = 1; - private greptime.v1.meta.Common.RequestHeader header_; - /** - * .greptime.v1.meta.RequestHeader header = 1; - * @return Whether the header field is set. - */ - @java.lang.Override - public boolean hasHeader() { - return header_ != null; - } - /** - * .greptime.v1.meta.RequestHeader header = 1; - * @return The header. - */ - @java.lang.Override - public greptime.v1.meta.Common.RequestHeader getHeader() { - return header_ == null ? greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_; - } - /** - * .greptime.v1.meta.RequestHeader header = 1; - */ - @java.lang.Override - public greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder() { - return getHeader(); - } - - public static final int TABLE_IDS_FIELD_NUMBER = 2; - private java.util.List tableIds_; - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - @java.lang.Override - public java.util.List getTableIdsList() { - return tableIds_; - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - @java.lang.Override - public java.util.List - getTableIdsOrBuilderList() { - return tableIds_; - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - @java.lang.Override - public int getTableIdsCount() { - return tableIds_.size(); - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - @java.lang.Override - public greptime.v1.meta.Common.TableId getTableIds(int index) { - return tableIds_.get(index); - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - @java.lang.Override - public greptime.v1.meta.Common.TableIdOrBuilder getTableIdsOrBuilder( - int index) { - return tableIds_.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 { - if (header_ != null) { - output.writeMessage(1, getHeader()); - } - for (int i = 0; i < tableIds_.size(); i++) { - output.writeMessage(2, tableIds_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (header_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getHeader()); - } - for (int i = 0; i < tableIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, tableIds_.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.meta.Route.RouteRequest)) { - return super.equals(obj); - } - greptime.v1.meta.Route.RouteRequest other = (greptime.v1.meta.Route.RouteRequest) obj; - - if (hasHeader() != other.hasHeader()) return false; - if (hasHeader()) { - if (!getHeader() - .equals(other.getHeader())) return false; - } - if (!getTableIdsList() - .equals(other.getTableIdsList())) 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 (hasHeader()) { - hash = (37 * hash) + HEADER_FIELD_NUMBER; - hash = (53 * hash) + getHeader().hashCode(); - } - if (getTableIdsCount() > 0) { - hash = (37 * hash) + TABLE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getTableIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static greptime.v1.meta.Route.RouteRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static greptime.v1.meta.Route.RouteRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static greptime.v1.meta.Route.RouteRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static greptime.v1.meta.Route.RouteRequest 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.meta.Route.RouteRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static greptime.v1.meta.Route.RouteRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static greptime.v1.meta.Route.RouteRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static greptime.v1.meta.Route.RouteRequest 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.meta.Route.RouteRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static greptime.v1.meta.Route.RouteRequest 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.meta.Route.RouteRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static greptime.v1.meta.Route.RouteRequest 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.meta.Route.RouteRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code greptime.v1.meta.RouteRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:greptime.v1.meta.RouteRequest) - greptime.v1.meta.Route.RouteRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return greptime.v1.meta.Route.internal_static_greptime_v1_meta_RouteRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return greptime.v1.meta.Route.internal_static_greptime_v1_meta_RouteRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - greptime.v1.meta.Route.RouteRequest.class, greptime.v1.meta.Route.RouteRequest.Builder.class); - } - - // Construct using greptime.v1.meta.Route.RouteRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getTableIdsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (headerBuilder_ == null) { - header_ = null; - } else { - header_ = null; - headerBuilder_ = null; - } - if (tableIdsBuilder_ == null) { - tableIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - tableIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return greptime.v1.meta.Route.internal_static_greptime_v1_meta_RouteRequest_descriptor; - } - - @java.lang.Override - public greptime.v1.meta.Route.RouteRequest getDefaultInstanceForType() { - return greptime.v1.meta.Route.RouteRequest.getDefaultInstance(); - } - - @java.lang.Override - public greptime.v1.meta.Route.RouteRequest build() { - greptime.v1.meta.Route.RouteRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public greptime.v1.meta.Route.RouteRequest buildPartial() { - greptime.v1.meta.Route.RouteRequest result = new greptime.v1.meta.Route.RouteRequest(this); - int from_bitField0_ = bitField0_; - if (headerBuilder_ == null) { - result.header_ = header_; - } else { - result.header_ = headerBuilder_.build(); - } - if (tableIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - tableIds_ = java.util.Collections.unmodifiableList(tableIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.tableIds_ = tableIds_; - } else { - result.tableIds_ = tableIdsBuilder_.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.meta.Route.RouteRequest) { - return mergeFrom((greptime.v1.meta.Route.RouteRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(greptime.v1.meta.Route.RouteRequest other) { - if (other == greptime.v1.meta.Route.RouteRequest.getDefaultInstance()) return this; - if (other.hasHeader()) { - mergeHeader(other.getHeader()); - } - if (tableIdsBuilder_ == null) { - if (!other.tableIds_.isEmpty()) { - if (tableIds_.isEmpty()) { - tableIds_ = other.tableIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTableIdsIsMutable(); - tableIds_.addAll(other.tableIds_); - } - onChanged(); - } - } else { - if (!other.tableIds_.isEmpty()) { - if (tableIdsBuilder_.isEmpty()) { - tableIdsBuilder_.dispose(); - tableIdsBuilder_ = null; - tableIds_ = other.tableIds_; - bitField0_ = (bitField0_ & ~0x00000001); - tableIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTableIdsFieldBuilder() : null; - } else { - tableIdsBuilder_.addAllMessages(other.tableIds_); - } - } - } - 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.meta.Route.RouteRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (greptime.v1.meta.Route.RouteRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private greptime.v1.meta.Common.RequestHeader header_; - private com.google.protobuf.SingleFieldBuilderV3< - greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder> headerBuilder_; - /** - * .greptime.v1.meta.RequestHeader header = 1; - * @return Whether the header field is set. - */ - public boolean hasHeader() { - return headerBuilder_ != null || header_ != null; - } - /** - * .greptime.v1.meta.RequestHeader header = 1; - * @return The header. - */ - public greptime.v1.meta.Common.RequestHeader getHeader() { - if (headerBuilder_ == null) { - return header_ == null ? greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_; - } else { - return headerBuilder_.getMessage(); - } - } - /** - * .greptime.v1.meta.RequestHeader header = 1; - */ - public Builder setHeader(greptime.v1.meta.Common.RequestHeader value) { - if (headerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - header_ = value; - onChanged(); - } else { - headerBuilder_.setMessage(value); - } - - return this; - } - /** - * .greptime.v1.meta.RequestHeader header = 1; - */ - public Builder setHeader( - greptime.v1.meta.Common.RequestHeader.Builder builderForValue) { - if (headerBuilder_ == null) { - header_ = builderForValue.build(); - onChanged(); - } else { - headerBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .greptime.v1.meta.RequestHeader header = 1; - */ - public Builder mergeHeader(greptime.v1.meta.Common.RequestHeader value) { - if (headerBuilder_ == null) { - if (header_ != null) { - header_ = - greptime.v1.meta.Common.RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial(); - } else { - header_ = value; - } - onChanged(); - } else { - headerBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .greptime.v1.meta.RequestHeader header = 1; - */ - public Builder clearHeader() { - if (headerBuilder_ == null) { - header_ = null; - onChanged(); - } else { - header_ = null; - headerBuilder_ = null; - } - - return this; - } - /** - * .greptime.v1.meta.RequestHeader header = 1; - */ - public greptime.v1.meta.Common.RequestHeader.Builder getHeaderBuilder() { - - onChanged(); - return getHeaderFieldBuilder().getBuilder(); - } - /** - * .greptime.v1.meta.RequestHeader header = 1; - */ - public greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder() { - if (headerBuilder_ != null) { - return headerBuilder_.getMessageOrBuilder(); - } else { - return header_ == null ? - greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_; - } - } - /** - * .greptime.v1.meta.RequestHeader header = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder> - getHeaderFieldBuilder() { - if (headerBuilder_ == null) { - headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder>( - getHeader(), - getParentForChildren(), - isClean()); - header_ = null; - } - return headerBuilder_; - } - - private java.util.List tableIds_ = - java.util.Collections.emptyList(); - private void ensureTableIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - tableIds_ = new java.util.ArrayList(tableIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.meta.Common.TableId, greptime.v1.meta.Common.TableId.Builder, greptime.v1.meta.Common.TableIdOrBuilder> tableIdsBuilder_; - - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public java.util.List getTableIdsList() { - if (tableIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(tableIds_); - } else { - return tableIdsBuilder_.getMessageList(); - } - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public int getTableIdsCount() { - if (tableIdsBuilder_ == null) { - return tableIds_.size(); - } else { - return tableIdsBuilder_.getCount(); - } - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public greptime.v1.meta.Common.TableId getTableIds(int index) { - if (tableIdsBuilder_ == null) { - return tableIds_.get(index); - } else { - return tableIdsBuilder_.getMessage(index); - } - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public Builder setTableIds( - int index, greptime.v1.meta.Common.TableId value) { - if (tableIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableIdsIsMutable(); - tableIds_.set(index, value); - onChanged(); - } else { - tableIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public Builder setTableIds( - int index, greptime.v1.meta.Common.TableId.Builder builderForValue) { - if (tableIdsBuilder_ == null) { - ensureTableIdsIsMutable(); - tableIds_.set(index, builderForValue.build()); - onChanged(); - } else { - tableIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public Builder addTableIds(greptime.v1.meta.Common.TableId value) { - if (tableIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableIdsIsMutable(); - tableIds_.add(value); - onChanged(); - } else { - tableIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public Builder addTableIds( - int index, greptime.v1.meta.Common.TableId value) { - if (tableIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableIdsIsMutable(); - tableIds_.add(index, value); - onChanged(); - } else { - tableIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public Builder addTableIds( - greptime.v1.meta.Common.TableId.Builder builderForValue) { - if (tableIdsBuilder_ == null) { - ensureTableIdsIsMutable(); - tableIds_.add(builderForValue.build()); - onChanged(); - } else { - tableIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public Builder addTableIds( - int index, greptime.v1.meta.Common.TableId.Builder builderForValue) { - if (tableIdsBuilder_ == null) { - ensureTableIdsIsMutable(); - tableIds_.add(index, builderForValue.build()); - onChanged(); - } else { - tableIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public Builder addAllTableIds( - java.lang.Iterable values) { - if (tableIdsBuilder_ == null) { - ensureTableIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tableIds_); - onChanged(); - } else { - tableIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public Builder clearTableIds() { - if (tableIdsBuilder_ == null) { - tableIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - tableIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public Builder removeTableIds(int index) { - if (tableIdsBuilder_ == null) { - ensureTableIdsIsMutable(); - tableIds_.remove(index); - onChanged(); - } else { - tableIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public greptime.v1.meta.Common.TableId.Builder getTableIdsBuilder( - int index) { - return getTableIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public greptime.v1.meta.Common.TableIdOrBuilder getTableIdsOrBuilder( - int index) { - if (tableIdsBuilder_ == null) { - return tableIds_.get(index); } else { - return tableIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public java.util.List - getTableIdsOrBuilderList() { - if (tableIdsBuilder_ != null) { - return tableIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tableIds_); - } - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public greptime.v1.meta.Common.TableId.Builder addTableIdsBuilder() { - return getTableIdsFieldBuilder().addBuilder( - greptime.v1.meta.Common.TableId.getDefaultInstance()); - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public greptime.v1.meta.Common.TableId.Builder addTableIdsBuilder( - int index) { - return getTableIdsFieldBuilder().addBuilder( - index, greptime.v1.meta.Common.TableId.getDefaultInstance()); - } - /** - * repeated .greptime.v1.meta.TableId table_ids = 2; - */ - public java.util.List - getTableIdsBuilderList() { - return getTableIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.meta.Common.TableId, greptime.v1.meta.Common.TableId.Builder, greptime.v1.meta.Common.TableIdOrBuilder> - getTableIdsFieldBuilder() { - if (tableIdsBuilder_ == null) { - tableIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.meta.Common.TableId, greptime.v1.meta.Common.TableId.Builder, greptime.v1.meta.Common.TableIdOrBuilder>( - tableIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - tableIds_ = null; - } - return tableIdsBuilder_; - } - @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.meta.RouteRequest) - } - - // @@protoc_insertion_point(class_scope:greptime.v1.meta.RouteRequest) - private static final greptime.v1.meta.Route.RouteRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new greptime.v1.meta.Route.RouteRequest(); - } - - public static greptime.v1.meta.Route.RouteRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RouteRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RouteRequest(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.meta.Route.RouteRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface RouteResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:greptime.v1.meta.RouteResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .greptime.v1.meta.ResponseHeader header = 1; - * @return Whether the header field is set. - */ - boolean hasHeader(); - /** - * .greptime.v1.meta.ResponseHeader header = 1; - * @return The header. - */ - greptime.v1.meta.Common.ResponseHeader getHeader(); - /** - * .greptime.v1.meta.ResponseHeader header = 1; - */ - greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder(); - - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - java.util.List - getPeersList(); - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - greptime.v1.meta.Common.Peer getPeers(int index); - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - int getPeersCount(); - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - java.util.List - getPeersOrBuilderList(); - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - greptime.v1.meta.Common.PeerOrBuilder getPeersOrBuilder( - int index); - - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - java.util.List - getTableRoutesList(); - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - greptime.v1.meta.Route.TableRoute getTableRoutes(int index); - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - int getTableRoutesCount(); - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - java.util.List - getTableRoutesOrBuilderList(); - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - greptime.v1.meta.Route.TableRouteOrBuilder getTableRoutesOrBuilder( - int index); - } - /** - * Protobuf type {@code greptime.v1.meta.RouteResponse} - */ - public static final class RouteResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:greptime.v1.meta.RouteResponse) - RouteResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use RouteResponse.newBuilder() to construct. - private RouteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RouteResponse() { - peers_ = java.util.Collections.emptyList(); - tableRoutes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RouteResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RouteResponse( - 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: { - greptime.v1.meta.Common.ResponseHeader.Builder subBuilder = null; - if (header_ != null) { - subBuilder = header_.toBuilder(); - } - header_ = input.readMessage(greptime.v1.meta.Common.ResponseHeader.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(header_); - header_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - peers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - peers_.add( - input.readMessage(greptime.v1.meta.Common.Peer.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - tableRoutes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - tableRoutes_.add( - input.readMessage(greptime.v1.meta.Route.TableRoute.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)) { - peers_ = java.util.Collections.unmodifiableList(peers_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - tableRoutes_ = java.util.Collections.unmodifiableList(tableRoutes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return greptime.v1.meta.Route.internal_static_greptime_v1_meta_RouteResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return greptime.v1.meta.Route.internal_static_greptime_v1_meta_RouteResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - greptime.v1.meta.Route.RouteResponse.class, greptime.v1.meta.Route.RouteResponse.Builder.class); - } - - public static final int HEADER_FIELD_NUMBER = 1; - private greptime.v1.meta.Common.ResponseHeader header_; - /** - * .greptime.v1.meta.ResponseHeader header = 1; - * @return Whether the header field is set. - */ - @java.lang.Override - public boolean hasHeader() { - return header_ != null; - } - /** - * .greptime.v1.meta.ResponseHeader header = 1; - * @return The header. - */ - @java.lang.Override - public greptime.v1.meta.Common.ResponseHeader getHeader() { - return header_ == null ? greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_; - } - /** - * .greptime.v1.meta.ResponseHeader header = 1; - */ - @java.lang.Override - public greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder() { - return getHeader(); - } - - public static final int PEERS_FIELD_NUMBER = 2; - private java.util.List peers_; - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - @java.lang.Override - public java.util.List getPeersList() { - return peers_; - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - @java.lang.Override - public java.util.List - getPeersOrBuilderList() { - return peers_; - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - @java.lang.Override - public int getPeersCount() { - return peers_.size(); - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - @java.lang.Override - public greptime.v1.meta.Common.Peer getPeers(int index) { - return peers_.get(index); - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - @java.lang.Override - public greptime.v1.meta.Common.PeerOrBuilder getPeersOrBuilder( - int index) { - return peers_.get(index); - } - - public static final int TABLE_ROUTES_FIELD_NUMBER = 3; - private java.util.List tableRoutes_; - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - @java.lang.Override - public java.util.List getTableRoutesList() { - return tableRoutes_; - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - @java.lang.Override - public java.util.List - getTableRoutesOrBuilderList() { - return tableRoutes_; - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - @java.lang.Override - public int getTableRoutesCount() { - return tableRoutes_.size(); - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - @java.lang.Override - public greptime.v1.meta.Route.TableRoute getTableRoutes(int index) { - return tableRoutes_.get(index); - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - @java.lang.Override - public greptime.v1.meta.Route.TableRouteOrBuilder getTableRoutesOrBuilder( - int index) { - return tableRoutes_.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 { - if (header_ != null) { - output.writeMessage(1, getHeader()); - } - for (int i = 0; i < peers_.size(); i++) { - output.writeMessage(2, peers_.get(i)); - } - for (int i = 0; i < tableRoutes_.size(); i++) { - output.writeMessage(3, tableRoutes_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (header_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getHeader()); - } - for (int i = 0; i < peers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, peers_.get(i)); - } - for (int i = 0; i < tableRoutes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, tableRoutes_.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.meta.Route.RouteResponse)) { - return super.equals(obj); - } - greptime.v1.meta.Route.RouteResponse other = (greptime.v1.meta.Route.RouteResponse) obj; - - if (hasHeader() != other.hasHeader()) return false; - if (hasHeader()) { - if (!getHeader() - .equals(other.getHeader())) return false; - } - if (!getPeersList() - .equals(other.getPeersList())) return false; - if (!getTableRoutesList() - .equals(other.getTableRoutesList())) 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 (hasHeader()) { - hash = (37 * hash) + HEADER_FIELD_NUMBER; - hash = (53 * hash) + getHeader().hashCode(); - } - if (getPeersCount() > 0) { - hash = (37 * hash) + PEERS_FIELD_NUMBER; - hash = (53 * hash) + getPeersList().hashCode(); - } - if (getTableRoutesCount() > 0) { - hash = (37 * hash) + TABLE_ROUTES_FIELD_NUMBER; - hash = (53 * hash) + getTableRoutesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static greptime.v1.meta.Route.RouteResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static greptime.v1.meta.Route.RouteResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static greptime.v1.meta.Route.RouteResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static greptime.v1.meta.Route.RouteResponse 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.meta.Route.RouteResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static greptime.v1.meta.Route.RouteResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static greptime.v1.meta.Route.RouteResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static greptime.v1.meta.Route.RouteResponse 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.meta.Route.RouteResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static greptime.v1.meta.Route.RouteResponse 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.meta.Route.RouteResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static greptime.v1.meta.Route.RouteResponse 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.meta.Route.RouteResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code greptime.v1.meta.RouteResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:greptime.v1.meta.RouteResponse) - greptime.v1.meta.Route.RouteResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return greptime.v1.meta.Route.internal_static_greptime_v1_meta_RouteResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return greptime.v1.meta.Route.internal_static_greptime_v1_meta_RouteResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - greptime.v1.meta.Route.RouteResponse.class, greptime.v1.meta.Route.RouteResponse.Builder.class); - } - - // Construct using greptime.v1.meta.Route.RouteResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPeersFieldBuilder(); - getTableRoutesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (headerBuilder_ == null) { - header_ = null; - } else { - header_ = null; - headerBuilder_ = null; - } - if (peersBuilder_ == null) { - peers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - peersBuilder_.clear(); - } - if (tableRoutesBuilder_ == null) { - tableRoutes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - tableRoutesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return greptime.v1.meta.Route.internal_static_greptime_v1_meta_RouteResponse_descriptor; - } - - @java.lang.Override - public greptime.v1.meta.Route.RouteResponse getDefaultInstanceForType() { - return greptime.v1.meta.Route.RouteResponse.getDefaultInstance(); - } - - @java.lang.Override - public greptime.v1.meta.Route.RouteResponse build() { - greptime.v1.meta.Route.RouteResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public greptime.v1.meta.Route.RouteResponse buildPartial() { - greptime.v1.meta.Route.RouteResponse result = new greptime.v1.meta.Route.RouteResponse(this); - int from_bitField0_ = bitField0_; - if (headerBuilder_ == null) { - result.header_ = header_; - } else { - result.header_ = headerBuilder_.build(); - } - if (peersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - peers_ = java.util.Collections.unmodifiableList(peers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.peers_ = peers_; - } else { - result.peers_ = peersBuilder_.build(); - } - if (tableRoutesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - tableRoutes_ = java.util.Collections.unmodifiableList(tableRoutes_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.tableRoutes_ = tableRoutes_; - } else { - result.tableRoutes_ = tableRoutesBuilder_.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.meta.Route.RouteResponse) { - return mergeFrom((greptime.v1.meta.Route.RouteResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(greptime.v1.meta.Route.RouteResponse other) { - if (other == greptime.v1.meta.Route.RouteResponse.getDefaultInstance()) return this; - if (other.hasHeader()) { - mergeHeader(other.getHeader()); - } - if (peersBuilder_ == null) { - if (!other.peers_.isEmpty()) { - if (peers_.isEmpty()) { - peers_ = other.peers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePeersIsMutable(); - peers_.addAll(other.peers_); - } - onChanged(); - } - } else { - if (!other.peers_.isEmpty()) { - if (peersBuilder_.isEmpty()) { - peersBuilder_.dispose(); - peersBuilder_ = null; - peers_ = other.peers_; - bitField0_ = (bitField0_ & ~0x00000001); - peersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPeersFieldBuilder() : null; - } else { - peersBuilder_.addAllMessages(other.peers_); - } - } - } - if (tableRoutesBuilder_ == null) { - if (!other.tableRoutes_.isEmpty()) { - if (tableRoutes_.isEmpty()) { - tableRoutes_ = other.tableRoutes_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTableRoutesIsMutable(); - tableRoutes_.addAll(other.tableRoutes_); - } - onChanged(); - } - } else { - if (!other.tableRoutes_.isEmpty()) { - if (tableRoutesBuilder_.isEmpty()) { - tableRoutesBuilder_.dispose(); - tableRoutesBuilder_ = null; - tableRoutes_ = other.tableRoutes_; - bitField0_ = (bitField0_ & ~0x00000002); - tableRoutesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTableRoutesFieldBuilder() : null; - } else { - tableRoutesBuilder_.addAllMessages(other.tableRoutes_); - } - } - } - 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.meta.Route.RouteResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (greptime.v1.meta.Route.RouteResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private greptime.v1.meta.Common.ResponseHeader header_; - private com.google.protobuf.SingleFieldBuilderV3< - greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder> headerBuilder_; - /** - * .greptime.v1.meta.ResponseHeader header = 1; - * @return Whether the header field is set. - */ - public boolean hasHeader() { - return headerBuilder_ != null || header_ != null; - } - /** - * .greptime.v1.meta.ResponseHeader header = 1; - * @return The header. - */ - public greptime.v1.meta.Common.ResponseHeader getHeader() { - if (headerBuilder_ == null) { - return header_ == null ? greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_; - } else { - return headerBuilder_.getMessage(); - } - } - /** - * .greptime.v1.meta.ResponseHeader header = 1; - */ - public Builder setHeader(greptime.v1.meta.Common.ResponseHeader value) { - if (headerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - header_ = value; - onChanged(); - } else { - headerBuilder_.setMessage(value); - } - - return this; - } - /** - * .greptime.v1.meta.ResponseHeader header = 1; - */ - public Builder setHeader( - greptime.v1.meta.Common.ResponseHeader.Builder builderForValue) { - if (headerBuilder_ == null) { - header_ = builderForValue.build(); - onChanged(); - } else { - headerBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .greptime.v1.meta.ResponseHeader header = 1; - */ - public Builder mergeHeader(greptime.v1.meta.Common.ResponseHeader value) { - if (headerBuilder_ == null) { - if (header_ != null) { - header_ = - greptime.v1.meta.Common.ResponseHeader.newBuilder(header_).mergeFrom(value).buildPartial(); - } else { - header_ = value; - } - onChanged(); - } else { - headerBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .greptime.v1.meta.ResponseHeader header = 1; - */ - public Builder clearHeader() { - if (headerBuilder_ == null) { - header_ = null; - onChanged(); - } else { - header_ = null; - headerBuilder_ = null; - } - - return this; - } - /** - * .greptime.v1.meta.ResponseHeader header = 1; - */ - public greptime.v1.meta.Common.ResponseHeader.Builder getHeaderBuilder() { - - onChanged(); - return getHeaderFieldBuilder().getBuilder(); - } - /** - * .greptime.v1.meta.ResponseHeader header = 1; - */ - public greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder() { - if (headerBuilder_ != null) { - return headerBuilder_.getMessageOrBuilder(); - } else { - return header_ == null ? - greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_; - } - } - /** - * .greptime.v1.meta.ResponseHeader header = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder> - getHeaderFieldBuilder() { - if (headerBuilder_ == null) { - headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder>( - getHeader(), - getParentForChildren(), - isClean()); - header_ = null; - } - return headerBuilder_; - } - - private java.util.List peers_ = - java.util.Collections.emptyList(); - private void ensurePeersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - peers_ = new java.util.ArrayList(peers_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.meta.Common.Peer, greptime.v1.meta.Common.Peer.Builder, greptime.v1.meta.Common.PeerOrBuilder> peersBuilder_; - - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public java.util.List getPeersList() { - if (peersBuilder_ == null) { - return java.util.Collections.unmodifiableList(peers_); - } else { - return peersBuilder_.getMessageList(); - } - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public int getPeersCount() { - if (peersBuilder_ == null) { - return peers_.size(); - } else { - return peersBuilder_.getCount(); - } - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public greptime.v1.meta.Common.Peer getPeers(int index) { - if (peersBuilder_ == null) { - return peers_.get(index); - } else { - return peersBuilder_.getMessage(index); - } - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public Builder setPeers( - int index, greptime.v1.meta.Common.Peer value) { - if (peersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePeersIsMutable(); - peers_.set(index, value); - onChanged(); - } else { - peersBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public Builder setPeers( - int index, greptime.v1.meta.Common.Peer.Builder builderForValue) { - if (peersBuilder_ == null) { - ensurePeersIsMutable(); - peers_.set(index, builderForValue.build()); - onChanged(); - } else { - peersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public Builder addPeers(greptime.v1.meta.Common.Peer value) { - if (peersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePeersIsMutable(); - peers_.add(value); - onChanged(); - } else { - peersBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public Builder addPeers( - int index, greptime.v1.meta.Common.Peer value) { - if (peersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePeersIsMutable(); - peers_.add(index, value); - onChanged(); - } else { - peersBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public Builder addPeers( - greptime.v1.meta.Common.Peer.Builder builderForValue) { - if (peersBuilder_ == null) { - ensurePeersIsMutable(); - peers_.add(builderForValue.build()); - onChanged(); - } else { - peersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public Builder addPeers( - int index, greptime.v1.meta.Common.Peer.Builder builderForValue) { - if (peersBuilder_ == null) { - ensurePeersIsMutable(); - peers_.add(index, builderForValue.build()); - onChanged(); - } else { - peersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public Builder addAllPeers( - java.lang.Iterable values) { - if (peersBuilder_ == null) { - ensurePeersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, peers_); - onChanged(); - } else { - peersBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public Builder clearPeers() { - if (peersBuilder_ == null) { - peers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - peersBuilder_.clear(); - } - return this; - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public Builder removePeers(int index) { - if (peersBuilder_ == null) { - ensurePeersIsMutable(); - peers_.remove(index); - onChanged(); - } else { - peersBuilder_.remove(index); - } - return this; - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public greptime.v1.meta.Common.Peer.Builder getPeersBuilder( - int index) { - return getPeersFieldBuilder().getBuilder(index); - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public greptime.v1.meta.Common.PeerOrBuilder getPeersOrBuilder( - int index) { - if (peersBuilder_ == null) { - return peers_.get(index); } else { - return peersBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public java.util.List - getPeersOrBuilderList() { - if (peersBuilder_ != null) { - return peersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(peers_); - } - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public greptime.v1.meta.Common.Peer.Builder addPeersBuilder() { - return getPeersFieldBuilder().addBuilder( - greptime.v1.meta.Common.Peer.getDefaultInstance()); - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public greptime.v1.meta.Common.Peer.Builder addPeersBuilder( - int index) { - return getPeersFieldBuilder().addBuilder( - index, greptime.v1.meta.Common.Peer.getDefaultInstance()); - } - /** - * repeated .greptime.v1.meta.Peer peers = 2; - */ - public java.util.List - getPeersBuilderList() { - return getPeersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.meta.Common.Peer, greptime.v1.meta.Common.Peer.Builder, greptime.v1.meta.Common.PeerOrBuilder> - getPeersFieldBuilder() { - if (peersBuilder_ == null) { - peersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.meta.Common.Peer, greptime.v1.meta.Common.Peer.Builder, greptime.v1.meta.Common.PeerOrBuilder>( - peers_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - peers_ = null; - } - return peersBuilder_; - } - - private java.util.List tableRoutes_ = - java.util.Collections.emptyList(); - private void ensureTableRoutesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - tableRoutes_ = new java.util.ArrayList(tableRoutes_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.meta.Route.TableRoute, greptime.v1.meta.Route.TableRoute.Builder, greptime.v1.meta.Route.TableRouteOrBuilder> tableRoutesBuilder_; - - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public java.util.List getTableRoutesList() { - if (tableRoutesBuilder_ == null) { - return java.util.Collections.unmodifiableList(tableRoutes_); - } else { - return tableRoutesBuilder_.getMessageList(); - } - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public int getTableRoutesCount() { - if (tableRoutesBuilder_ == null) { - return tableRoutes_.size(); - } else { - return tableRoutesBuilder_.getCount(); - } - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public greptime.v1.meta.Route.TableRoute getTableRoutes(int index) { - if (tableRoutesBuilder_ == null) { - return tableRoutes_.get(index); - } else { - return tableRoutesBuilder_.getMessage(index); - } - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public Builder setTableRoutes( - int index, greptime.v1.meta.Route.TableRoute value) { - if (tableRoutesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableRoutesIsMutable(); - tableRoutes_.set(index, value); - onChanged(); - } else { - tableRoutesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public Builder setTableRoutes( - int index, greptime.v1.meta.Route.TableRoute.Builder builderForValue) { - if (tableRoutesBuilder_ == null) { - ensureTableRoutesIsMutable(); - tableRoutes_.set(index, builderForValue.build()); - onChanged(); - } else { - tableRoutesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public Builder addTableRoutes(greptime.v1.meta.Route.TableRoute value) { - if (tableRoutesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableRoutesIsMutable(); - tableRoutes_.add(value); - onChanged(); - } else { - tableRoutesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public Builder addTableRoutes( - int index, greptime.v1.meta.Route.TableRoute value) { - if (tableRoutesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableRoutesIsMutable(); - tableRoutes_.add(index, value); - onChanged(); - } else { - tableRoutesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public Builder addTableRoutes( - greptime.v1.meta.Route.TableRoute.Builder builderForValue) { - if (tableRoutesBuilder_ == null) { - ensureTableRoutesIsMutable(); - tableRoutes_.add(builderForValue.build()); - onChanged(); - } else { - tableRoutesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public Builder addTableRoutes( - int index, greptime.v1.meta.Route.TableRoute.Builder builderForValue) { - if (tableRoutesBuilder_ == null) { - ensureTableRoutesIsMutable(); - tableRoutes_.add(index, builderForValue.build()); - onChanged(); - } else { - tableRoutesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public Builder addAllTableRoutes( - java.lang.Iterable values) { - if (tableRoutesBuilder_ == null) { - ensureTableRoutesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tableRoutes_); - onChanged(); - } else { - tableRoutesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public Builder clearTableRoutes() { - if (tableRoutesBuilder_ == null) { - tableRoutes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - tableRoutesBuilder_.clear(); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public Builder removeTableRoutes(int index) { - if (tableRoutesBuilder_ == null) { - ensureTableRoutesIsMutable(); - tableRoutes_.remove(index); - onChanged(); - } else { - tableRoutesBuilder_.remove(index); - } - return this; - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public greptime.v1.meta.Route.TableRoute.Builder getTableRoutesBuilder( - int index) { - return getTableRoutesFieldBuilder().getBuilder(index); - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public greptime.v1.meta.Route.TableRouteOrBuilder getTableRoutesOrBuilder( - int index) { - if (tableRoutesBuilder_ == null) { - return tableRoutes_.get(index); } else { - return tableRoutesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public java.util.List - getTableRoutesOrBuilderList() { - if (tableRoutesBuilder_ != null) { - return tableRoutesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tableRoutes_); - } - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public greptime.v1.meta.Route.TableRoute.Builder addTableRoutesBuilder() { - return getTableRoutesFieldBuilder().addBuilder( - greptime.v1.meta.Route.TableRoute.getDefaultInstance()); - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public greptime.v1.meta.Route.TableRoute.Builder addTableRoutesBuilder( - int index) { - return getTableRoutesFieldBuilder().addBuilder( - index, greptime.v1.meta.Route.TableRoute.getDefaultInstance()); - } - /** - * repeated .greptime.v1.meta.TableRoute table_routes = 3; - */ - public java.util.List - getTableRoutesBuilderList() { - return getTableRoutesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.meta.Route.TableRoute, greptime.v1.meta.Route.TableRoute.Builder, greptime.v1.meta.Route.TableRouteOrBuilder> - getTableRoutesFieldBuilder() { - if (tableRoutesBuilder_ == null) { - tableRoutesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - greptime.v1.meta.Route.TableRoute, greptime.v1.meta.Route.TableRoute.Builder, greptime.v1.meta.Route.TableRouteOrBuilder>( - tableRoutes_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - tableRoutes_ = null; - } - return tableRoutesBuilder_; - } - @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.meta.RouteResponse) - } - - // @@protoc_insertion_point(class_scope:greptime.v1.meta.RouteResponse) - private static final greptime.v1.meta.Route.RouteResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new greptime.v1.meta.Route.RouteResponse(); - } - - public static greptime.v1.meta.Route.RouteResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RouteResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RouteResponse(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.meta.Route.RouteResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - public interface TableRouteOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.meta.TableRoute) com.google.protobuf.MessageOrBuilder { @@ -7129,6 +4761,7 @@ greptime.v1.meta.Common.PeerOrBuilder getPeersOrBuilder( /** *
    * This message is only for saving into store.
+   * TODO(weny): Remove it, Now, the upgrade tool is still dependent on it.
    * 
* * Protobuf type {@code greptime.v1.meta.TableRouteValue} @@ -7478,6 +5111,7 @@ protected Builder newBuilderForType( /** *
      * This message is only for saving into store.
+     * TODO(weny): Remove it, Now, the upgrade tool is still dependent on it.
      * 
* * Protobuf type {@code greptime.v1.meta.TableRouteValue} @@ -8089,16 +5723,6 @@ public greptime.v1.meta.Route.TableRouteValue getDefaultInstanceForType() { } - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_greptime_v1_meta_RouteRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_greptime_v1_meta_RouteRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_greptime_v1_meta_RouteResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_greptime_v1_meta_RouteResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_meta_TableRoute_descriptor; private static final @@ -8145,72 +5769,51 @@ public greptime.v1.meta.Route.TableRouteValue getDefaultInstanceForType() { java.lang.String[] descriptorData = { "\n\034greptime/v1/meta/route.proto\022\020greptime" + ".v1.meta\032\035greptime/v1/meta/common.proto\"" + - "m\n\014RouteRequest\022/\n\006header\030\001 \001(\0132\037.grepti" + - "me.v1.meta.RequestHeader\022,\n\ttable_ids\030\002 " + - "\003(\0132\031.greptime.v1.meta.TableId\"\234\001\n\rRoute" + - "Response\0220\n\006header\030\001 \001(\0132 .greptime.v1.m" + - "eta.ResponseHeader\022%\n\005peers\030\002 \003(\0132\026.grep" + - "time.v1.meta.Peer\0222\n\014table_routes\030\003 \003(\0132" + - "\034.greptime.v1.meta.TableRoute\"j\n\nTableRo" + - "ute\022&\n\005table\030\001 \001(\0132\027.greptime.v1.meta.Ta" + - "ble\0224\n\rregion_routes\030\002 \003(\0132\035.greptime.v1" + - ".meta.RegionRoute\"q\n\013RegionRoute\022(\n\006regi" + - "on\030\001 \001(\0132\030.greptime.v1.meta.Region\022\031\n\021le" + - "ader_peer_index\030\002 \001(\004\022\035\n\025follower_peer_i" + - "ndexes\030\003 \003(\004\"Z\n\005Table\022\n\n\002id\030\001 \001(\004\022/\n\ntab" + - "le_name\030\002 \001(\0132\033.greptime.v1.meta.TableNa" + - "me\022\024\n\014table_schema\030\003 \001(\014\"\264\001\n\006Region\022\n\n\002i" + - "d\030\001 \001(\004\022\014\n\004name\030\002 \001(\t\022.\n\tpartition\030\003 \001(\013" + - "2\033.greptime.v1.meta.Partition\0222\n\005attrs\030d" + - " \003(\0132#.greptime.v1.meta.Region.AttrsEntr" + - "y\032,\n\nAttrsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + - "\001(\t:\0028\001\"4\n\tPartition\022\023\n\013column_list\030\001 \003(" + - "\014\022\022\n\nvalue_list\030\002 \003(\014\"k\n\017TableRouteValue" + - "\022%\n\005peers\030\001 \003(\0132\026.greptime.v1.meta.Peer\022" + - "1\n\013table_route\030\002 \001(\0132\034.greptime.v1.meta." + - "TableRoute2T\n\006Router\022J\n\005Route\022\036.greptime" + - ".v1.meta.RouteRequest\032\037.greptime.v1.meta" + - ".RouteResponse\"\000B { - impl From<$data_type> for Vec { - fn from(entity: $data_type) -> Self { - entity.encode_to_vec() - } - } - - impl TryFrom<&[u8]> for $data_type { - type Error = DecodeError; - - fn try_from(value: &[u8]) -> Result { - <$data_type>::decode(value.as_ref()) - } - } - }; -} - -impl_convert_with_bytes!(TableRouteValue); diff --git a/src/v1/meta.rs b/src/v1/meta.rs index 502f191b..5e34eca8 100644 --- a/src/v1/meta.rs +++ b/src/v1/meta.rs @@ -155,7 +155,6 @@ macro_rules! gen_set_header { } gen_set_header!(HeartbeatRequest); -gen_set_header!(RouteRequest); gen_set_header!(RangeRequest); gen_set_header!(PutRequest); gen_set_header!(BatchGetRequest);