Updated on 2023-06-21 GMT+08:00

Querying a Dump Task List

Initialize a DIS SDK client instance named dic. For details, see Initializing a DIS SDK Client Instance.

You can use the DIS SDK to query the dump task list of a specified stream.

1
2
3
4
ListTransferTasksRquest request = new ListTransferTasksRquest();

//Configure the name of the stream to be queried.
request.setStreamName(streamName);

After configuring ListTransferTaskRequest, you can call the listTransferTask method to query the dump task list of a specified stream.

1
ListTransferTasksResult result = dic.listTransferTasks(request);

Information similar to the following is displayed when you query the dump task list:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
{
    "tasks":[
        {
            "destination_type":"DLI",
            "task_name":"task_Ztab",
            "create_time":1552457808502,
            "state":"RUNNING",
            "last_transfer_timestamp":1552458085454
        },
        {
            "destination_type":"OBS",
            "task_name":"task_qTd9",
            "create_time":1552355757885,
            "state":"RUNNING",
            "last_transfer_timestamp":1552458158527
        }
    ],
    "total_number":2
}