List delivery tasks

Updated at:

Tablestore SDK for Java lists delivery tasks for a data table and returns the name and type of each task.

Prerequisites

  • Install the Tablestore SDK for Java and initialize a client. Data delivery requires version 5.10.3 or later. We recommend that you use the latest version.

Description

Call listDeliveryTask to list all delivery tasks for a specified data table.

public ListDeliveryTaskResponse listDeliveryTask(ListDeliveryTaskRequest request)
        throws TableStoreException, ClientException

The following sample lists the delivery tasks for the example_table data table and prints summary information about each task. client is an initialized client.

String tableName = "example_table";
ListDeliveryTaskRequest request = new ListDeliveryTaskRequest(tableName);

ListDeliveryTaskResponse response = client.listDeliveryTask(request);
for (DeliveryTaskInfo taskInfo : response.getTaskInfos()) {
    System.out.println("tableName: " + taskInfo.getTableName());
    System.out.println("taskName: " + taskInfo.getTaskName());
    System.out.println("taskType: " + taskInfo.getTaskType());
}

Parameters

request is of the ListDeliveryTaskRequest type and contains the following parameter.

Name

Type

Description

tableName (required)

String

The name of the data table.

Response

The method returns a ListDeliveryTaskResponse object. taskInfos is of the List<DeliveryTaskInfo> type and contains summaries of the delivery tasks for the specified data table. If the data table has no delivery tasks, an empty list is returned.

Delivery task information

Each element in taskInfos[] is of the DeliveryTaskInfo type and contains the following fields.

Name

Type

Description

tableName

String

The name of the data table.

taskName

String

The name of the delivery task.

taskType

DeliveryTaskType

The type of the delivery task. Valid values: BASE for full delivery, INC for incremental delivery, and BASE_INC for full delivery followed by continuous incremental delivery.