获取Redis实例大Key分析结果
更新时间:2024-11-08
接口描述
查看指定大Key分析任务的结果,包括按元素数量和内存占用的分析结果。
权限说明
鉴权认证机制的详细内容请参见鉴权认证。
请求结构
JSON
1GET /v{version}/diagnosis/redis/big-key/task/result?id=id&appId=appId&nodeId=nodeId&dataType=dataType&orderBy=orderBy&order=order HTTP/1.1
2Host: dbsc.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 必选 | 参数位置 | 描述 |
---|---|---|---|---|
id | integer | 是 | Query参数 | 大Key任务ID |
appId | string | 是 | Query参数 | 集群ID |
clusterId | string | 否 | Query参数 | 分片ID,如果实例是标准版,则不需要传入该参数。 |
dataType | string | 否 | Query参数 | 数据类型不传则展示全部类型的数据,支持的数据类型:string、list、set、hash、zset、stream |
order | string | 否 | Query参数 | 排序方式,支持正序asc和倒序desc |
orderBy | string | 否 | Query参数 | 排序字段:size:按内存大小排序elementCount:按元素数量排序 |
响应头域
除公共头域外,无其它特殊头域。
响应参数
参数名称 | 类型 | 描述 |
---|---|---|
dataCollectionTime | string | 数据采集时间 |
elementCountResult | List |
按数量分析结果 |
memoryResult | List |
按内存分析结果 |
BigKeyResultInfo
参数名称 | 类型 | 描述 |
---|---|---|
db | integer | 数据库编号 |
elementCount | integer | 元素数量 |
encoding | string | 编码方式 |
expireTime | string | 过期时间 |
key | string | 键 |
size | integer | 占有内存 |
type | string | 数据类型 |
请求示例
JSON
1GET /v1/diagnosis/redis/big-key/task/result?id=311683837451&appId=scs-bj-mmolmekriqve&nodeId=scs-bj-mmolmekriqve&dataType=string&orderBy=size&order=desc HTTP/1.1
2Host: dbsc.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2023-07-11T11:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
响应示例
JSON
1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
4{
5 "dataCollectionTime": "2024-11-07T06:51:14Z",
6 "memoryResult": [
7 {
8 "key": "c",
9 "type": "string",
10 "encoding": "string",
11 "size": 13039,
12 "elementCount": 1,
13 "db": 0,
14 "expireTime": "0001-01-01T00:00:00Z"
15 },
16 {
17 "key": "a",
18 "type": "string",
19 "encoding": "string",
20 "size": 4,
21 "elementCount": 1,
22 "db": 0,
23 "expireTime": "0001-01-01T00:00:00Z"
24 },
25 {
26 "key": "b",
27 "type": "string",
28 "encoding": "string",
29 "size": 4,
30 "elementCount": 1,
31 "db": 0,
32 "expireTime": "0001-01-01T00:00:00Z"
33 }
34 ],
35 "elementCountResult": [
36 {
37 "key": "c",
38 "type": "string",
39 "encoding": "string",
40 "size": 13039,
41 "elementCount": 1,
42 "db": 0,
43 "expireTime": "0001-01-01T00:00:00Z"
44 },
45 {
46 "key": "a",
47 "type": "string",
48 "encoding": "string",
49 "size": 4,
50 "elementCount": 1,
51 "db": 0,
52 "expireTime": "0001-01-01T00:00:00Z"
53 },
54 {
55 "key": "b",
56 "type": "string",
57 "encoding": "string",
58 "size"
59 : 4,
60 "elementCount": 1,
61 "db": 0,
62 "expireTime": "0001-01-01T00:00:00Z"
63 }
64 ]
65}