Skip to main content

FRONTENDS

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:

mysql> desc function frontends();
+-------------------+------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+------+------+-------+---------+-------+
| Name | TEXT | No | false | NULL | NONE |
| Host | TEXT | No | false | NULL | NONE |
| EditLogPort | TEXT | No | false | NULL | NONE |
| HttpPort | TEXT | No | false | NULL | NONE |
| QueryPort | TEXT | No | false | NULL | NONE |
| RpcPort | TEXT | No | false | NULL | NONE |
| ArrowFlightSqlPort| TEXT | No | false | NULL | NONE |
| Role | TEXT | No | false | NULL | NONE |
| IsMaster | TEXT | No | false | NULL | NONE |
| ClusterId | TEXT | No | false | NULL | NONE |
| Join | TEXT | No | false | NULL | NONE |
| Alive | TEXT | No | false | NULL | NONE |
| ReplayedJournalId | TEXT | No | false | NULL | NONE |
| LastHeartbeat | TEXT | No | false | NULL | NONE |
| IsHelper | TEXT | No | false | NULL | NONE |
| ErrMsg | TEXT | No | false | NULL | NONE |
| Version | TEXT | No | false | NULL | NONE |
| CurrentConnected | TEXT | No | false | NULL | NONE |
+-------------------+------+------+-------+---------+-------+
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​

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

keywords​

frontends