You need to enable JavaScript to run this app.
文档中心
向量数据库VikingDB

向量数据库VikingDB

复制全文
下载 pdf
任务(Task)
getVikingdbTask
复制全文
下载 pdf
getVikingdbTask

概述

查询指定 task 的详情信息和执行进度。

方法定义
public GetVikingdbTaskResponse getVikingdbTask(GetVikingdbTaskRequest body) throws ApiException

请求参数

字段名

类型

必须

说明

taskId

string

任务 ID,在创建任务时返回

返回参数

属性

类型

说明

taskId

string

任务 ID

taskType

string

任务类型

taskStatus

string

任务状态

updatePerson

string

任务更新人

updateTime

string

任务信息更新时间

createTime

string

任务信息创建时间

taskProcessInfo

TaskProcessInfoForGetVikingdbTaskOutput

任务处理信息,见下

  • taskType 类型包括

taskType
data_import

说明
数据导入任务

data_export

数据导出任务

filter_update

数据过滤更新任务

filter_delete

数据过滤删除任务

  • taskStatus 任务状态包括

init

queued

confirm

confirmed

running

done

fail

初始化中

排队中

需要人工确认

已确认

执行中

完成

失败

  • TaskProcessInfoForGetVikingdbTaskOutput

字段

类型

说明

taskProgress

string

任务进度,例如 50%

errorMessage

string

任务错误信息

sampleData

List[SampleDataForGetVikingdbTaskOutput]

采样 5 条数据用于展示

sampleTimestamp

Integer

采样的时间戳,该时间戳之后写入的数据不会被处理

scanDataCount

Integer

当前扫描数据量

totalDataCount

Integer

Collection 数据总条数(预估)

totalFilterCount

Integer

已过滤出的数据条数

示例

请求参数

package org.example.newsubproduct.console.task;

import com.volcengine.ApiClient;
import com.volcengine.ApiException;
import com.volcengine.sign.Credentials;
import com.volcengine.vikingdb.VikingdbApi;
import com.volcengine.vikingdb.model.*;

public class GetVikingdbTask {
    public static void main(String[] args) {
        String ak = System.getenv("AK"); // ak
        String sk = System.getenv("SK"); // sk
        String endpoint = "vikingdb.cn-beijing.volcengineapi.com"; // 填写向量库控制面 V2 的域名  https://www.volcengine.com/docs/84313/1792715
        String region = "cn-beijing"; // 服务区域

        ApiClient apiClient = new ApiClient()
                .setEndpoint(endpoint)
                .setCredentials(Credentials.getCredentials(ak, sk))
                .setRegion(region);

        VikingdbApi api = new VikingdbApi(apiClient);

        GetVikingdbTaskRequest request = new GetVikingdbTaskRequest()
                .taskId("ff39477b-a7f4-5f63-abd5-1592aaf6dc0c");

        try {
            GetVikingdbTaskResponse response = api.getVikingdbTask(request);
            System.out.println("response body: " + response);
            System.out.println();
            System.out.println("response meta RequestId: " + response.getResponseMetadata().getRequestId());
            System.out.println("response meta Service: " + response.getResponseMetadata().getService());
            System.out.println("response meta Region: " + response.getResponseMetadata().getRegion());
            System.out.println("response meta Action: " + response.getResponseMetadata().getAction());
            System.out.println("response meta Version: " + response.getResponseMetadata().getVersion());
        } catch (ApiException e) {
            System.out.println("exception http code: " + e.getCode());
            System.out.println("exception response body: " + e.getResponseBody());
            System.out.println();
            System.out.println("exception RequestId: " + e.getResponseMetadata().getRequestId());
            System.out.println("exception Action: " + e.getResponseMetadata().getAction());
            System.out.println("exception Region: " + e.getResponseMetadata().getRegion());
            System.out.println("exception Service: " + e.getResponseMetadata().getService());
            System.out.println("exception Error.Code: " + e.getResponseMetadata().getError().getCode());
            System.out.println("exception Error.Message: " + e.getResponseMetadata().getError().getMessage());
        }
    }
}
最近更新时间:2026.04.14 15:03:24
这个页面对您有帮助吗?
有用
有用
无用
无用