backends

Name

SinceVersion dev

backends

description

Table-Value-Function, generate a temporary table named backends. This tvf is used to view the information of BE nodes in the doris cluster.

This function is used in FROM clauses.

syntax

backends()

The table schema of backends() tvf:

  1. mysql> desc function backends();
  2. +-------------------------+---------+------+-------+---------+-------+
  3. | Field | Type | Null | Key | Default | Extra |
  4. +-------------------------+---------+------+-------+---------+-------+
  5. | BackendId | BIGINT | No | false | NULL | NONE |
  6. | Host | TEXT | No | false | NULL | NONE |
  7. | HeartbeatPort | INT | No | false | NULL | NONE |
  8. | BePort | INT | No | false | NULL | NONE |
  9. | HttpPort | INT | No | false | NULL | NONE |
  10. | BrpcPort | INT | No | false | NULL | NONE |
  11. | LastStartTime | TEXT | No | false | NULL | NONE |
  12. | LastHeartbeat | TEXT | No | false | NULL | NONE |
  13. | Alive | BOOLEAN | No | false | NULL | NONE |
  14. | SystemDecommissioned | BOOLEAN | No | false | NULL | NONE |
  15. | TabletNum | BIGINT | No | false | NULL | NONE |
  16. | DataUsedCapacity | BIGINT | No | false | NULL | NONE |
  17. | AvailCapacity | BIGINT | No | false | NULL | NONE |
  18. | TotalCapacity | BIGINT | No | false | NULL | NONE |
  19. | UsedPct | DOUBLE | No | false | NULL | NONE |
  20. | MaxDiskUsedPct | DOUBLE | No | false | NULL | NONE |
  21. | RemoteUsedCapacity | BIGINT | No | false | NULL | NONE |
  22. | Tag | TEXT | No | false | NULL | NONE |
  23. | ErrMsg | TEXT | No | false | NULL | NONE |
  24. | Version | TEXT | No | false | NULL | NONE |
  25. | Status | TEXT | No | false | NULL | NONE |
  26. | HeartbeatFailureCounter | INT | No | false | NULL | NONE |
  27. | NodeRole | TEXT | No | false | NULL | NONE |
  28. +-------------------------+---------+------+-------+---------+-------+
  29. 23 rows in set (0.002 sec)

The information displayed by the backends tvf is basically consistent with the information displayed by the show backends statement. However, the types of each field in the backends tvf are more specific, and you can use the backends tvf to perform operations such as filtering and joining.

The information displayed by the backends tvf is authenticated, which is consistent with the behavior of show backends, user must have ADMIN/OPERATOR privelege.

example

  1. mysql> select * from backends()\G
  2. *************************** 1. row ***************************
  3. BackendId: 10002
  4. Host: 10.xx.xx.90
  5. HeartbeatPort: 9053
  6. BePort: 9063
  7. HttpPort: 8043
  8. BrpcPort: 8069
  9. LastStartTime: 2023-06-15 16:51:02
  10. LastHeartbeat: 2023-06-15 17:09:58
  11. Alive: 1
  12. SystemDecommissioned: 0
  13. TabletNum: 21
  14. DataUsedCapacity: 0
  15. AvailCapacity: 5187141550081
  16. TotalCapacity: 7750977622016
  17. UsedPct: 33.077583202570978
  18. MaxDiskUsedPct: 33.077583202583881
  19. RemoteUsedCapacity: 0
  20. Tag: {"location" : "default"}
  21. ErrMsg:
  22. Version: doris-0.0.0-trunk-4b18cde0c7
  23. Status: {"lastSuccessReportTabletsTime":"2023-06-15 17:09:02","lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false}
  24. HeartbeatFailureCounter: 0
  25. NodeRole: mix
  26. 1 row in set (0.038 sec)

keywords

  1. backends