查詢當前表下一個任務的狀態、提交參數及執行結果。
許可權說明
|
API |
Action |
說明 |
|
GetLanceTaskStatus |
oss:GetTableMaintenanceJobStatus |
查詢單個維護任務。 |
請求文法
GET /lance/oss/v1/table/{id}/tasks/{task_id} HTTP/1.1
Host: {tableBucketHost}
Date: GMT Date
Authorization: SignatureValue
請求參數
無業務請求 Body。 本節介面的公用約定(訪問地址、表標識、請求與回應標頭、許可權、非同步提交與額度、狀態、錯誤碼)見 Lance 表維護。
|
參數 |
位置 |
資料類型 |
是否必須 |
描述 |
|
id |
path |
string |
是 |
當前表標識,預設 namespace$table_name。 |
|
task_id |
path |
string |
是 |
Submit 返回的任務 ID。 |
|
delimiter |
query |
string |
否 |
表標識分隔字元,預設 $。 |
響應
HTTP/1.1 200 OK
Content-Type: application/json
x-oss-table-id: {table_id}
{
"task_info": {
"task_id": "11111111111111111111111111111111",
"task_type": "lance_compact",
"params": {
"target_rows_per_fragment": 1048576,
"materialize_deletions": true,
"materialize_deletions_threshold": 0.1,
"max_rows_per_group": 1024,
"max_bytes_per_file": 0,
"compaction_mode": "reencode"
},
"status": "submitted",
"created_at": "2026-09-18T04:00:00.000000+00:00",
"started_at": "",
"completed_at": "",
"result": {},
"error": null
}
}
|
欄位 |
類型 |
描述 |
|
task_id |
string |
任務 ID。 |
|
task_type |
string |
五種 lance_ 首碼類型之一。 |
|
params |
object |
實際儲存的任務參數,包含服務端補齊的預設值。 |
|
status |
string |
當前任務狀態。 |
|
created_at |
string |
任務建立時間。 |
|
started_at |
string |
任務開始時間;未開始時為空白字串。 |
|
completed_at |
string |
進入終態的時間;非終態時為空白字串。 |
|
result |
object |
任務執行結果,初始為 {};可以包含嵌套對象和數組,不同任務類型的結果結構不固定。 |
|
error |
object 或 null |
已知狀態為 failed 時包含錯誤對象;其他已知狀態為 null。 |
頂層只有 task_info,其對象結構見上表。樣本 ID 和時間僅用於說明。不存在和不屬於當前表的任務都返回 404 / TaskNotFound / 10000。
錯誤碼
本介面使用 Lance 統一 JSON 錯誤格式,通用錯誤碼與錯誤響應結構見公用約定中的 錯誤響應格式。