Querying a Dump Task
Function
This API is used to query a dump task.
This API is out-of-date and may not be maintained in the future. Please use the API described in Querying Smart Connect Tasks.
Call Method
For details, see How to Call an API.
URI
GET /v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. |
| connector_id | Yes | String | Instance dump ID. For details, see Querying Instance IDs. |
| task_id | Yes | String | Dump task ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| topic-info | No | String | Whether topic information is contained. The default value is false. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| task_name | String | Name of a dump task. |
| destination_type | String | Type of the dump task. |
| create_time | Long | Time when the dump task is created. |
| status | String | Dump task status. |
| topics | String | Topic list or topic regular expression of the dump task. |
| obs_destination_descriptor | obs_destination_descriptor object | Description of the dump. |
| topics_info | Array of topics_info objects | Topic information. |
| Parameter | Type | Description |
|---|---|---|
| consumer_strategy | String | Message consumption policy:
The default value is latest. |
| destination_file_type | String | Dump file format. Only text is supported. |
| obs_bucket_name | String | Name of the OBS bucket used to store the data. |
| obs_path | String | OBS path. |
| partition_format | String | Directory structure of the object file written into OBS. The directory structure is in the format of yyyy/MM/dd/HH/mm (time at which the dump task was created).
NOTE: After the data is dumped successfully, the storage directory structure is obs_bucket_path/file_prefix/partition_format. The default time zone is GMT+08:00. |
| record_delimiter | String | Delimiter for the dump file, which is used to separate the user data that is written into the dump file. Value range:
Default value: newline (\n). |
| deliver_time_interval | Integer | User-defined interval at which data is periodically imported to OBS. No package files will be generated if there is no data within an interval. Value range: 30-900. Default value: 300. Unit: second. NOTE: This parameter is mandatory if streaming data is dumped to OBS. |
| obs_part_size | Long | Size (in bytes) of each file to be uploaded. Default value: 5242880. |
| Parameter | Type | Description |
|---|---|---|
| topic | String | Topic name. |
| partitions | Array of partitions objects | Partition list. |
Example Request
Querying specified dump task details
GET https://{endpoint}/v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}?topic-info=true Example Response
Status code: 200
The dump task is queried.
{
"task_name" : "obsTransfer-56997523",
"destination_type" : "OBS",
"create_time" : 1628126621283,
"status" : "RUNNING",
"topics" : "topic-sdk-no-delete",
"obs_destination_descriptor" : {
"consumer_strategy" : "earliest",
"destination_file_type" : "TEXT",
"obs_bucket_name" : "testobs",
"obs_path" : "obsTransfer-56997523",
"partition_format" : "yyyy/MM/dd/HH/mm",
"record_delimiter" : "",
"deliver_time_interval" : 300,
"obs_part_size" : 5242880
},
"topics_info" : [ {
"topic" : "topic-sdk-no-delete",
"partitions" : [ {
"partition_id" : "2",
"status" : "RUNNING",
"last_transfer_offset" : "3",
"log_end_offset" : "3",
"lag" : "0"
}, {
"partition_id" : "1",
"status" : "RUNNING",
"last_transfer_offset" : "3",
"log_end_offset" : "3",
"lag" : "0"
}, {
"partition_id" : "0",
"status" : "RUNNING",
"last_transfer_offset" : "3",
"log_end_offset" : "3",
"lag" : "0"
} ]
} ]
} Status Code
| Status Code | Description |
|---|---|
| 200 | The dump task is queried. |
Error Code
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot