接口功能介绍
此接口提供获取集群元数据概览功能,系统接收用户输入的查询条件,返回集群的库总数、表总数、总存储量、总文件数等概览信息。
接口约束
集群必须处于运行状态。
URI
GET /v1/emr/doctor/openapi/meta/hive/overview
路径参数
无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
clusterId | 是 | String | 集群id | da595eb1d81503b323fdc01d9bf786b7 | |
timestamp | 是 | Long | 要查询的时间点,以 Unix 时间戳表示(单位:秒) | 1700000000 |
请求参数
请求头header参数
无
请求体body参数
无
响应参数
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
statusCode | Integer | 状态码 | 200 | / |
message | String | 用来简述当前接口调用状态以及必要提示信息 | success | / |
error | String | 错误码,请求成功时,不返回该字段 | EMR_400001 | / |
returnObj | Object | 返回结果 | returnObj |
表 returnObj(请求成功)
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
databaseCnt | Long | 数据库总数 | 5 | |
tableCnt | Long | 表总数 | 237 | |
storageCnt | Long | 总存储量(单位:字节) | 10240000 | |
fileCnt | Long | 文件总数 | 12223 |
表 returnObj(请求失败)
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
timestamp | String | timestamp参数错误时返回该字段 | 时间戳不能为null | |
clusterId | String | clusterId参数错误时返回该字段 | 不能为空 |
枚举参数
无
请求示例
请求url
https://emr-global.ctapi.ctyun.cn/v1/emr/doctor/openapi/meta/hive/overview?clusterId=da595eb1d81503b323fdc01d9bf786b7×tamp=1700000000
请求头header
无
请求体body
无
响应示例
请求成功返回值示例
{
"statusCode": 200,
"message": "success",
"returnObj": {
"databaseCnt": 5,
"tableCnt": 237,
"storageCnt": 10240000,
"fileCnt": 12223
}
}
请求失败返回值示例
请求参数无效示例:
{
"statusCode": 500,
"error": "EMR_401002",
"message": "请求参数值无效",
"returnObj": {
"timestamp": "timestamp应为长整型"
}
}
请求参数无效示例2:
{
"statusCode": 500,
"error": "EMR_401002",
"message": "请求参数值无效",
"returnObj": {
"timestamp": "时间戳不能为null"
}
}
请求参数无效示例3:
{
"statusCode": 500,
"error": "EMR_401002",
"message": "请求参数值无效",
"returnObj": {
"timestamp": "时间戳必须是正整数"
}
}
请求参数无效示例4:
{
"statusCode": 500,
"error": "EMR_401002",
"message": "请求参数值无效",
"returnObj": {
"timestamp": "时间戳不在有效范围内,请输入不大于当前时间的时间戳(单位: 秒)"
}
}
请求参数无效示例5:
{
"statusCode": 500,
"error": "EMR_401002",
"message": "请求参数值无效",
"returnObj": {
"timestamp": "时间戳不在有效范围内,请输入不大于当前时间的时间戳(单位: 秒)"
}
}
请求参数无效示例6:
{
"statusCode": 500,
"error": "EMR_401002",
"message": "请求参数值无效",
"returnObj": {
"clusterId": "不能为空"
}
}
请求参数无效示例7:
{
"statusCode": 500,
"error": "EMR_401002",
"message": "请求参数值无效",
"returnObj": {
"clusterId": "无效的集群id"
}
}
集群状态不合法示例:
{
"statusCode": 500,
"error": "EMR_401006",
"message": "非运行中集群无法查看信息,当前的集群状态为:启动中",
"returnObj": {}
}
集群不涉及元数据组件示例:
{
"statusCode": 500,
"error": "EMR_401014",
"message": "集群不涉及元数据组件",
"returnObj": {}
}
集群不属于该用户示例:
{
"statusCode": 500,
"error": "EMR_401004",
"message": "非法操作",
"returnObj": {}
}
该集群不存在示例:
{
"statusCode": 500,
"error": "EMR_401005",
"message": "该集群不存在",
"returnObj": {}
}
请求失败示例:
{
"statusCode": 500,
"error": "EMR_400000",
"message": "请求失败",
"returnObj": {}
}
状态码
请参考 状态码
错误码
请参考 错误码