All Products
Search
Document Center

AnalyticDB:DescribeDiagnosisTasks

最終更新日:Aug 30, 2024

Queries the execution information about distributed tasks in a stage of a query.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
adb:DescribeDiagnosisTasksget
  • DBCluster
    acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The cluster ID.

Note You can call the DescribeDBClusters operation to query the IDs of all AnalyticDB for MySQL Data Warehouse Edition (V3.0) clusters within a region.
am-bp1r053byu48p****
RegionIdstringNo

The region ID of the cluster.

Note You can call the DescribeRegions operation to query the most recent region list.
cn-hangzhou
ProcessIdstringYes

The query ID.

Note You can call the DescribeProcessList operation to query the IDs of queries that are being executed.
202011191048151921681492420315100****
StageIdstringYes

The ID of a stage in the query that is specified by the ProcessId parameter.

Stage[26]
OrderstringNo

The order in which to sort the tasks by field. Specify the value in the JSON format. Example: [{"Field":"CreateTime", "Type":"desc"}].

Note
  • Field specifies the field that is used to sort the tasks. Valid values of Field: State, CreateTime, DBName, ProcessID, UpdateTime, JobName, and ProcessRows.

  • Type specifies the sort order. Valid values of Type: Desc and Asc. The values are case-insensitive.

[{"Field":"StartTime", "Type": "desc" }]
PageNumberintegerNo

The page number.

1
PageSizeintegerNo

The number of entries per page. Valid values:

  • 30 (default)
  • 50
  • 100
30
StatestringNo

The state of the asynchronous import or export task to be queried. Valid values:

  • RUNNING
  • FINISHED
  • FAILED
RUNNING
HoststringNo

The IP address from which the query was initiated.

192.168.XX.XX

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

F0983B43-B2EC-536A-8791-142B5CF1E9B6
TaskListarray<object>

The queried tasks.

object

The queried task.

ScanCostlong

The amount of time that is consumed to scan data from a data source in the task. Unit: milliseconds.

0
OutputDataSizelong

The amount of output data in the task. Unit: bytes.

123
InputDataSizelong

The amount of input data in the task. Unit: bytes.

123
Statestring

The final execution state of the task. Valid values:

  • FINISHED
  • CANCELED
  • ABORTED
  • FAILED
FINISHED
OperatorCostlong

The total amount of time that is consumed by all operators in the task on a node. This parameter can be used to determine whether long tails occur in computing. Unit: milliseconds.

3
OutputRowslong

The number of output rows in the task.

105
ScanDataSizelong

The amount of scanned data in the task. Unit: bytes.

123
ElapsedTimelong

The amount of time that elapsed from when the task was created to when the task was completed. Unit: milliseconds.

456
ScanRowslong

The number of rows that are scanned from a data source in the task.

0
PeakMemorylong

The peak memory of the task. Unit: bytes.

234
TaskIdstring

The task ID.

22568****
InputRowslong

The number of input rows in the task.

105
TaskCreateTimelong

The timestamp when the task was created.

2022-12-12 00:00:12
TaskEndTimelong

The timestamp when the task ends.

2022-12-22 00:00:00
TaskHoststring

The IP address of the host where the task was executed.

192.168.XX.XX
Driversstring

The number of tasks that can be executed concurrently.

16
QueuedTimestring

The queuing duration of the task. Unit: milliseconds.

12
ComputeTimeRatiostring

The compute time ratio, which can be used to determine whether the task is really time-consuming. This parameter can be calculated by using the following formula: OperatorCost/Drivers/ElapsedTime. A greater value indicates that the task was executed for computing for most of the task time. A less value indicates that the task was waiting for scheduling or blocked due to other reasons for most of the task time.

0.89
TotalCountinteger

The total number of tasks in the stage.

33

Examples

Sample success responses

JSONformat

{
  "RequestId": "F0983B43-B2EC-536A-8791-142B5CF1E9B6",
  "TaskList": [
    {
      "ScanCost": 0,
      "OutputDataSize": 123,
      "InputDataSize": 123,
      "State": "FINISHED",
      "OperatorCost": 3,
      "OutputRows": 105,
      "ScanDataSize": 123,
      "ElapsedTime": 456,
      "ScanRows": 0,
      "PeakMemory": 234,
      "TaskId": "22568****",
      "InputRows": 105,
      "TaskCreateTime": 0,
      "TaskEndTime": 0,
      "TaskHost": "192.168.XX.XX",
      "Drivers": "16",
      "QueuedTime": "12",
      "ComputeTimeRatio": "0.89"
    }
  ],
  "TotalCount": 33
}

Error codes

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