Node Action

    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

    SinceVersion dev

    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

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

    Response

    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 /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

    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. "frontend":[
    8. ""
    9. },
    10. "count": 0
    11. }

    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. "配置项",
    7. "节点",
    8. "节点类型",
    9. "配置值类型",
    10. "MasterOnly",
    11. "配置值",
    12. "可修改"
    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. "配置项",
    7. "节点",
    8. "节点类型",
    9. "配置值类型",
    10. "配置值",
    11. "可修改"
    12. ],
    13. "rows": [
    14. [
    15. ""
    16. ]
    17. ]
    18. },
    19. "count": 0
    20. }
    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:

    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. "value":"10000",
      6. },
      7. "alter_table_timeout_second":{
      8. "node":[
      9. "127.0.0.1:8030"
      10. ],
      11. "value":"true",
      12. "persist":"true"
      13. }
      14. }

      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.

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

    Description

    action:ADD/DROP/DECOMMISSION

    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

      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
    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"

      Response