Show Meta Info Action

Request

GET /api/show_meta_info

Description

Used to display some metadata information

Path parameters

无

Query parameters

  • action

Specify the type of metadata information to be obtained. Currently supports the following:

  • SHOW_DB_SIZE

    Get the data size of the specified database, in bytes. - SHOW_HA

    Obtain the playback status of FE metadata logs and the status of electable groups.

Request body

None

Response

  • SHOW_DB_SIZE

1. { 2. "msg": "success", 3. "code": 0, 4. "data": { 5. "default_cluster:information_schema": 0, 6. "default_cluster:db1": 381 7. }, 8. "count": 0 9. } - SHOW_HA

1. { 2. "msg": "success", 3. "code": 0, 4. "data": { 5. "can_read": "true", 6. "role": "MASTER", 7. "is_ready": "true", 8. "last_checkpoint_version": "1492", 9. "last_checkpoint_time": "1596465109000", 10. "current_journal_id": "1595", 11. "electable_nodes": "", 12. "observer_nodes": "", 13. "master": "10.81.85.89" 14. }, 15. "count": 0 16. }

Examples

  1. View the data size of each database in the cluster

``` 1. GET /api/show_meta_info?action=show_db_size

  1. Response:
  2. {
  3. "msg": "success",
  4. "code": 0,
  5. "data": {
  6. "default_cluster:information_schema": 0,
  7. "default_cluster:db1": 381
  8. },
  9. "count": 0
  10. } ```
  11. View the FE election group situation

``` 1. GET /api/show_meta_info?action=show_ha

  1. Response:
  2. {
  3. "msg": "success",
  4. "code": 0,
  5. "data": {
  6. "can_read": "true",
  7. "role": "MASTER",
  8. "is_ready": "true",
  9. "last_checkpoint_version": "1492",
  10. "last_checkpoint_time": "1596465109000",
  11. "current_journal_id": "1595",
  12. "electable_nodes": "",
  13. "observer_nodes": "",
  14. "master": "10.81.85.89"
  15. },
  16. "count": 0
  17. } ```