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

Querying Dump Details

Initialize a DIS SDK client instance as instructed in Initializing a DIS SDK Client Instance.

Configure the following parameters:

1
2
streamname ="dis-test1"  #Name of an existing stream.
task_name="test_1"  #Query the xx dump task of the stream.

After configuring the parameters, run the describe_dump_task_sample.py file to call describe_dump_task_test by default.

The following is an example response:
1
2
200
{'state': 'RUNNING', 'stream_name': 'dis-test1', 'create_time': 1537949648144, 'last_transfer_timestamp': 1538018072564, 'destination_type': 'OBS', 'obs_destination_description': {'obs_bucket_path': '002', 'deliver_time_interval': 30, 'retry_duration': 0, 'agency_name': 'all', 'partition_format': 'yyyy/MM/dd/HH/mm', 'destination_file_type': 'text', 'record_delimiter': '|', 'consumer_strategy': 'LATEST', 'file_prefix': ''}, 'task_name': 'test_1', 'partitions': [{'state': 'RUNNING', 'discard': 0, 'last_transfer_offset': 500, 'partitionId': 'shardId-0000000000', 'last_transfer_timestamp': 1538018072564}, {'state': 'RUNNING', 'discard': 0, 'last_transfer_offset': 500, 'partitionId': 'shardId-0000000001', 'last_transfer_timestamp': 1538018072564}]}