調用 ParallelScan 介面並發掃描資料。
請求訊息結構
message ParallelScanRequest {
optional string table_name = 1;
optional string index_name = 2;
optional ColumnsToGet columns_to_get = 3;
optional bytes session_id = 4;
optional ScanQuery scan_query = 5;
optional int32 timeout_ms = 6;
}
|
名稱 |
類型 |
是否必選 |
描述 |
|
table_name |
string |
是 |
資料表名稱。 |
|
index_name |
string |
是 |
多元索引名稱。 |
|
columns_to_get |
否 |
要返回的列。 |
|
|
session_id |
bytes |
否 |
會話 ID,用於保證掃描結果集穩定,由 protobuf 編碼。 |
|
scan_query |
是 |
掃描查詢配置。 |
|
|
timeout_ms |
int32 |
否 |
掃描逾時時間,單位為毫秒。 |
響應訊息結構
message ParallelScanResponse {
repeated bytes rows = 1;
optional bytes next_token = 2;
}
|
名稱 |
類型 |
是否必選 |
描述 |
|
rows |
bytes |
否 |
返回的行資料,使用 PlainBuffer 編碼。詳見PlainBuffer。 |
|
next_token |
bytes |
否 |
下次掃描的起始位置。 |
使用 SDK
以下SDK支援並發掃描資料: