DescribeWorkerDetection

Updated at:
Copy as MD

Queries the diagnostics results of the storage layer.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

adb:DescribeWorkerDetection

get

DBCluster

acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

The cluster ID.

Note

You can call the DescribeDBClusters operation to query the details of all AnalyticDB for MySQL clusters in a region, including the cluster ID.

am-xxxxx

RegionId

string

Yes

The region ID.

Note

You can call the DescribeRegions operation to query the region ID.

cn-beijing

StartTime

string

No

The beginning of the query time range. Specify the time in the yyyy-MM-ddTHH:mmZ format (UTC).

2021-11-18T00:00Z

EndTime

string

No

The end of the query time range. Specify the time in the yyyy-MM-ddTHH:mmZ format (UTC).

2024-04-25T02:04Z

Lang

string

No

The display language of suggestions. Valid values:

  • zh: simplified Chinese (default).

  • en: English.

zh

Response elements

Element

Type

Description

Example

object

TotalCount

string

The total number of records.

20

RequestId

string

The request ID.

E5B37B61-E6C9-5FE0-9374-45BAA548AEF6

DBClusterId

string

The cluster ID.

am-xxxxx

DetectionItems

array<object>

The list of detection items and detection results.

array<object>

The detection result.

Name

string

The name of the detection item.

Metric detection

Results

object

The detection result.

SkewedTables

array<object>

The detection result items of skewed tables.

object

The detection result items of skewed table.

SchemaName

string

The name of the database.

platfunc

TableName

string

The name of the table.

sls_log_cheat_action

DDL

string

The SQL statement that is used to create the table.

create table test(id varchar)

PartitionCount

integer

The number of partitions.

2

TotalDataSize

integer

The total data size of the table. Unit: bytes.

2345

TotalRowCount

integer

The number of rows in the table.

34

TotalPkSize

integer

The data size of the primary key. Unit: bytes.

234

TotalRemoteDataSize

integer

The size of cold data. Unit: bytes.

234

TotalLocalDataSize

string

The size of hot data. Unit: bytes.

2345

ShardSkewedRows

string

The number of skewed rows in the table.

1234

PartitionedTables

array<object>

The detection result items of improper partitioned tables.

object

The detection result items of the improper partitioned table.

SchemaName

string

The name of the database.

nxg

TableName

string

The name of the table.

zhw_place_order

DDL

string

The SQL statement that is used to create the table.

create table test(id varchar)

PartitionCount

string

The number of partitions.

234

PartitionIds

string

The ID of the improper partition.

[2024,2025]

TotalDataSize

integer

The total data size of the table.

1234

TopAccessTables

array<object>

The detection result items of table access.

array<object>

The detection result items of table access.

MetricName

string

The name of the detection metric.

Peak memory detection

SearchResults

array<object>

The detection result items of table access.

object

The detection result items of table access.

TableName

string

The name of the table.

tiberias_2copt_origin_order_goods_info

MaxScanCost

integer

The maximum amount of time for scanning. Unit: milliseconds.

345

AvgScanCost

number

The average amount of time for scanning. Unit: milliseconds.

234

MaxScanSize

integer

The maximum data size for scanning. Unit: bytes.

2345

AvgScanSize

number

The average data size for scanning. Unit: bytes.

234

AccessCount

integer

The number of accesses to the table.

1111

OperatorDetails

array<object>

The detection result items of abnormal operators.

array<object>

The detection result items of abnormal operators.

MetricName

string

The name of the detection metric.

PeakMemory

SearchResults

array<object>

The detection result items of abnormal operators.

object

The detection result items of the abnormal operator.

ProcessId

string

The query ID that can be used for diagnostics.

2024041909301402103302422803151411141

StageId

string

The stage ID.

Stage[2]

OperatorName

string

The name of the operator.

TableScan

PeakMemory

integer

The peak memory. Unit: bytes.

23

OperatorCost

integer

The total CPU time consumed by all operators in the stage, which is equivalent to the total CPU time of the stage. You can use this parameter to determine which parts of the stage consume a large amount of computing resources. Unit: milliseconds.

23

InputRows

integer

The number of rows input by the operator.

123

OutputRows

integer

The number of rows output by the operator.

123

InputSize

integer

The amount of data input by the operator. Unit: bytes.

123

OutputSize

integer

The amount of data output by the operator. Unit: bytes.

123

OperatorInfo

string

The property information about the operator.

Group By field: id

OperatorAgg

array<object>

The detection result items of operator metric aggregation.

array<object>

The detection result items of operator metric aggregation.

MetricName

string

The detection result items of operator metric aggregation.

Peak memory

SearchResults

array<object>

The detection result items of operator metric aggregation.

object

The detection result items of operator metric aggregation.

OperatorName

string

The name of the operator.

Aggregation

MaxValue

integer

The maximum value of the operator metric.

444

TotalValue

integer

The cumulative value of the operator metric.

123

AvgValue

number

The average value of the operator metric.

2234

OperatorCount

integer

The number of occurrences of the operator.

1234

Message

string

The detection result message.

There are a total of 10 tables with an excessive number of primary keys.

Status

string

The detection result status. Valid values:

  • NORMAL

  • WARNING

  • CRITICAL

WARNING

Examples

Success response

JSON format

{
  "TotalCount": "20",
  "RequestId": "E5B37B61-E6C9-5FE0-9374-45BAA548AEF6",
  "DBClusterId": "am-xxxxx",
  "DetectionItems": [
    {
      "Name": "Metric detection",
      "Results": {
        "SkewedTables": [
          {
            "SchemaName": "platfunc",
            "TableName": "sls_log_cheat_action",
            "DDL": "create table test(id varchar)",
            "PartitionCount": 2,
            "TotalDataSize": 2345,
            "TotalRowCount": 34,
            "TotalPkSize": 234,
            "TotalRemoteDataSize": 234,
            "TotalLocalDataSize": "2345",
            "ShardSkewedRows": "1234"
          }
        ],
        "PartitionedTables": [
          {
            "SchemaName": "nxg",
            "TableName": "zhw_place_order",
            "DDL": "create table test(id varchar)",
            "PartitionCount": "234",
            "PartitionIds": "[2024,2025]",
            "TotalDataSize": 1234
          }
        ],
        "TopAccessTables": [
          {
            "MetricName": "Peak memory detection",
            "SearchResults": [
              {
                "TableName": "tiberias_2copt_origin_order_goods_info",
                "MaxScanCost": 345,
                "AvgScanCost": 234,
                "MaxScanSize": 2345,
                "AvgScanSize": 234,
                "AccessCount": 1111
              }
            ]
          }
        ],
        "OperatorDetails": [
          {
            "MetricName": "PeakMemory",
            "SearchResults": [
              {
                "ProcessId": "2024041909301402103302422803151411141",
                "StageId": "Stage[2]",
                "OperatorName": "TableScan",
                "PeakMemory": 23,
                "OperatorCost": 23,
                "InputRows": 123,
                "OutputRows": 123,
                "InputSize": 123,
                "OutputSize": 123,
                "OperatorInfo": "Group By field: id"
              }
            ]
          }
        ],
        "OperatorAgg": [
          {
            "MetricName": "Peak memory",
            "SearchResults": [
              {
                "OperatorName": "Aggregation",
                "MaxValue": 444,
                "TotalValue": 123,
                "AvgValue": 2234,
                "OperatorCount": 1234
              }
            ]
          }
        ]
      },
      "Message": "There are a total of 10 tables with an excessive number of primary keys.",
      "Status": "WARNING"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The specified DBClusterId parameter does not exist. Make sure that the DBClusterId value is valid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.