Files
orion_greptime_proto/proto/greptime/v1/frontend/server.proto
T
Lei, HUANG f0913f179e feat: kill process rpc service (#244)
* feat/kill-process:
 ### Add KillProcess RPC Method

 - **Added `KillProcess` RPC Method**: Introduced a new RPC method `KillProcess` in the `Frontend` service to allow killing a running process on the frontend.
   - Updated files: `server.grpc.pb.cc`, `server.grpc.pb.h`, `server.pb.cc`, `server.pb.h`, `server.proto`
   - Added new request and response messages: `KillProcessRequest` and `KillProcessResponse`.

 - **Java Bindings**: Updated Java bindings to include the new `KillProcess` method.
   - Updated file: `Server.java`

* feat/kill-process:
 **Update `server.proto` for KillProcessRequest and KillProcessResponse**

 - Added `server_addr` field to `KillProcessRequest` for specifying the frontend server address.
 - Changed field numbers for `catalog` and `process_id` in `KillProcessRequest`.
 - Enhanced `KillProcessResponse` to include a `found` boolean indicating if the target process was located.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* rename found to success

---------

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
2025-06-13 20:53:07 +08:00

68 lines
1.8 KiB
Protocol Buffer

// Copyright 2023 Greptime Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package greptime.v1.frontend;
option java_package = "io.greptime.v1.frontend";
option java_outer_classname = "Server";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/frontend";
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 {
string catalog = 1;
}
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;
// Catalog of process.
string catalog = 2;
// Involved schemas.
repeated string schemas = 3;
// Query string.
string query = 4;
// Start time.
int64 start_timestamp = 5;
// Client info.
string client = 6;
// Frontend info of process.
string frontend = 7;
}