diff --git a/c++/greptime/v1/frontend/server.grpc.pb.cc b/c++/greptime/v1/frontend/server.grpc.pb.cc index 84e90b7..ff6aba4 100644 --- a/c++/greptime/v1/frontend/server.grpc.pb.cc +++ b/c++/greptime/v1/frontend/server.grpc.pb.cc @@ -25,6 +25,7 @@ namespace frontend { static const char* Frontend_method_names[] = { "/greptime.v1.frontend.Frontend/ListProcess", + "/greptime.v1.frontend.Frontend/KillProcess", }; std::unique_ptr< Frontend::Stub> Frontend::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { @@ -35,6 +36,7 @@ std::unique_ptr< Frontend::Stub> Frontend::NewStub(const std::shared_ptr< ::grpc Frontend::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) : channel_(channel), rpcmethod_ListProcess_(Frontend_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_KillProcess_(Frontend_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) {} ::grpc::Status Frontend::Stub::ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::greptime::v1::frontend::ListProcessResponse* response) { @@ -60,6 +62,29 @@ void Frontend::Stub::async::ListProcess(::grpc::ClientContext* context, const :: return result; } +::grpc::Status Frontend::Stub::KillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::greptime::v1::frontend::KillProcessResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::frontend::KillProcessRequest, ::greptime::v1::frontend::KillProcessResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_KillProcess_, context, request, response); +} + +void Frontend::Stub::async::KillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest* request, ::greptime::v1::frontend::KillProcessResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::greptime::v1::frontend::KillProcessRequest, ::greptime::v1::frontend::KillProcessResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_KillProcess_, context, request, response, std::move(f)); +} + +void Frontend::Stub::async::KillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest* request, ::greptime::v1::frontend::KillProcessResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_KillProcess_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::KillProcessResponse>* Frontend::Stub::PrepareAsyncKillProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::frontend::KillProcessResponse, ::greptime::v1::frontend::KillProcessRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_KillProcess_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::KillProcessResponse>* Frontend::Stub::AsyncKillProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncKillProcessRaw(context, request, cq); + result->StartCall(); + return result; +} + Frontend::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( Frontend_method_names[0], @@ -71,6 +96,16 @@ Frontend::Service::Service() { ::greptime::v1::frontend::ListProcessResponse* resp) { return service->ListProcess(ctx, req, resp); }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + Frontend_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< Frontend::Service, ::greptime::v1::frontend::KillProcessRequest, ::greptime::v1::frontend::KillProcessResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](Frontend::Service* service, + ::grpc::ServerContext* ctx, + const ::greptime::v1::frontend::KillProcessRequest* req, + ::greptime::v1::frontend::KillProcessResponse* resp) { + return service->KillProcess(ctx, req, resp); + }, this))); } Frontend::Service::~Service() { @@ -83,6 +118,13 @@ Frontend::Service::~Service() { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } +::grpc::Status Frontend::Service::KillProcess(::grpc::ServerContext* context, const ::greptime::v1::frontend::KillProcessRequest* request, ::greptime::v1::frontend::KillProcessResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + } // namespace greptime } // namespace v1 diff --git a/c++/greptime/v1/frontend/server.grpc.pb.h b/c++/greptime/v1/frontend/server.grpc.pb.h index eca7401..ba6ed6f 100644 --- a/c++/greptime/v1/frontend/server.grpc.pb.h +++ b/c++/greptime/v1/frontend/server.grpc.pb.h @@ -60,12 +60,23 @@ class Frontend final { std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::ListProcessResponse>> PrepareAsyncListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::ListProcessResponse>>(PrepareAsyncListProcessRaw(context, request, cq)); } + // Kill a running process on frontend. + virtual ::grpc::Status KillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::greptime::v1::frontend::KillProcessResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::KillProcessResponse>> AsyncKillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::KillProcessResponse>>(AsyncKillProcessRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::KillProcessResponse>> PrepareAsyncKillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::KillProcessResponse>>(PrepareAsyncKillProcessRaw(context, request, cq)); + } class async_interface { public: virtual ~async_interface() {} // List all running processes on frontend. virtual void ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response, std::function) = 0; virtual void ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // Kill a running process on frontend. + virtual void KillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest* request, ::greptime::v1::frontend::KillProcessResponse* response, std::function) = 0; + virtual void KillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest* request, ::greptime::v1::frontend::KillProcessResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; }; typedef class async_interface experimental_async_interface; virtual class async_interface* async() { return nullptr; } @@ -73,6 +84,8 @@ class Frontend final { private: virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::ListProcessResponse>* AsyncListProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::ListProcessResponse>* PrepareAsyncListProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::KillProcessResponse>* AsyncKillProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::KillProcessResponse>* PrepareAsyncKillProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::grpc::CompletionQueue* cq) = 0; }; class Stub final : public StubInterface { public: @@ -84,11 +97,20 @@ class Frontend final { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>> PrepareAsyncListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>>(PrepareAsyncListProcessRaw(context, request, cq)); } + ::grpc::Status KillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::greptime::v1::frontend::KillProcessResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::KillProcessResponse>> AsyncKillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::KillProcessResponse>>(AsyncKillProcessRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::KillProcessResponse>> PrepareAsyncKillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::KillProcessResponse>>(PrepareAsyncKillProcessRaw(context, request, cq)); + } class async final : public StubInterface::async_interface { public: void ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response, std::function) override; void ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void KillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest* request, ::greptime::v1::frontend::KillProcessResponse* response, std::function) override; + void KillProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest* request, ::greptime::v1::frontend::KillProcessResponse* response, ::grpc::ClientUnaryReactor* reactor) override; private: friend class Stub; explicit async(Stub* stub): stub_(stub) { } @@ -102,7 +124,10 @@ class Frontend final { class async async_stub_{this}; ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>* AsyncListProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>* PrepareAsyncListProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::KillProcessResponse>* AsyncKillProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::KillProcessResponse>* PrepareAsyncKillProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::KillProcessRequest& request, ::grpc::CompletionQueue* cq) override; const ::grpc::internal::RpcMethod rpcmethod_ListProcess_; + const ::grpc::internal::RpcMethod rpcmethod_KillProcess_; }; static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); @@ -112,6 +137,8 @@ class Frontend final { virtual ~Service(); // List all running processes on frontend. virtual ::grpc::Status ListProcess(::grpc::ServerContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response); + // Kill a running process on frontend. + virtual ::grpc::Status KillProcess(::grpc::ServerContext* context, const ::greptime::v1::frontend::KillProcessRequest* request, ::greptime::v1::frontend::KillProcessResponse* response); }; template class WithAsyncMethod_ListProcess : public BaseClass { @@ -133,7 +160,27 @@ class Frontend final { ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_ListProcess AsyncService; + template + class WithAsyncMethod_KillProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_KillProcess() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_KillProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status KillProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::KillProcessRequest* /*request*/, ::greptime::v1::frontend::KillProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestKillProcess(::grpc::ServerContext* context, ::greptime::v1::frontend::KillProcessRequest* request, ::grpc::ServerAsyncResponseWriter< ::greptime::v1::frontend::KillProcessResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_ListProcess > AsyncService; template class WithCallbackMethod_ListProcess : public BaseClass { private: @@ -161,7 +208,34 @@ class Frontend final { virtual ::grpc::ServerUnaryReactor* ListProcess( ::grpc::CallbackServerContext* /*context*/, const ::greptime::v1::frontend::ListProcessRequest* /*request*/, ::greptime::v1::frontend::ListProcessResponse* /*response*/) { return nullptr; } }; - typedef WithCallbackMethod_ListProcess CallbackService; + template + class WithCallbackMethod_KillProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_KillProcess() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::greptime::v1::frontend::KillProcessRequest, ::greptime::v1::frontend::KillProcessResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::greptime::v1::frontend::KillProcessRequest* request, ::greptime::v1::frontend::KillProcessResponse* response) { return this->KillProcess(context, request, response); }));} + void SetMessageAllocatorFor_KillProcess( + ::grpc::MessageAllocator< ::greptime::v1::frontend::KillProcessRequest, ::greptime::v1::frontend::KillProcessResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::greptime::v1::frontend::KillProcessRequest, ::greptime::v1::frontend::KillProcessResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_KillProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status KillProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::KillProcessRequest* /*request*/, ::greptime::v1::frontend::KillProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* KillProcess( + ::grpc::CallbackServerContext* /*context*/, const ::greptime::v1::frontend::KillProcessRequest* /*request*/, ::greptime::v1::frontend::KillProcessResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_ListProcess > CallbackService; typedef CallbackService ExperimentalCallbackService; template class WithGenericMethod_ListProcess : public BaseClass { @@ -181,6 +255,23 @@ class Frontend final { } }; template + class WithGenericMethod_KillProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_KillProcess() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_KillProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status KillProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::KillProcessRequest* /*request*/, ::greptime::v1::frontend::KillProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template class WithRawMethod_ListProcess : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -201,6 +292,26 @@ class Frontend final { } }; template + class WithRawMethod_KillProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_KillProcess() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_KillProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status KillProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::KillProcessRequest* /*request*/, ::greptime::v1::frontend::KillProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestKillProcess(::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(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithRawCallbackMethod_ListProcess : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -223,6 +334,28 @@ class Frontend final { ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } }; template + class WithRawCallbackMethod_KillProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_KillProcess() { + ::grpc::Service::MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->KillProcess(context, request, response); })); + } + ~WithRawCallbackMethod_KillProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status KillProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::KillProcessRequest* /*request*/, ::greptime::v1::frontend::KillProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* KillProcess( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template class WithStreamedUnaryMethod_ListProcess : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -249,9 +382,36 @@ class Frontend final { // replace default version of method with streamed unary virtual ::grpc::Status StreamedListProcess(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::greptime::v1::frontend::ListProcessRequest,::greptime::v1::frontend::ListProcessResponse>* server_unary_streamer) = 0; }; - typedef WithStreamedUnaryMethod_ListProcess StreamedUnaryService; + template + class WithStreamedUnaryMethod_KillProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_KillProcess() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::greptime::v1::frontend::KillProcessRequest, ::greptime::v1::frontend::KillProcessResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::greptime::v1::frontend::KillProcessRequest, ::greptime::v1::frontend::KillProcessResponse>* streamer) { + return this->StreamedKillProcess(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_KillProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status KillProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::KillProcessRequest* /*request*/, ::greptime::v1::frontend::KillProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedKillProcess(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::greptime::v1::frontend::KillProcessRequest,::greptime::v1::frontend::KillProcessResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_ListProcess > StreamedUnaryService; typedef Service SplitStreamedService; - typedef WithStreamedUnaryMethod_ListProcess StreamedService; + typedef WithStreamedUnaryMethod_ListProcess > StreamedService; }; } // namespace frontend diff --git a/c++/greptime/v1/frontend/server.pb.cc b/c++/greptime/v1/frontend/server.pb.cc index f91215e..ec6c3b3 100644 --- a/c++/greptime/v1/frontend/server.pb.cc +++ b/c++/greptime/v1/frontend/server.pb.cc @@ -49,6 +49,34 @@ struct ListProcessResponseDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListProcessResponseDefaultTypeInternal _ListProcessResponse_default_instance_; +PROTOBUF_CONSTEXPR KillProcessRequest::KillProcessRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.server_addr_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.catalog_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.process_id_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct KillProcessRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR KillProcessRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~KillProcessRequestDefaultTypeInternal() {} + union { + KillProcessRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KillProcessRequestDefaultTypeInternal _KillProcessRequest_default_instance_; +PROTOBUF_CONSTEXPR KillProcessResponse::KillProcessResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.success_)*/false + , /*decltype(_impl_._cached_size_)*/{}} {} +struct KillProcessResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR KillProcessResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~KillProcessResponseDefaultTypeInternal() {} + union { + KillProcessResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KillProcessResponseDefaultTypeInternal _KillProcessResponse_default_instance_; PROTOBUF_CONSTEXPR ProcessInfo::ProcessInfo( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.schemas_)*/{} @@ -71,7 +99,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT } // namespace frontend } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto[3]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto[5]; static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2ffrontend_2fserver_2eproto = nullptr; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2ffrontend_2fserver_2eproto = nullptr; @@ -91,6 +119,22 @@ const uint32_t TableStruct_greptime_2fv1_2ffrontend_2fserver_2eproto::offsets[] ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ListProcessResponse, _impl_.processes_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::KillProcessRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::KillProcessRequest, _impl_.server_addr_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::KillProcessRequest, _impl_.catalog_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::KillProcessRequest, _impl_.process_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::KillProcessResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::KillProcessResponse, _impl_.success_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ProcessInfo, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -107,12 +151,16 @@ const uint32_t TableStruct_greptime_2fv1_2ffrontend_2fserver_2eproto::offsets[] static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::greptime::v1::frontend::ListProcessRequest)}, { 7, -1, -1, sizeof(::greptime::v1::frontend::ListProcessResponse)}, - { 14, -1, -1, sizeof(::greptime::v1::frontend::ProcessInfo)}, + { 14, -1, -1, sizeof(::greptime::v1::frontend::KillProcessRequest)}, + { 23, -1, -1, sizeof(::greptime::v1::frontend::KillProcessResponse)}, + { 30, -1, -1, sizeof(::greptime::v1::frontend::ProcessInfo)}, }; static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::frontend::_ListProcessRequest_default_instance_._instance, &::greptime::v1::frontend::_ListProcessResponse_default_instance_._instance, + &::greptime::v1::frontend::_KillProcessRequest_default_instance_._instance, + &::greptime::v1::frontend::_KillProcessResponse_default_instance_._instance, &::greptime::v1::frontend::_ProcessInfo_default_instance_._instance, }; @@ -121,22 +169,27 @@ const char descriptor_table_protodef_greptime_2fv1_2ffrontend_2fserver_2eproto[] "ptime.v1.frontend\"%\n\022ListProcessRequest\022" "\017\n\007catalog\030\001 \001(\t\"K\n\023ListProcessResponse\022" "4\n\tprocesses\030\001 \003(\0132!.greptime.v1.fronten" - "d.ProcessInfo\"\205\001\n\013ProcessInfo\022\n\n\002id\030\001 \001(" + "d.ProcessInfo\"N\n\022KillProcessRequest\022\023\n\013s" + "erver_addr\030\001 \001(\t\022\017\n\007catalog\030\002 \001(\t\022\022\n\npro" + "cess_id\030\003 \001(\004\"&\n\023KillProcessResponse\022\017\n\007" + "success\030\001 \001(\010\"\205\001\n\013ProcessInfo\022\n\n\002id\030\001 \001(" "\004\022\017\n\007catalog\030\002 \001(\t\022\017\n\007schemas\030\003 \003(\t\022\r\n\005q" "uery\030\004 \001(\t\022\027\n\017start_timestamp\030\005 \001(\003\022\016\n\006c" - "lient\030\006 \001(\t\022\020\n\010frontend\030\007 \001(\t2n\n\010Fronten" - "d\022b\n\013ListProcess\022(.greptime.v1.frontend." - "ListProcessRequest\032).greptime.v1.fronten" - "d.ListProcessResponseBa\n\027io.greptime.v1." - "frontendB\006ServerZ>github.com/GreptimeTea" - "m/greptime-proto/go/greptime/v1/frontend" - "b\006proto3" + "lient\030\006 \001(\t\022\020\n\010frontend\030\007 \001(\t2\322\001\n\010Fronte" + "nd\022b\n\013ListProcess\022(.greptime.v1.frontend" + ".ListProcessRequest\032).greptime.v1.fronte" + "nd.ListProcessResponse\022b\n\013KillProcess\022(." + "greptime.v1.frontend.KillProcessRequest\032" + ").greptime.v1.frontend.KillProcessRespon" + "seBa\n\027io.greptime.v1.frontendB\006ServerZ>g" + "ithub.com/GreptimeTeam/greptime-proto/go" + "/greptime/v1/frontendb\006proto3" ; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto = { - false, false, 528, descriptor_table_protodef_greptime_2fv1_2ffrontend_2fserver_2eproto, + false, false, 749, descriptor_table_protodef_greptime_2fv1_2ffrontend_2fserver_2eproto, "greptime/v1/frontend/server.proto", - &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_once, nullptr, 0, 3, + &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_once, nullptr, 0, 5, schemas, file_default_instances, TableStruct_greptime_2fv1_2ffrontend_2fserver_2eproto::offsets, file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto, file_level_enum_descriptors_greptime_2fv1_2ffrontend_2fserver_2eproto, file_level_service_descriptors_greptime_2fv1_2ffrontend_2fserver_2eproto, @@ -541,6 +594,464 @@ void ListProcessResponse::InternalSwap(ListProcessResponse* other) { // =================================================================== +class KillProcessRequest::_Internal { + public: +}; + +KillProcessRequest::KillProcessRequest(::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.frontend.KillProcessRequest) +} +KillProcessRequest::KillProcessRequest(const KillProcessRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + KillProcessRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.server_addr_){} + , decltype(_impl_.catalog_){} + , decltype(_impl_.process_id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.server_addr_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.server_addr_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_server_addr().empty()) { + _this->_impl_.server_addr_.Set(from._internal_server_addr(), + _this->GetArenaForAllocation()); + } + _impl_.catalog_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.catalog_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_catalog().empty()) { + _this->_impl_.catalog_.Set(from._internal_catalog(), + _this->GetArenaForAllocation()); + } + _this->_impl_.process_id_ = from._impl_.process_id_; + // @@protoc_insertion_point(copy_constructor:greptime.v1.frontend.KillProcessRequest) +} + +inline void KillProcessRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.server_addr_){} + , decltype(_impl_.catalog_){} + , decltype(_impl_.process_id_){uint64_t{0u}} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.server_addr_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.server_addr_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.catalog_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.catalog_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +KillProcessRequest::~KillProcessRequest() { + // @@protoc_insertion_point(destructor:greptime.v1.frontend.KillProcessRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void KillProcessRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.server_addr_.Destroy(); + _impl_.catalog_.Destroy(); +} + +void KillProcessRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void KillProcessRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.frontend.KillProcessRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.server_addr_.ClearToEmpty(); + _impl_.catalog_.ClearToEmpty(); + _impl_.process_id_ = uint64_t{0u}; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* KillProcessRequest::_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) { + // string server_addr = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_server_addr(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.frontend.KillProcessRequest.server_addr")); + } else + goto handle_unusual; + continue; + // string catalog = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_catalog(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.frontend.KillProcessRequest.catalog")); + } else + goto handle_unusual; + continue; + // uint64 process_id = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.process_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* KillProcessRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.frontend.KillProcessRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string server_addr = 1; + if (!this->_internal_server_addr().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_server_addr().data(), static_cast(this->_internal_server_addr().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.frontend.KillProcessRequest.server_addr"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_server_addr(), target); + } + + // string catalog = 2; + if (!this->_internal_catalog().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_catalog().data(), static_cast(this->_internal_catalog().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.frontend.KillProcessRequest.catalog"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_catalog(), target); + } + + // uint64 process_id = 3; + if (this->_internal_process_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_process_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.frontend.KillProcessRequest) + return target; +} + +size_t KillProcessRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.frontend.KillProcessRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string server_addr = 1; + if (!this->_internal_server_addr().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_server_addr()); + } + + // string catalog = 2; + if (!this->_internal_catalog().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_catalog()); + } + + // uint64 process_id = 3; + if (this->_internal_process_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_process_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData KillProcessRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + KillProcessRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*KillProcessRequest::GetClassData() const { return &_class_data_; } + + +void KillProcessRequest::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.frontend.KillProcessRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_server_addr().empty()) { + _this->_internal_set_server_addr(from._internal_server_addr()); + } + if (!from._internal_catalog().empty()) { + _this->_internal_set_catalog(from._internal_catalog()); + } + if (from._internal_process_id() != 0) { + _this->_internal_set_process_id(from._internal_process_id()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void KillProcessRequest::CopyFrom(const KillProcessRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.frontend.KillProcessRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool KillProcessRequest::IsInitialized() const { + return true; +} + +void KillProcessRequest::InternalSwap(KillProcessRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.server_addr_, lhs_arena, + &other->_impl_.server_addr_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.catalog_, lhs_arena, + &other->_impl_.catalog_, rhs_arena + ); + swap(_impl_.process_id_, other->_impl_.process_id_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata KillProcessRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_once, + file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto[2]); +} + +// =================================================================== + +class KillProcessResponse::_Internal { + public: +}; + +KillProcessResponse::KillProcessResponse(::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.frontend.KillProcessResponse) +} +KillProcessResponse::KillProcessResponse(const KillProcessResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + KillProcessResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.success_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.success_ = from._impl_.success_; + // @@protoc_insertion_point(copy_constructor:greptime.v1.frontend.KillProcessResponse) +} + +inline void KillProcessResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.success_){false} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +KillProcessResponse::~KillProcessResponse() { + // @@protoc_insertion_point(destructor:greptime.v1.frontend.KillProcessResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void KillProcessResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void KillProcessResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void KillProcessResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.frontend.KillProcessResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.success_ = false; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* KillProcessResponse::_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) { + // bool success = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.success_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* KillProcessResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.frontend.KillProcessResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // bool success = 1; + if (this->_internal_success() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_success(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.frontend.KillProcessResponse) + return target; +} + +size_t KillProcessResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.frontend.KillProcessResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bool success = 1; + if (this->_internal_success() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData KillProcessResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + KillProcessResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*KillProcessResponse::GetClassData() const { return &_class_data_; } + + +void KillProcessResponse::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.frontend.KillProcessResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_success() != 0) { + _this->_internal_set_success(from._internal_success()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void KillProcessResponse::CopyFrom(const KillProcessResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.frontend.KillProcessResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool KillProcessResponse::IsInitialized() const { + return true; +} + +void KillProcessResponse::InternalSwap(KillProcessResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.success_, other->_impl_.success_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata KillProcessResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_once, + file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto[3]); +} + +// =================================================================== + class ProcessInfo::_Internal { public: }; @@ -988,7 +1499,7 @@ void ProcessInfo::InternalSwap(ProcessInfo* other) { ::PROTOBUF_NAMESPACE_ID::Metadata ProcessInfo::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_once, - file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto[2]); + file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto[4]); } // @@protoc_insertion_point(namespace_scope) @@ -1004,6 +1515,14 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::frontend::ListProcessResponse* Arena::CreateMaybeMessage< ::greptime::v1::frontend::ListProcessResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::frontend::ListProcessResponse >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::frontend::KillProcessRequest* +Arena::CreateMaybeMessage< ::greptime::v1::frontend::KillProcessRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::frontend::KillProcessRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::greptime::v1::frontend::KillProcessResponse* +Arena::CreateMaybeMessage< ::greptime::v1::frontend::KillProcessResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::frontend::KillProcessResponse >(arena); +} template<> PROTOBUF_NOINLINE ::greptime::v1::frontend::ProcessInfo* Arena::CreateMaybeMessage< ::greptime::v1::frontend::ProcessInfo >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::frontend::ProcessInfo >(arena); diff --git a/c++/greptime/v1/frontend/server.pb.h b/c++/greptime/v1/frontend/server.pb.h index 7da1ce5..a33c831 100644 --- a/c++/greptime/v1/frontend/server.pb.h +++ b/c++/greptime/v1/frontend/server.pb.h @@ -47,6 +47,12 @@ extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table namespace greptime { namespace v1 { namespace frontend { +class KillProcessRequest; +struct KillProcessRequestDefaultTypeInternal; +extern KillProcessRequestDefaultTypeInternal _KillProcessRequest_default_instance_; +class KillProcessResponse; +struct KillProcessResponseDefaultTypeInternal; +extern KillProcessResponseDefaultTypeInternal _KillProcessResponse_default_instance_; class ListProcessRequest; struct ListProcessRequestDefaultTypeInternal; extern ListProcessRequestDefaultTypeInternal _ListProcessRequest_default_instance_; @@ -60,6 +66,8 @@ extern ProcessInfoDefaultTypeInternal _ProcessInfo_default_instance_; } // namespace v1 } // namespace greptime PROTOBUF_NAMESPACE_OPEN +template<> ::greptime::v1::frontend::KillProcessRequest* Arena::CreateMaybeMessage<::greptime::v1::frontend::KillProcessRequest>(Arena*); +template<> ::greptime::v1::frontend::KillProcessResponse* Arena::CreateMaybeMessage<::greptime::v1::frontend::KillProcessResponse>(Arena*); template<> ::greptime::v1::frontend::ListProcessRequest* Arena::CreateMaybeMessage<::greptime::v1::frontend::ListProcessRequest>(Arena*); template<> ::greptime::v1::frontend::ListProcessResponse* Arena::CreateMaybeMessage<::greptime::v1::frontend::ListProcessResponse>(Arena*); template<> ::greptime::v1::frontend::ProcessInfo* Arena::CreateMaybeMessage<::greptime::v1::frontend::ProcessInfo>(Arena*); @@ -380,6 +388,334 @@ class ListProcessResponse final : }; // ------------------------------------------------------------------- +class KillProcessRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.frontend.KillProcessRequest) */ { + public: + inline KillProcessRequest() : KillProcessRequest(nullptr) {} + ~KillProcessRequest() override; + explicit PROTOBUF_CONSTEXPR KillProcessRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + KillProcessRequest(const KillProcessRequest& from); + KillProcessRequest(KillProcessRequest&& from) noexcept + : KillProcessRequest() { + *this = ::std::move(from); + } + + inline KillProcessRequest& operator=(const KillProcessRequest& from) { + CopyFrom(from); + return *this; + } + inline KillProcessRequest& operator=(KillProcessRequest&& 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 KillProcessRequest& default_instance() { + return *internal_default_instance(); + } + static inline const KillProcessRequest* internal_default_instance() { + return reinterpret_cast( + &_KillProcessRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(KillProcessRequest& a, KillProcessRequest& b) { + a.Swap(&b); + } + inline void Swap(KillProcessRequest* 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(KillProcessRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + KillProcessRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const KillProcessRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const KillProcessRequest& from) { + KillProcessRequest::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(KillProcessRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.frontend.KillProcessRequest"; + } + protected: + explicit KillProcessRequest(::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 { + kServerAddrFieldNumber = 1, + kCatalogFieldNumber = 2, + kProcessIdFieldNumber = 3, + }; + // string server_addr = 1; + void clear_server_addr(); + const std::string& server_addr() const; + template + void set_server_addr(ArgT0&& arg0, ArgT... args); + std::string* mutable_server_addr(); + PROTOBUF_NODISCARD std::string* release_server_addr(); + void set_allocated_server_addr(std::string* server_addr); + private: + const std::string& _internal_server_addr() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_server_addr(const std::string& value); + std::string* _internal_mutable_server_addr(); + public: + + // string catalog = 2; + void clear_catalog(); + const std::string& catalog() const; + template + void set_catalog(ArgT0&& arg0, ArgT... args); + std::string* mutable_catalog(); + PROTOBUF_NODISCARD std::string* release_catalog(); + void set_allocated_catalog(std::string* catalog); + private: + const std::string& _internal_catalog() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_catalog(const std::string& value); + std::string* _internal_mutable_catalog(); + public: + + // uint64 process_id = 3; + void clear_process_id(); + uint64_t process_id() const; + void set_process_id(uint64_t value); + private: + uint64_t _internal_process_id() const; + void _internal_set_process_id(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.frontend.KillProcessRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr server_addr_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr catalog_; + uint64_t process_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2ffrontend_2fserver_2eproto; +}; +// ------------------------------------------------------------------- + +class KillProcessResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.frontend.KillProcessResponse) */ { + public: + inline KillProcessResponse() : KillProcessResponse(nullptr) {} + ~KillProcessResponse() override; + explicit PROTOBUF_CONSTEXPR KillProcessResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + KillProcessResponse(const KillProcessResponse& from); + KillProcessResponse(KillProcessResponse&& from) noexcept + : KillProcessResponse() { + *this = ::std::move(from); + } + + inline KillProcessResponse& operator=(const KillProcessResponse& from) { + CopyFrom(from); + return *this; + } + inline KillProcessResponse& operator=(KillProcessResponse&& 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 KillProcessResponse& default_instance() { + return *internal_default_instance(); + } + static inline const KillProcessResponse* internal_default_instance() { + return reinterpret_cast( + &_KillProcessResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(KillProcessResponse& a, KillProcessResponse& b) { + a.Swap(&b); + } + inline void Swap(KillProcessResponse* 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(KillProcessResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + KillProcessResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const KillProcessResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const KillProcessResponse& from) { + KillProcessResponse::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(KillProcessResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.frontend.KillProcessResponse"; + } + protected: + explicit KillProcessResponse(::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 { + kSuccessFieldNumber = 1, + }; + // bool success = 1; + void clear_success(); + bool success() const; + void set_success(bool value); + private: + bool _internal_success() const; + void _internal_set_success(bool value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.frontend.KillProcessResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + bool success_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2ffrontend_2fserver_2eproto; +}; +// ------------------------------------------------------------------- + class ProcessInfo final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.frontend.ProcessInfo) */ { public: @@ -428,7 +764,7 @@ class ProcessInfo final : &_ProcessInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 4; friend void swap(ProcessInfo& a, ProcessInfo& b) { a.Swap(&b); @@ -734,6 +1070,154 @@ ListProcessResponse::processes() const { // ------------------------------------------------------------------- +// KillProcessRequest + +// string server_addr = 1; +inline void KillProcessRequest::clear_server_addr() { + _impl_.server_addr_.ClearToEmpty(); +} +inline const std::string& KillProcessRequest::server_addr() const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.KillProcessRequest.server_addr) + return _internal_server_addr(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void KillProcessRequest::set_server_addr(ArgT0&& arg0, ArgT... args) { + + _impl_.server_addr_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.KillProcessRequest.server_addr) +} +inline std::string* KillProcessRequest::mutable_server_addr() { + std::string* _s = _internal_mutable_server_addr(); + // @@protoc_insertion_point(field_mutable:greptime.v1.frontend.KillProcessRequest.server_addr) + return _s; +} +inline const std::string& KillProcessRequest::_internal_server_addr() const { + return _impl_.server_addr_.Get(); +} +inline void KillProcessRequest::_internal_set_server_addr(const std::string& value) { + + _impl_.server_addr_.Set(value, GetArenaForAllocation()); +} +inline std::string* KillProcessRequest::_internal_mutable_server_addr() { + + return _impl_.server_addr_.Mutable(GetArenaForAllocation()); +} +inline std::string* KillProcessRequest::release_server_addr() { + // @@protoc_insertion_point(field_release:greptime.v1.frontend.KillProcessRequest.server_addr) + return _impl_.server_addr_.Release(); +} +inline void KillProcessRequest::set_allocated_server_addr(std::string* server_addr) { + if (server_addr != nullptr) { + + } else { + + } + _impl_.server_addr_.SetAllocated(server_addr, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.server_addr_.IsDefault()) { + _impl_.server_addr_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.frontend.KillProcessRequest.server_addr) +} + +// string catalog = 2; +inline void KillProcessRequest::clear_catalog() { + _impl_.catalog_.ClearToEmpty(); +} +inline const std::string& KillProcessRequest::catalog() const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.KillProcessRequest.catalog) + return _internal_catalog(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void KillProcessRequest::set_catalog(ArgT0&& arg0, ArgT... args) { + + _impl_.catalog_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.KillProcessRequest.catalog) +} +inline std::string* KillProcessRequest::mutable_catalog() { + std::string* _s = _internal_mutable_catalog(); + // @@protoc_insertion_point(field_mutable:greptime.v1.frontend.KillProcessRequest.catalog) + return _s; +} +inline const std::string& KillProcessRequest::_internal_catalog() const { + return _impl_.catalog_.Get(); +} +inline void KillProcessRequest::_internal_set_catalog(const std::string& value) { + + _impl_.catalog_.Set(value, GetArenaForAllocation()); +} +inline std::string* KillProcessRequest::_internal_mutable_catalog() { + + return _impl_.catalog_.Mutable(GetArenaForAllocation()); +} +inline std::string* KillProcessRequest::release_catalog() { + // @@protoc_insertion_point(field_release:greptime.v1.frontend.KillProcessRequest.catalog) + return _impl_.catalog_.Release(); +} +inline void KillProcessRequest::set_allocated_catalog(std::string* catalog) { + if (catalog != nullptr) { + + } else { + + } + _impl_.catalog_.SetAllocated(catalog, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.catalog_.IsDefault()) { + _impl_.catalog_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.frontend.KillProcessRequest.catalog) +} + +// uint64 process_id = 3; +inline void KillProcessRequest::clear_process_id() { + _impl_.process_id_ = uint64_t{0u}; +} +inline uint64_t KillProcessRequest::_internal_process_id() const { + return _impl_.process_id_; +} +inline uint64_t KillProcessRequest::process_id() const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.KillProcessRequest.process_id) + return _internal_process_id(); +} +inline void KillProcessRequest::_internal_set_process_id(uint64_t value) { + + _impl_.process_id_ = value; +} +inline void KillProcessRequest::set_process_id(uint64_t value) { + _internal_set_process_id(value); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.KillProcessRequest.process_id) +} + +// ------------------------------------------------------------------- + +// KillProcessResponse + +// bool success = 1; +inline void KillProcessResponse::clear_success() { + _impl_.success_ = false; +} +inline bool KillProcessResponse::_internal_success() const { + return _impl_.success_; +} +inline bool KillProcessResponse::success() const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.KillProcessResponse.success) + return _internal_success(); +} +inline void KillProcessResponse::_internal_set_success(bool value) { + + _impl_.success_ = value; +} +inline void KillProcessResponse::set_success(bool value) { + _internal_set_success(value); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.KillProcessResponse.success) +} + +// ------------------------------------------------------------------- + // ProcessInfo // uint64 id = 1; @@ -1058,6 +1542,10 @@ inline void ProcessInfo::set_allocated_frontend(std::string* frontend) { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/java/src/main/java/io/greptime/v1/frontend/Server.java b/java/src/main/java/io/greptime/v1/frontend/Server.java index e822a3e..7c5fedc 100644 --- a/java/src/main/java/io/greptime/v1/frontend/Server.java +++ b/java/src/main/java/io/greptime/v1/frontend/Server.java @@ -1379,6 +1379,1400 @@ public final class Server { } + public interface KillProcessRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.frontend.KillProcessRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Frontend server address of process.
+     * 
+ * + * string server_addr = 1; + * @return The serverAddr. + */ + java.lang.String getServerAddr(); + /** + *
+     * Frontend server address of process.
+     * 
+ * + * string server_addr = 1; + * @return The bytes for serverAddr. + */ + com.google.protobuf.ByteString + getServerAddrBytes(); + + /** + *
+     * Catalog of process to kill.
+     * 
+ * + * string catalog = 2; + * @return The catalog. + */ + java.lang.String getCatalog(); + /** + *
+     * Catalog of process to kill.
+     * 
+ * + * string catalog = 2; + * @return The bytes for catalog. + */ + com.google.protobuf.ByteString + getCatalogBytes(); + + /** + *
+     * ID of process to kill.
+     * 
+ * + * uint64 process_id = 3; + * @return The processId. + */ + long getProcessId(); + } + /** + * Protobuf type {@code greptime.v1.frontend.KillProcessRequest} + */ + public static final class KillProcessRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.frontend.KillProcessRequest) + KillProcessRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use KillProcessRequest.newBuilder() to construct. + private KillProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KillProcessRequest() { + serverAddr_ = ""; + catalog_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KillProcessRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KillProcessRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + serverAddr_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + catalog_ = s; + break; + } + case 24: { + + processId_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_KillProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_KillProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.frontend.Server.KillProcessRequest.class, io.greptime.v1.frontend.Server.KillProcessRequest.Builder.class); + } + + public static final int SERVER_ADDR_FIELD_NUMBER = 1; + private volatile java.lang.Object serverAddr_; + /** + *
+     * Frontend server address of process.
+     * 
+ * + * string server_addr = 1; + * @return The serverAddr. + */ + @java.lang.Override + public java.lang.String getServerAddr() { + java.lang.Object ref = serverAddr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serverAddr_ = s; + return s; + } + } + /** + *
+     * Frontend server address of process.
+     * 
+ * + * string server_addr = 1; + * @return The bytes for serverAddr. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServerAddrBytes() { + java.lang.Object ref = serverAddr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serverAddr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CATALOG_FIELD_NUMBER = 2; + private volatile java.lang.Object catalog_; + /** + *
+     * Catalog of process to kill.
+     * 
+ * + * string catalog = 2; + * @return The catalog. + */ + @java.lang.Override + public java.lang.String getCatalog() { + java.lang.Object ref = catalog_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + catalog_ = s; + return s; + } + } + /** + *
+     * Catalog of process to kill.
+     * 
+ * + * string catalog = 2; + * @return The bytes for catalog. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCatalogBytes() { + java.lang.Object ref = catalog_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + catalog_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROCESS_ID_FIELD_NUMBER = 3; + private long processId_; + /** + *
+     * ID of process to kill.
+     * 
+ * + * uint64 process_id = 3; + * @return The processId. + */ + @java.lang.Override + public long getProcessId() { + return processId_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverAddr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serverAddr_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, catalog_); + } + if (processId_ != 0L) { + output.writeUInt64(3, processId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverAddr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serverAddr_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, catalog_); + } + if (processId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, processId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.frontend.Server.KillProcessRequest)) { + return super.equals(obj); + } + io.greptime.v1.frontend.Server.KillProcessRequest other = (io.greptime.v1.frontend.Server.KillProcessRequest) obj; + + if (!getServerAddr() + .equals(other.getServerAddr())) return false; + if (!getCatalog() + .equals(other.getCatalog())) return false; + if (getProcessId() + != other.getProcessId()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVER_ADDR_FIELD_NUMBER; + hash = (53 * hash) + getServerAddr().hashCode(); + hash = (37 * hash) + CATALOG_FIELD_NUMBER; + hash = (53 * hash) + getCatalog().hashCode(); + hash = (37 * hash) + PROCESS_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getProcessId()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.frontend.Server.KillProcessRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.KillProcessRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.KillProcessRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.KillProcessRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.KillProcessRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.KillProcessRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.KillProcessRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.KillProcessRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.KillProcessRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.KillProcessRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.KillProcessRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.KillProcessRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.frontend.Server.KillProcessRequest 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.frontend.KillProcessRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.frontend.KillProcessRequest) + io.greptime.v1.frontend.Server.KillProcessRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_KillProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_KillProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.frontend.Server.KillProcessRequest.class, io.greptime.v1.frontend.Server.KillProcessRequest.Builder.class); + } + + // Construct using io.greptime.v1.frontend.Server.KillProcessRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + serverAddr_ = ""; + + catalog_ = ""; + + processId_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_KillProcessRequest_descriptor; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.KillProcessRequest getDefaultInstanceForType() { + return io.greptime.v1.frontend.Server.KillProcessRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.KillProcessRequest build() { + io.greptime.v1.frontend.Server.KillProcessRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.KillProcessRequest buildPartial() { + io.greptime.v1.frontend.Server.KillProcessRequest result = new io.greptime.v1.frontend.Server.KillProcessRequest(this); + result.serverAddr_ = serverAddr_; + result.catalog_ = catalog_; + result.processId_ = processId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.frontend.Server.KillProcessRequest) { + return mergeFrom((io.greptime.v1.frontend.Server.KillProcessRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.frontend.Server.KillProcessRequest other) { + if (other == io.greptime.v1.frontend.Server.KillProcessRequest.getDefaultInstance()) return this; + if (!other.getServerAddr().isEmpty()) { + serverAddr_ = other.serverAddr_; + onChanged(); + } + if (!other.getCatalog().isEmpty()) { + catalog_ = other.catalog_; + onChanged(); + } + if (other.getProcessId() != 0L) { + setProcessId(other.getProcessId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.frontend.Server.KillProcessRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.frontend.Server.KillProcessRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serverAddr_ = ""; + /** + *
+       * Frontend server address of process.
+       * 
+ * + * string server_addr = 1; + * @return The serverAddr. + */ + public java.lang.String getServerAddr() { + java.lang.Object ref = serverAddr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serverAddr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Frontend server address of process.
+       * 
+ * + * string server_addr = 1; + * @return The bytes for serverAddr. + */ + public com.google.protobuf.ByteString + getServerAddrBytes() { + java.lang.Object ref = serverAddr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serverAddr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Frontend server address of process.
+       * 
+ * + * string server_addr = 1; + * @param value The serverAddr to set. + * @return This builder for chaining. + */ + public Builder setServerAddr( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serverAddr_ = value; + onChanged(); + return this; + } + /** + *
+       * Frontend server address of process.
+       * 
+ * + * string server_addr = 1; + * @return This builder for chaining. + */ + public Builder clearServerAddr() { + + serverAddr_ = getDefaultInstance().getServerAddr(); + onChanged(); + return this; + } + /** + *
+       * Frontend server address of process.
+       * 
+ * + * string server_addr = 1; + * @param value The bytes for serverAddr to set. + * @return This builder for chaining. + */ + public Builder setServerAddrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serverAddr_ = value; + onChanged(); + return this; + } + + private java.lang.Object catalog_ = ""; + /** + *
+       * Catalog of process to kill.
+       * 
+ * + * string catalog = 2; + * @return The catalog. + */ + public java.lang.String getCatalog() { + java.lang.Object ref = catalog_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + catalog_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Catalog of process to kill.
+       * 
+ * + * string catalog = 2; + * @return The bytes for catalog. + */ + public com.google.protobuf.ByteString + getCatalogBytes() { + java.lang.Object ref = catalog_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + catalog_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Catalog of process to kill.
+       * 
+ * + * string catalog = 2; + * @param value The catalog to set. + * @return This builder for chaining. + */ + public Builder setCatalog( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + catalog_ = value; + onChanged(); + return this; + } + /** + *
+       * Catalog of process to kill.
+       * 
+ * + * string catalog = 2; + * @return This builder for chaining. + */ + public Builder clearCatalog() { + + catalog_ = getDefaultInstance().getCatalog(); + onChanged(); + return this; + } + /** + *
+       * Catalog of process to kill.
+       * 
+ * + * string catalog = 2; + * @param value The bytes for catalog to set. + * @return This builder for chaining. + */ + public Builder setCatalogBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + catalog_ = value; + onChanged(); + return this; + } + + private long processId_ ; + /** + *
+       * ID of process to kill.
+       * 
+ * + * uint64 process_id = 3; + * @return The processId. + */ + @java.lang.Override + public long getProcessId() { + return processId_; + } + /** + *
+       * ID of process to kill.
+       * 
+ * + * uint64 process_id = 3; + * @param value The processId to set. + * @return This builder for chaining. + */ + public Builder setProcessId(long value) { + + processId_ = value; + onChanged(); + return this; + } + /** + *
+       * ID of process to kill.
+       * 
+ * + * uint64 process_id = 3; + * @return This builder for chaining. + */ + public Builder clearProcessId() { + + processId_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.frontend.KillProcessRequest) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.frontend.KillProcessRequest) + private static final io.greptime.v1.frontend.Server.KillProcessRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.frontend.Server.KillProcessRequest(); + } + + public static io.greptime.v1.frontend.Server.KillProcessRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KillProcessRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KillProcessRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.KillProcessRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface KillProcessResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.frontend.KillProcessResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Whether targeting process is successfully killed
+     * 
+ * + * bool success = 1; + * @return The success. + */ + boolean getSuccess(); + } + /** + * Protobuf type {@code greptime.v1.frontend.KillProcessResponse} + */ + public static final class KillProcessResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.frontend.KillProcessResponse) + KillProcessResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use KillProcessResponse.newBuilder() to construct. + private KillProcessResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KillProcessResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KillProcessResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KillProcessResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + success_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_KillProcessResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_KillProcessResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.frontend.Server.KillProcessResponse.class, io.greptime.v1.frontend.Server.KillProcessResponse.Builder.class); + } + + public static final int SUCCESS_FIELD_NUMBER = 1; + private boolean success_; + /** + *
+     * Whether targeting process is successfully killed
+     * 
+ * + * bool success = 1; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + + 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 (success_ != false) { + output.writeBool(1, success_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (success_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, success_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.frontend.Server.KillProcessResponse)) { + return super.equals(obj); + } + io.greptime.v1.frontend.Server.KillProcessResponse other = (io.greptime.v1.frontend.Server.KillProcessResponse) obj; + + if (getSuccess() + != other.getSuccess()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSuccess()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.frontend.Server.KillProcessResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.KillProcessResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.KillProcessResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.KillProcessResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.KillProcessResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.KillProcessResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.KillProcessResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.KillProcessResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.KillProcessResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.KillProcessResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.KillProcessResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.KillProcessResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.frontend.Server.KillProcessResponse 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.frontend.KillProcessResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.frontend.KillProcessResponse) + io.greptime.v1.frontend.Server.KillProcessResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_KillProcessResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_KillProcessResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.frontend.Server.KillProcessResponse.class, io.greptime.v1.frontend.Server.KillProcessResponse.Builder.class); + } + + // Construct using io.greptime.v1.frontend.Server.KillProcessResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + success_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_KillProcessResponse_descriptor; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.KillProcessResponse getDefaultInstanceForType() { + return io.greptime.v1.frontend.Server.KillProcessResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.KillProcessResponse build() { + io.greptime.v1.frontend.Server.KillProcessResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.KillProcessResponse buildPartial() { + io.greptime.v1.frontend.Server.KillProcessResponse result = new io.greptime.v1.frontend.Server.KillProcessResponse(this); + result.success_ = success_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.frontend.Server.KillProcessResponse) { + return mergeFrom((io.greptime.v1.frontend.Server.KillProcessResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.frontend.Server.KillProcessResponse other) { + if (other == io.greptime.v1.frontend.Server.KillProcessResponse.getDefaultInstance()) return this; + if (other.getSuccess() != false) { + setSuccess(other.getSuccess()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.frontend.Server.KillProcessResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.frontend.Server.KillProcessResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean success_ ; + /** + *
+       * Whether targeting process is successfully killed
+       * 
+ * + * bool success = 1; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + /** + *
+       * Whether targeting process is successfully killed
+       * 
+ * + * bool success = 1; + * @param value The success to set. + * @return This builder for chaining. + */ + public Builder setSuccess(boolean value) { + + success_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether targeting process is successfully killed
+       * 
+ * + * bool success = 1; + * @return This builder for chaining. + */ + public Builder clearSuccess() { + + success_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.frontend.KillProcessResponse) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.frontend.KillProcessResponse) + private static final io.greptime.v1.frontend.Server.KillProcessResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.frontend.Server.KillProcessResponse(); + } + + public static io.greptime.v1.frontend.Server.KillProcessResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KillProcessResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KillProcessResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.KillProcessResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + public interface ProcessInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.frontend.ProcessInfo) com.google.protobuf.MessageOrBuilder { @@ -3023,6 +4417,16 @@ public final class Server { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_frontend_ListProcessResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_frontend_KillProcessRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_frontend_KillProcessRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_frontend_KillProcessResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_frontend_KillProcessResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_frontend_ProcessInfo_descriptor; private static final @@ -3041,16 +4445,21 @@ public final class Server { "ptime.v1.frontend\"%\n\022ListProcessRequest\022" + "\017\n\007catalog\030\001 \001(\t\"K\n\023ListProcessResponse\022" + "4\n\tprocesses\030\001 \003(\0132!.greptime.v1.fronten" + - "d.ProcessInfo\"\205\001\n\013ProcessInfo\022\n\n\002id\030\001 \001(" + + "d.ProcessInfo\"N\n\022KillProcessRequest\022\023\n\013s" + + "erver_addr\030\001 \001(\t\022\017\n\007catalog\030\002 \001(\t\022\022\n\npro" + + "cess_id\030\003 \001(\004\"&\n\023KillProcessResponse\022\017\n\007" + + "success\030\001 \001(\010\"\205\001\n\013ProcessInfo\022\n\n\002id\030\001 \001(" + "\004\022\017\n\007catalog\030\002 \001(\t\022\017\n\007schemas\030\003 \003(\t\022\r\n\005q" + "uery\030\004 \001(\t\022\027\n\017start_timestamp\030\005 \001(\003\022\016\n\006c" + - "lient\030\006 \001(\t\022\020\n\010frontend\030\007 \001(\t2n\n\010Fronten" + - "d\022b\n\013ListProcess\022(.greptime.v1.frontend." + - "ListProcessRequest\032).greptime.v1.fronten" + - "d.ListProcessResponseBa\n\027io.greptime.v1." + - "frontendB\006ServerZ>github.com/GreptimeTea" + - "m/greptime-proto/go/greptime/v1/frontend" + - "b\006proto3" + "lient\030\006 \001(\t\022\020\n\010frontend\030\007 \001(\t2\322\001\n\010Fronte" + + "nd\022b\n\013ListProcess\022(.greptime.v1.frontend" + + ".ListProcessRequest\032).greptime.v1.fronte" + + "nd.ListProcessResponse\022b\n\013KillProcess\022(." + + "greptime.v1.frontend.KillProcessRequest\032" + + ").greptime.v1.frontend.KillProcessRespon" + + "seBa\n\027io.greptime.v1.frontendB\006ServerZ>g" + + "ithub.com/GreptimeTeam/greptime-proto/go" + + "/greptime/v1/frontendb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -3068,8 +4477,20 @@ public final class Server { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_frontend_ListProcessResponse_descriptor, new java.lang.String[] { "Processes", }); - internal_static_greptime_v1_frontend_ProcessInfo_descriptor = + internal_static_greptime_v1_frontend_KillProcessRequest_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_greptime_v1_frontend_KillProcessRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_frontend_KillProcessRequest_descriptor, + new java.lang.String[] { "ServerAddr", "Catalog", "ProcessId", }); + internal_static_greptime_v1_frontend_KillProcessResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_greptime_v1_frontend_KillProcessResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_frontend_KillProcessResponse_descriptor, + new java.lang.String[] { "Success", }); + internal_static_greptime_v1_frontend_ProcessInfo_descriptor = + getDescriptor().getMessageTypes().get(4); internal_static_greptime_v1_frontend_ProcessInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_frontend_ProcessInfo_descriptor, diff --git a/proto/greptime/v1/frontend/server.proto b/proto/greptime/v1/frontend/server.proto index e7cd8f9..77a680e 100644 --- a/proto/greptime/v1/frontend/server.proto +++ b/proto/greptime/v1/frontend/server.proto @@ -23,6 +23,8 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/front service Frontend { // List all running processes on frontend. rpc ListProcess(ListProcessRequest) returns (ListProcessResponse); + // Kill a running process on frontend. + rpc KillProcess(KillProcessRequest) returns (KillProcessResponse); } message ListProcessRequest { @@ -33,6 +35,20 @@ message ListProcessResponse { repeated ProcessInfo processes = 1; } +message KillProcessRequest { + // Frontend server address of process. + string server_addr = 1; + // Catalog of process to kill. + string catalog = 2; + // ID of process to kill. + uint64 process_id = 3; +} + +message KillProcessResponse { + // Whether targeting process is successfully killed + bool success = 1; +} + message ProcessInfo { // ID. uint64 id = 1;