Skip to content

Commit 7808564

Browse files
committed
fix proto
1 parent ae488e3 commit 7808564

File tree

2 files changed

+98
-20
lines changed

2 files changed

+98
-20
lines changed

fluss-rpc/src/main/java/org/apache/fluss/rpc/protocol/ApiKeys.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -63,26 +63,26 @@ public enum ApiKeys {
6363
GET_LATEST_LAKE_SNAPSHOT(1032, 0, 0, PUBLIC),
6464
LIMIT_SCAN(1033, 0, 0, PUBLIC),
6565
PREFIX_LOOKUP(1034, 0, 0, PUBLIC),
66-
SCAN_KV(1035, 0, 0, PUBLIC),
67-
SCANNER_KEEP_ALIVE(1036, 0, 0, PUBLIC),
68-
GET_DATABASE_INFO(1037, 0, 0, PUBLIC),
69-
CREATE_PARTITION(1038, 0, 0, PUBLIC),
70-
DROP_PARTITION(1039, 0, 0, PUBLIC),
71-
AUTHENTICATE(1040, 0, 0, PUBLIC),
72-
CREATE_ACLS(1041, 0, 0, PUBLIC),
73-
LIST_ACLS(1042, 0, 0, PUBLIC),
74-
DROP_ACLS(1043, 0, 0, PUBLIC),
75-
LAKE_TIERING_HEARTBEAT(1044, 0, 0, PRIVATE),
76-
CONTROLLED_SHUTDOWN(1045, 0, 0, PRIVATE),
77-
ALTER_TABLE(1046, 0, 0, PUBLIC),
78-
DESCRIBE_CLUSTER_CONFIGS(1047, 0, 0, PUBLIC),
79-
ALTER_CLUSTER_CONFIGS(1048, 0, 0, PUBLIC),
80-
ADD_SERVER_TAG(1049, 0, 0, PUBLIC),
81-
REMOVE_SERVER_TAG(1050, 0, 0, PUBLIC),
82-
REBALANCE(1051, 0, 0, PUBLIC),
83-
LIST_REBALANCE_PROGRESS(1052, 0, 0, PUBLIC),
84-
CANCEL_REBALANCE(1053, 0, 0, PUBLIC),
85-
PREPARE_LAKE_TABLE_SNAPSHOT(1054, 0, 0, PRIVATE);
66+
GET_DATABASE_INFO(1035, 0, 0, PUBLIC),
67+
CREATE_PARTITION(1036, 0, 0, PUBLIC),
68+
DROP_PARTITION(1037, 0, 0, PUBLIC),
69+
AUTHENTICATE(1038, 0, 0, PUBLIC),
70+
CREATE_ACLS(1039, 0, 0, PUBLIC),
71+
LIST_ACLS(1040, 0, 0, PUBLIC),
72+
DROP_ACLS(1041, 0, 0, PUBLIC),
73+
LAKE_TIERING_HEARTBEAT(1042, 0, 0, PRIVATE),
74+
CONTROLLED_SHUTDOWN(1043, 0, 0, PRIVATE),
75+
ALTER_TABLE(1044, 0, 0, PUBLIC),
76+
DESCRIBE_CLUSTER_CONFIGS(1045, 0, 0, PUBLIC),
77+
ALTER_CLUSTER_CONFIGS(1046, 0, 0, PUBLIC),
78+
ADD_SERVER_TAG(1047, 0, 0, PUBLIC),
79+
REMOVE_SERVER_TAG(1048, 0, 0, PUBLIC),
80+
REBALANCE(1049, 0, 0, PUBLIC),
81+
LIST_REBALANCE_PROGRESS(1050, 0, 0, PUBLIC),
82+
CANCEL_REBALANCE(1051, 0, 0, PUBLIC),
83+
PREPARE_LAKE_TABLE_SNAPSHOT(1052, 0, 0, PRIVATE),
84+
SCAN_KV(1053, 0, 0, PUBLIC),
85+
SCANNER_KEEP_ALIVE(1054, 0, 0, PUBLIC);
8686

8787
private static final Map<Integer, ApiKeys> ID_TO_TYPE =
8888
Arrays.stream(ApiKeys.values())

fluss-rpc/src/main/proto/FlussApi.proto

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,84 @@ message PrefixLookupResponse {
255255
}
256256

257257

258+
// scan kv request and response
259+
message ScanKvRequest {
260+
// If continuing an existing scan, then you must set scanner_id.
261+
// Otherwise, you must set 'new_scan_request'.
262+
optional bytes scanner_id = 1;
263+
optional PbScanReqForBucket bucket_scan_req = 2;
264+
265+
// The sequence ID of this call. The sequence ID should start at 0
266+
// with the request for a new scanner, and after each successful request,
267+
// the client should increment it by 1. When retrying a request, the client
268+
// should _not_ increment this value. If the server detects that the client
269+
// missed a chunk of rows from the middle of a scan, it will respond with an
270+
// error.
271+
optional uint32 call_seq_id = 3;
272+
273+
// The maximum number of bytes to send in the response.
274+
optional uint32 batch_size_bytes = 4;
275+
276+
// If set, the server will close the scanner after responding to
277+
// this request, regardless of whether all rows have been delivered.
278+
optional bool close_scanner = 5;
279+
}
280+
281+
message PbScanReqForBucket {
282+
// The tablet to scan.
283+
required int64 table_id = 1;
284+
optional int64 partition_id = 2;
285+
required int32 bucket_id = 3;
286+
287+
// The maximum number of rows to scan with the new scanner.
288+
//
289+
// The scanner will automatically stop yielding results and close itself
290+
// after reaching this number of result rows.
291+
optional uint64 limit = 4;
292+
}
293+
294+
message ScanKvResponse {
295+
// The error, if an error occurred with this request.
296+
optional int32 error_code = 1;
297+
optional string error_message = 2;
298+
299+
// When a scanner is created, returns the scanner ID which may be used
300+
// to pull new rows from the scanner.
301+
optional bytes scanner_id = 3;
302+
303+
// Set to true to indicate that there may be further results to be fetched
304+
// from this scanner. If the scanner has no more results, then the scanner
305+
// ID will become invalid and cannot continue to be used.
306+
//
307+
// Note that if a scan returns no results, then the initial response from
308+
// the first RPC may return false in this flag, in which case there will
309+
// be no scanner ID assigned.
310+
optional bool has_more_results = 4;
311+
312+
// The block of returned rows.
313+
//
314+
// NOTE: the schema-related fields will not be present in this row block.
315+
// The schema will match the schema requested by the client when it created
316+
// the scanner.
317+
optional bytes records = 5;
318+
319+
// Returns the corresponding log offset at the time the scanner is created
320+
optional int64 log_offset = 6;
321+
}
322+
323+
// A scanner keep-alive request.
324+
// Updates the scanner access time, increasing its time-to-live.
325+
message ScannerKeepAliveRequest {
326+
required bytes scanner_id = 1;
327+
}
328+
329+
message ScannerKeepAliveResponse {
330+
// The error, if an error occurred with this request.
331+
optional int32 error_code = 1;
332+
optional string error_message = 2;
333+
}
334+
335+
258336
// limit scan request and response
259337
message LimitScanRequest {
260338
required int64 table_id = 2;

0 commit comments

Comments
 (0)