Request

GET /rest/v2/manager/node/frontends

GET /rest/v2/manager/node/backends

GET /rest/v2/manager/node/brokers

GET /rest/v2/manager/node/configuration_name

GET /rest/v2/manager/node/node_list

POST /rest/v2/manager/node/configuration_info

POST /rest/v2/manager/node/set_config/fe

POST /rest/v2/manager/node/set_config/be

POST /rest/v2/manager/node/{action}/be

POST /rest/v2/manager/node/{action}/fe

Get information about fe, be, broker nodes

GET /rest/v2/manager/node/frontends

GET /rest/v2/manager/node/backends

GET /rest/v2/manager/node/brokers

Description

Used to get cluster to get fe, be, broker node information.

Response

  1. frontends:
  2. {
  3. "msg": "success",
  4. "code": 0,
  5. "data": {
  6. "column_names": [
  7. "Name",
  8. "IP",
  9. "HostName",
  10. "EditLogPort",
  11. "HttpPort",
  12. "QueryPort",
  13. "RpcPort",
  14. "ArrowFlightSqlPort",
  15. "Role",
  16. "IsMaster",
  17. "ClusterId",
  18. "Join",
  19. "Alive",
  20. "ReplayedJournalId",
  21. "LastHeartbeat",
  22. "IsHelper",
  23. "ErrMsg",
  24. "Version"
  25. ],
  26. "rows": [
  27. [
  28. ...
  29. ]
  30. ]
  31. },
  32. "count": 0
  33. }
  1. backends:
  2. {
  3. "msg": "success",
  4. "code": 0,
  5. "data": {
  6. "column_names": [
  7. "BackendId",
  8. "Cluster",
  9. "IP",
  10. "HostName",
  11. "HeartbeatPort",
  12. "BePort",
  13. "HttpPort",
  14. "BrpcPort",
  15. "LastStartTime",
  16. "LastHeartbeat",
  17. "Alive",
  18. "SystemDecommissioned",
  19. "ClusterDecommissioned",
  20. "TabletNum",
  21. "DataUsedCapacity",
  22. "AvailCapacity",
  23. "TotalCapacity",
  24. "UsedPct",
  25. "MaxDiskUsedPct",
  26. "ErrMsg",
  27. "Version",
  28. "Status"
  29. ],
  30. "rows": [
  31. [
  32. ...
  33. ]
  34. ]
  35. },
  36. "count": 0
  37. }
  1. brokers:
  2. {
  3. "msg": "success",
  4. "code": 0,
  5. "data": {
  6. "column_names": [
  7. "Name",
  8. "IP",
  9. "HostName",
  10. "Port",
  11. "Alive",
  12. "LastStartTime",
  13. "LastUpdateTime",
  14. "ErrMsg"
  15. ],
  16. "rows": [
  17. [
  18. ...
  19. ]
  20. ]
  21. },
  22. "count": 0
  23. }

Get node configuration information

GET /rest/v2/manager/node/configuration_name

GET /rest/v2/manager/node/node_list

POST /rest/v2/manager/node/configuration_info

Description

configuration_name Used to get the name of the node configuration item.
node_list Get the list of nodes.
configuration_info to get the node configuration details.

Query parameters

GET /rest/v2/manager/node/configuration_name
none

GET /rest/v2/manager/node/node_list
none

POST /rest/v2/manager/node/configuration_info

  • type The value is fe or be, which specifies to get the configuration information of fe or the configuration information of be.

Request body

GET /rest/v2/manager/node/configuration_name
none

GET /rest/v2/manager/node/node_list
none

POST /rest/v2/manager/node/configuration_info

  1. {
  2. "conf_name": [
  3. ""
  4. ],
  5. "node": [
  6. ""
  7. ]
  8. }
  9. If no body is included, the parameters in the body use the default values.
  10. conf_name specifies which configuration items to return, the default is all configuration items.
  11. node is used to specify which node's configuration information is returned, the default is all fe nodes or be nodes configuration information.

Response

GET /rest/v2/manager/node/configuration_name

  1. {
  2. "msg": "success",
  3. "code": 0,
  4. "data": {
  5. "backend":[
  6. ""
  7. ],
  8. "frontend":[
  9. ""
  10. ]
  11. },
  12. "count": 0
  13. }

GET /rest/v2/manager/node/node_list

  1. {
  2. "msg": "success",
  3. "code": 0,
  4. "data": {
  5. "backend": [
  6. ""
  7. ],
  8. "frontend": [
  9. ""
  10. ]
  11. },
  12. "count": 0
  13. }

POST /rest/v2/manager/node/configuration_info?type=fe

  1. {
  2. "msg": "success",
  3. "code": 0,
  4. "data": {
  5. "column_names": [
  6. "Configuration Item",
  7. "Node",
  8. "Node Type",
  9. "Configuration Value Type",
  10. "MasterOnly",
  11. "Configuration Value",
  12. "Modifiable"
  13. ],
  14. "rows": [
  15. [
  16. ""
  17. ]
  18. ]
  19. },
  20. "count": 0
  21. }

POST /rest/v2/manager/node/configuration_info?type=be

  1. {
  2. "msg": "success",
  3. "code": 0,
  4. "data": {
  5. "column_names": [
  6. "Configuration Item",
  7. "Node",
  8. "Node Type",
  9. "Configuration Value Type",
  10. "Configuration Value",
  11. "Modifiable"
  12. ],
  13. "rows": [
  14. [
  15. ""
  16. ]
  17. ]
  18. },
  19. "count": 0
  20. }

Examples

  1. Get the fe agent_task_resend_wait_time_ms configuration information:

    POST /rest/v2/manager/node/configuration_info?type=fe
    body:

    1. {
    2. "conf_name":[
    3. "agent_task_resend_wait_time_ms"
    4. ]
    5. }

    Response:

    1. {
    2. "msg": "success",
    3. "code": 0,
    4. "data": {
    5. "column_names": [
    6. "Configuration Item",
    7. "Node",
    8. "Node Type",
    9. "Configuration Value Type",
    10. "MasterOnly",
    11. "Configuration Value",
    12. "Modifiable"
    13. ],
    14. "rows": [
    15. [
    16. "agent_task_resend_wait_time_ms",
    17. "127.0.0.1:8030",
    18. "FE",
    19. "long",
    20. "true",
    21. "50000",
    22. "true"
    23. ]
    24. ]
    25. },
    26. "count": 0
    27. }

Modify configuration values

POST /rest/v2/manager/node/set_config/fe

POST /rest/v2/manager/node/set_config/be

Description

Used to modify fe or be node configuration values

Request body

  1. {
  2. "config_name":{
  3. "node":[
  4. ""
  5. ],
  6. "value":"",
  7. "persist":
  8. }
  9. }
  10. config_name is the corresponding configuration item.
  11. node is a keyword indicating the list of nodes to be modified;
  12. value is the value of the configuration.
  13. persist is true for permanent modification and false for temporary modification. persist means permanent modification, false means temporary modification. permanent modification takes effect after reboot, temporary modification fails after reboot.

Response

GET /rest/v2/manager/node/configuration_name

  1. {
  2. "msg": "",
  3. "code": 0,
  4. "data": {
  5. "failed":[
  6. {
  7. "config_name":"name",
  8. "value"="",
  9. "node":"",
  10. "err_info":""
  11. }
  12. ]
  13. },
  14. "count": 0
  15. }
  16. failed Indicates a configuration message that failed to be modified.

Examples

  1. Modify the agent_task_resend_wait_time_ms and alter_table_timeout_second configuration values in the fe 127.0.0.1:8030 node:

    POST /rest/v2/manager/node/set_config/fe body:

    1. {
    2. "agent_task_resend_wait_time_ms":{
    3. "node":[
    4. "127.0.0.1:8030"
    5. ],
    6. "value":"10000",
    7. "persist":"true"
    8. },
    9. "alter_table_timeout_second":{
    10. "node":[
    11. "127.0.0.1:8030"
    12. ],
    13. "value":"true",
    14. "persist":"true"
    15. }
    16. }

    Response:

    1. {
    2. "msg": "success",
    3. "code": 0,
    4. "data": {
    5. "failed": [
    6. {
    7. "config_name": "alter_table_timeout_second",
    8. "node": "10.81.85.89:8837",
    9. "err_info": "Unsupported configuration value type.",
    10. "value": "true"
    11. }
    12. ]
    13. },
    14. "count": 0
    15. }
    16. gent_task_resend_wait_time_ms configuration value modified successfully, alter_table_timeout_second modification failed.

Operate be node

POST /rest/v2/manager/node/{action}/be

Description

Used to add/drop/offline be node

action:ADD/DROP/DECOMMISSION

Request body

  1. {
  2. "hostPorts": ["127.0.0.1:9050"],
  3. "properties": {
  4. "tag.location": "test"
  5. }
  6. }
  7. hostPorts A set of be node addresses to be operated, ip:heartbeat_port
  8. properties The configuration passed in when adding a node is only used to configure the tag. If not, the default tag is used

Response

  1. {
  2. "msg": "Error",
  3. "code": 1,
  4. "data": "errCode = 2, detailMessage = Same backend already exists[127.0.0.1:9050]",
  5. "count": 0
  6. }
  7. msg Success/Error
  8. code 0/1
  9. data ""/Error message

Examples

  1. add be node

    post /rest/v2/manager/node/ADD/be Request body

    1. {
    2. "hostPorts": ["127.0.0.1:9050"]
    3. }

    Response

    1. {
    2. "msg": "success",
    3. "code": 0,
    4. "data": null,
    5. "count": 0
    6. }
  2. drop be node

    post /rest/v2/manager/node/DROP/be Request body

    1. {
    2. "hostPorts": ["127.0.0.1:9050"]
    3. }

    Response

    1. {
    2. "msg": "success",
    3. "code": 0,
    4. "data": null,
    5. "count": 0
    6. }
  3. offline be node

    post /rest/v2/manager/node/DECOMMISSION/be Request body

    1. {
    2. "hostPorts": ["127.0.0.1:9050"]
    3. }

    Response

    1. {
    2. "msg": "success",
    3. "code": 0,
    4. "data": null,
    5. "count": 0
    6. }

Operate fe node

POST /rest/v2/manager/node/{action}/fe

Description

Used to add/drop fe node

action:ADD/DROP

Request body

  1. {
  2. "role": "FOLLOWER",
  3. "hostPort": "127.0.0.1:9030"
  4. }
  5. role FOLLOWER/OBSERVER
  6. hostPort The address of the fe node to be operated, ip:edit_log_port

Response

  1. {
  2. "msg": "Error",
  3. "code": 1,
  4. "data": "errCode = 2, detailMessage = frontend already exists name: 127.0.0.1:9030_1670495889415, role: FOLLOWER, 127.0.0.1:9030",
  5. "count": 0
  6. }
  7. msg Success/Error
  8. code 0/1
  9. data ""/Error message

Examples

  1. add FOLLOWER node

    post /rest/v2/manager/node/ADD/fe Request body

    1. {
    2. "role": "FOLLOWER",
    3. "hostPort": "127.0.0.1:9030"
    4. }

    Response

    1. {
    2. "msg": "success",
    3. "code": 0,
    4. "data": null,
    5. "count": 0
    6. }
  2. drop FOLLOWER node

    post /rest/v2/manager/node/DROP/fe Request body

    1. {
    2. "role": "FOLLOWER",
    3. "hostPort": "127.0.0.1:9030"
    4. }

    Response

    1. {
    2. "msg": "success",
    3. "code": 0,
    4. "data": null,
    5. "count": 0
    6. }