Skip to main content
Version: 4.x

Get WAL size

Request

GET fe_host:fe_http_port/api/get_wal_size?host_ports=host1:port1,host2:port2...

Description

This HTTP interface retrieves the number of WAL files for specified BEs. If no BEs are specified, it returns the number of WAL files for all BEs.

Path parameters

None

Query parameters

  • host_ports

    The BE IP address and HTTP port.

Request body

None

Response

{
"msg": "OK",
"code": 0,
"data": ["192.168.10.11:9050:1", "192.168.10.11:9050:0"],
"count": 0
}

Examples

  1. Get the number of WAL files for all BEs.

    curl -u root: "127.0.0.1:8038/api/get_wal_size"

    Response:
    {
    "msg": "OK",
    "code": 0,
    "data": ["192.168.10.11:9050:1", "192.168.10.11:9050:0"],
    "count": 0
    }

    In the response, the number after each BE is the number of WAL files for that BE.

  2. Get the number of WAL files for the specified BEs.

    curl -u root: "127.0.0.1:8038/api/get_wal_size?192.168.10.11:9050"

    Response:
    {
    "msg": "OK",
    "code": 0,
    "data": ["192.168.10.11:9050:1"],
    "count": 0
    }

    In the response, the number after each BE is the number of WAL files for that BE.