frontends

Name

frontends

description

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

This function is used in FROM clauses.

syntax

frontends()

The table schema of frontends() tvf:

  1. mysql> desc function frontends();
  2. +-------------------+------+------+-------+---------+-------+
  3. | Field | Type | Null | Key | Default | Extra |
  4. +-------------------+------+------+-------+---------+-------+
  5. | Name | TEXT | No | false | NULL | NONE |
  6. | Host | TEXT | No | false | NULL | NONE |
  7. | EditLogPort | TEXT | No | false | NULL | NONE |
  8. | HttpPort | TEXT | No | false | NULL | NONE |
  9. | QueryPort | TEXT | No | false | NULL | NONE |
  10. | RpcPort | TEXT | No | false | NULL | NONE |
  11. | ArrowFlightSqlPort| TEXT | No | false | NULL | NONE |
  12. | Role | TEXT | No | false | NULL | NONE |
  13. | IsMaster | TEXT | No | false | NULL | NONE |
  14. | ClusterId | TEXT | No | false | NULL | NONE |
  15. | Join | TEXT | No | false | NULL | NONE |
  16. | Alive | TEXT | No | false | NULL | NONE |
  17. | ReplayedJournalId | TEXT | No | false | NULL | NONE |
  18. | LastHeartbeat | TEXT | No | false | NULL | NONE |
  19. | IsHelper | TEXT | No | false | NULL | NONE |
  20. | ErrMsg | TEXT | No | false | NULL | NONE |
  21. | Version | TEXT | No | false | NULL | NONE |
  22. | CurrentConnected | TEXT | No | false | NULL | NONE |
  23. +-------------------+------+------+-------+---------+-------+
  24. 17 rows in set (0.022 sec)

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

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

example

  1. mysql> select * from frontends()\G
  2. *************************** 1. row ***************************
  3. Name: fe_5fa8bf19_fd6b_45cb_89c5_25a5ebc45582
  4. IP: 10.xx.xx.14
  5. EditLogPort: 9013
  6. HttpPort: 8034
  7. QueryPort: 9033
  8. RpcPort: 9023
  9. ArrowFlightSqlPort: 9040
  10. Role: FOLLOWER
  11. IsMaster: true
  12. ClusterId: 1258341841
  13. Join: true
  14. Alive: true
  15. ReplayedJournalId: 186
  16. LastHeartbeat: 2023-06-15 16:53:12
  17. IsHelper: true
  18. ErrMsg:
  19. Version: doris-0.0.0-trunk-4b18cde0c7
  20. CurrentConnected: Yes
  21. 1 row in set (0.060 sec)

keywords

  1. frontends