跳到主要内容
跳到主要内容

Show Meta Info Action

Show Meta Info Action

Request

GET /api/show_meta_info

Description

用于显示一些元数据信息

Path parameters

Query parameters

  • action

    指定要获取的元数据信息类型。目前支持如下:

    • SHOW_DB_SIZE

      获取指定数据库的数据量大小,单位为字节。

    • SHOW_HA

      获取 FE 元数据日志的回放情况,以及可选举组的情况。

Request body

Response

  • SHOW_DB_SIZE

    {
    "msg": "success",
    "code": 0,
    "data": {
    "default_cluster:information_schema": 0,
    "default_cluster:db1": 381
    },
    "count": 0
    }
  • SHOW_HA

    {
    "msg": "success",
    "code": 0,
    "data": {
    "can_read": "true",
    "role": "MASTER",
    "is_ready": "true",
    "last_checkpoint_version": "1492",
    "last_checkpoint_time": "1596465109000",
    "current_journal_id": "1595",
    "electable_nodes": "",
    "observer_nodes": "",
    "master": "10.81.85.89"
    },
    "count": 0
    }

Examples

  1. 查看集群各个数据库的数据量大小

    GET /api/show_meta_info?action=show_db_size

    Response:
    {
    "msg": "success",
    "code": 0,
    "data": {
    "default_cluster:information_schema": 0,
    "default_cluster:db1": 381
    },
    "count": 0
    }
  2. 查看FE选举组情况

    GET /api/show_meta_info?action=show_ha

    Response:
    {
    "msg": "success",
    "code": 0,
    "data": {
    "can_read": "true",
    "role": "MASTER",
    "is_ready": "true",
    "last_checkpoint_version": "1492",
    "last_checkpoint_time": "1596465109000",
    "current_journal_id": "1595",
    "electable_nodes": "",
    "observer_nodes": "",
    "master": "10.81.85.89"
    },
    "count": 0
    }