All Products
Search
Document Center

Database Autonomy Service:DescribeCloudbenchTask

最終更新日:Dec 23, 2024

Queries a stress testing task.

Operation description

Database Autonomy Service (DAS) provides the intelligent stress testing feature. This feature helps you check whether you need to scale up your database instance to handle workloads during peak hours. For more information, see Intelligent stress testing.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
hdm:DescribeCloudbenchTaskget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TaskIdstringYes

The ID of the stress testing task. You can call the DescribeCloudBenchTasks operation to query the ID.

e5cec704-0518-430f-8263-76f4dcds****

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code returned.

200
Messagestring

The returned message.

Note If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.
Successful
RequestIdstring

The request ID.

B6D17591-B48B-4D31-9CD6-9B9796B2****
Successstring

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true
Dataobject

The detailed information, including the error codes and the number of entries that are returned.

DtsJobNamestring

The name of the Data Transmission Service (DTS) task.

RDS_TO_RDS_MIGRATION
ErrorMessagestring

The error message returned if the request failed.

DTS-070211: Connect Source DB failed. cause by [com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Could not create connection to database server. Attempted reconnect 3 times. Giving up.][com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.][java.net.ConnectException:Connection timed out (Connection timed out)] About more information in [https://yq.aliyun.com/articles/499178].
Externalstring

The additional information.

Null
BackupTypestring

The backup type. Valid values:

  • TIMESTAMP
  • BACKUPID
TIMESTAMP
UserIdstring

The ID of the Alibaba Cloud account.

109141182625****
DstTypestring

The type of the identifier that is used to indicate the destination instance. Valid values:

  • Instance (default): the instance ID.
  • ConnectionString: the endpoint of the instance.
Instance
EcsInstanceIdstring

The ID of the Elastic Compute Service (ECS) instance.

i-bp1ecr5go2go1****
DstInstanceUuidstring

The UUID of the destination instance.

hdm_d887b5ccf99fa0dc9a1e5aaac368****
TaskTypestring

The type of the stress testing task. Valid values:

  • pressure test (default): A task of this type replays the traffic that is captured from the source instance on the destination instance at the maximum playback rate that is supported by the destination instance.
  • smart pressure test: A task of this type analyzes the traffic that is captured from the source instance over a short period of time and generates traffic on the destination instance for continuous stress testing. The business model based on which the traffic is generated on the destination instance and the traffic distribution are consistent with those on the source instance. Stress testing tasks of this type can help you reduce the amount of time that is consumed to collect data from the source instance and reduce storage costs and performance overheads.
pressure test
BenchStepstring

The substep in the stress testing task. Valid values:

  • NEW: initializes the stress testing task.
  • WAIT_BUY_ECS: purchases an ECS instance.
  • WAIT_START_ECS: starts an ECS instance.
  • WAIT_INSTALL_JDK: installs the Java Development Kit (JDK).
  • WAIT_INSTALL_DBGATEWAY: installs the database gateway (DBGateway).
  • ADD_SECURITY_IPS_STEP: configure a security group whitelist.
  • ARCHIVE: archives the full SQL statistics.
  • DOWNLOAD: downloads the file that stores the analysis result of full SQL statistics.
  • PROCEED: preprocesses the file that stores the analysis result of full SQL statistics.
  • PRE_LOAD: preloads the file that stores the analysis result of full SQL statistics.
  • VALIDATE: verifies the functionality of stress testing.
  • PRESSURE: starts the stress testing task.
PROCEED
Versionstring

The version of the stress testing task. Valid values:

  • V2.0
  • V3.0
V3.0
EndStatestring

The state that specifies the last operation that is performed for the stress testing task. Valid values:

  • WAIT_TARGET: prepares the destination instance.
  • WAIT_DBGATEWAY: prepares the DBGateway.
  • WAIT_SQL: prepares the full SQL statistics.
  • WAIT_LOGIC: prepares to replay the traffic.
Note When the state of a stress testing task changes to the state that is specified by the EndState parameter, the stress testing task becomes completed.
WAIT_LOGIC
SrcInstanceUuidstring

The UUID of the source instance.

a364e414-e68b-4e5c-9166-65b3a153****
ClientTypestring

The type of the stress testing client. Valid values:

  • ECS: indicates that you must create the DBGateway .
  • DAS_ECS: indicates that DAS automatically purchases and deploys an ECS instance for stress testing.
ECS
Statestring

The state that indicates the operation performed for the stress testing task. Valid values:

  • WAIT_TARGET: prepares the destination instance.
  • WAIT_DBGATEWAY: prepares the DBGateway.
  • WAIT_SQL: prepares the full SQL statistics.
  • WAIT_LOGIC: prepares to replay the traffic.
WAIT_TARGET
DstIpstring

The reserved parameter.

None
SrcPublicIpstring

The reserved parameter.

None
BackupIdstring

The ID of the backup set. You can call the DescribeBackups operation to query the ID of the backup set.

229132
SqlCompleteReusestring

The reuse information about the analysis result of full SQL statistics.

{"sqlUuid":"task_a37d2f07-45cb-****-a2a6-c66c62****","metaUuid":"task_211e2561-5c0c-486b-864c-56b511****","sqlFile":"cl-1620057600000-1800626.sc","metaFile":"cl-1620057600000-180****.meta"}
SmartPressureTimeinteger

The duration of the stress testing task for which the traffic was generated on the destination instance. Unit: milliseconds.

86400000
ArchiveStateinteger

The archiving state of the file that stores the analysis result of full SQL statistics. Valid values:

  • 0: The file archiving is not started.
  • 1: The file is archived.
  • 2: An error occurred.
  • 3: The file is being archived.
  • 4: The archived file does not need to be downloaded.
1
Statusstring

The state of the stress testing task. Valid values:

  • SUCCESS: The task is successful.
  • IGNORED: The task is ignored.
  • RUNNING: The task is running.
  • EXCEPTION: An error occurred.
RUNNING
WorkDirstring

The temporary directory generated for stress testing.

/tmp/bench/
ArchiveOssTableNamestring

The name of the table that was archived to Object Storage Service (OSS).

custins15546355_161604665****
DtsJobIdstring

The ID of the DTS migration task.

i03e3zty16i****
DtsJobStateinteger

The state of the DTS task. Valid values:

  • NOT_STARTED: The task is not started.
  • PRE_CHECKING: The task is in precheck.
  • PRE_CHECK_FAILED: The precheck failed.
  • CHECKING: The task is being checked.
  • MIGRATING: The data is being migrated.
  • CATCHED: The data is migrated from the source instance to the destination instance.
  • SUSPENDING: The task is suspended.
  • MIGRATION_FAILED: The data failed to be migrated.
  • FINISHED: The task is complete.
  • INITIALIZING: The synchronization is being initialized.
  • INITIALIZE_FAILED: The synchronization failed to be initialized.
  • SYNCHRONIZING: The data is being synchronized.
  • MODIFYING: The objects to be synchronized are being changed.
  • SWITCHING: The roles of the instances are being switched.
  • FAILED: The task failed.
CHECKING
DstPortinteger

The port number of the destination instance.

3306
DtsJobClassstring

The specification of the DTS task.

medium
ClientGatewayIdstring

The DBGateway ID of the stress testing client.

58598b2af48a0193dfc16fc6964ef****
Descriptionstring

The description of the stress testing task.

test-das-bench-0501
ErrorCodestring

The error code returned for the substep of the stress testing task.

10910
TableSchemastring

The name of the table that is used for stress testing.

[{"TABLE_NAME":"customer1","TABLE_SCHEMA":"tpcc"}]
DtsJobStatusstring

The state of the DTS task. Valid values:

  • NOT_STARTED: The task is not started.
  • PRE_CHECKING: The task is in precheck.
  • PRE_CHECK_FAILED: The precheck failed.
  • CHECKING: The task is being checked.
  • MIGRATING: The data is being migrated.
  • CATCHED: The data is migrated from the source instance to the destination instance.
  • SUSPENDING: The task is suspended.
  • MIGRATION_FAILED: The data failed to be migrated.
  • FINISHED: The task is complete.
  • INITIALIZING: The synchronization is being initialized.
  • INITIALIZE_FAILED: The synchronization failed to be initialized.
  • SYNCHRONIZING: The data is being synchronized.
  • MODIFYING: The objects to be synchronized are being changed.
  • SWITCHING: The roles of the instances are being switched.
  • FAILED: The task failed.
PRE_CHECKING
SrcInstanceAreastring

The database type of the source instance. Valid values:

RDS
BenchStepStatusstring

The status that indicates the substep performed on the stress testing task. Valid values:

  • NEW: The task is being initialized.
  • RUNNING: The task is running.
  • FAILED: The task failed.
  • FINISHED: The task is complete.
  • Terminated: The task is terminated.
  • Deleted: The task is deleted.
FINISHED
Sourcestring

The source of the task. Valid values:

  • DAS
  • OPEN_API
DAS
ArchiveJobIdstring

The ID of the archiving task.

'202105211430070112231480820340758****
Topicstring

The topic that contains the consumed data. This topic is a topic in Message Queue for Apache Kafka.

das
RequestDurationlong

The duration of the stress testing task for which traffic was captured from the source instance.

864000
TaskIdstring

The task ID.

e5cec704-0518-430f-8263-76f4dcds****
Ratelong

The rate at which the stress testing task replayed the traffic. The value is a positive integer. Valid values:1 to 30. Default value: 1.

1

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "Successful",
  "RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Success": "true",
  "Data": {
    "DtsJobName": "RDS_TO_RDS_MIGRATION",
    "ErrorMessage": "DTS-070211: Connect Source DB failed. cause by [com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Could not create connection to database server. Attempted reconnect 3 times. Giving up.][com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure\\n\\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.][java.net.ConnectException:Connection timed out (Connection timed out)] About more information in [https://yq.aliyun.com/articles/499178].",
    "External": "Null",
    "BackupType": "TIMESTAMP",
    "UserId": "109141182625****",
    "DstType": "Instance",
    "EcsInstanceId": "i-bp1ecr5go2go1****",
    "DstInstanceUuid": "hdm_d887b5ccf99fa0dc9a1e5aaac368****",
    "TaskType": "pressure test",
    "BenchStep": "PROCEED",
    "Version": "V3.0",
    "EndState": "WAIT_LOGIC",
    "SrcInstanceUuid": "a364e414-e68b-4e5c-9166-65b3a153****",
    "ClientType": "ECS",
    "State": "WAIT_TARGET",
    "DstIp": "None",
    "SrcPublicIp": "None",
    "BackupId": "229132",
    "SqlCompleteReuse": "{\"sqlUuid\":\"task_a37d2f07-45cb-****-a2a6-c66c62****\",\"metaUuid\":\"task_211e2561-5c0c-486b-864c-56b511****\",\"sqlFile\":\"cl-1620057600000-1800626.sc\",\"metaFile\":\"cl-1620057600000-180****.meta\"}",
    "SmartPressureTime": 86400000,
    "ArchiveState": 1,
    "Status": "RUNNING",
    "WorkDir": "/tmp/bench/",
    "ArchiveOssTableName": "custins15546355_161604665****",
    "DtsJobId": "i03e3zty16i****",
    "DtsJobState": 0,
    "DstPort": 3306,
    "DtsJobClass": "medium",
    "ClientGatewayId": "58598b2af48a0193dfc16fc6964ef****",
    "Description": "test-das-bench-0501",
    "ErrorCode": "10910",
    "TableSchema": "[{\"TABLE_NAME\":\"customer1\",\"TABLE_SCHEMA\":\"tpcc\"}]",
    "DtsJobStatus": "PRE_CHECKING",
    "SrcInstanceArea": "RDS",
    "BenchStepStatus": "FINISHED",
    "Source": "DAS",
    "ArchiveJobId": "'202105211430070112231480820340758****",
    "Topic": "das",
    "RequestDuration": 864000,
    "TaskId": "e5cec704-0518-430f-8263-76f4dcds****",
    "Rate": 1
  }
}

Error codes

HTTP status codeError codeError message
400InvalidParamsThe request parameters are invalid.
403NoPermissionYou are not authorized to do this action.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history