backends

Name

SinceVersion 1.2

backends

description

backends 是doris内置的一张系统表,存放在information_schema数据库下。通过backends系统表可以查看当前doris集群中的 BE 节点信息。

backends 表结构为:

  1. MySQL [information_schema]> desc information_schema.backends;
  2. +-----------------------+-------------+------+-------+---------+-------+
  3. | Field | Type | Null | Key | Default | Extra |
  4. +-----------------------+-------------+------+-------+---------+-------+
  5. | BackendId | BIGINT | Yes | false | NULL | |
  6. | Cluster | VARCHAR(40) | Yes | false | NULL | |
  7. | IP | VARCHAR(40) | Yes | false | NULL | |
  8. | HeartbeatPort | INT | Yes | false | NULL | |
  9. | BePort | INT | Yes | false | NULL | |
  10. | HttpPort | INT | Yes | false | NULL | |
  11. | BrpcPort | INT | Yes | false | NULL | |
  12. | LastStartTime | VARCHAR(40) | Yes | false | NULL | |
  13. | LastHeartbeat | VARCHAR(40) | Yes | false | NULL | |
  14. | Alive | VARCHAR(40) | Yes | false | NULL | |
  15. | SystemDecommissioned | VARCHAR(40) | Yes | false | NULL | |
  16. | ClusterDecommissioned | VARCHAR(40) | Yes | false | NULL | |
  17. | TabletNum | BIGINT | Yes | false | NULL | |
  18. | DataUsedCapacity | BIGINT | Yes | false | NULL | |
  19. | AvailCapacity | BIGINT | Yes | false | NULL | |
  20. | TotalCapacity | BIGINT | Yes | false | NULL | |
  21. | UsedPct | DOUBLE | Yes | false | NULL | |
  22. | MaxDiskUsedPct | DOUBLE | Yes | false | NULL | |
  23. | RemoteUsedCapacity | BIGINT | Yes | false | NULL | |
  24. | Tag | VARCHAR(40) | Yes | false | NULL | |
  25. | ErrMsg | VARCHAR(40) | Yes | false | NULL | |
  26. | Version | VARCHAR(40) | Yes | false | NULL | |
  27. | Status | VARCHAR(40) | Yes | false | NULL | |
  28. +-----------------------+-------------+------+-------+---------+-------+

backends 系统表展示出来的信息基本与 show backends 语句展示出的信息一致。但是backends系统表的各个字段类型更加明确,且可以利用 backends 系统表去做过滤、join等操作。

Example

  1. MySQL [information_schema]> select * from information_schema.backends;
  2. +-----------+-----------------+-----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+--------------------+------------------+--------------------+--------------------------+--------+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  3. | BackendId | Cluster | IP | HeartbeatPort | BePort | HttpPort | BrpcPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | ClusterDecommissioned | TabletNum | DataUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status |
  4. +-----------+-----------------+-----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+--------------------+------------------+--------------------+--------------------------+--------+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+
  5. | 10757 | default_cluster | 127.0.0.1 | 9159 | 9169 | 8149 | 8169 | 2022-11-24 11:16:31 | 2022-11-24 12:02:57 | true | false | false | 14 | 0 | 941359747073 | 3170529116160 | 70.309064746482065 | 70.3090647465136 | 0 | {"location" : "default"} | | doris-0.0.0-trunk-cc9545359 | {"lastSuccessReportTabletsTime":"2022-11-24 12:02:06","lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false} |
  6. +-----------+-----------------+-----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+--------------------+------------------+--------------------+--------------------------+--------+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+

KeyWords

  1. backends, information_schema

Best Practice