[feature](Docs) add backends and rowsets docs (#14542)

* add backends and rowsets docs

* fix doc
This commit is contained in:
Tiewei Fang
2022-11-26 12:24:50 +08:00
committed by GitHub
parent 70a424d6e3
commit 7486660c12
5 changed files with 346 additions and 0 deletions

View File

@ -0,0 +1,87 @@
---
{
"title": "backends",
"language": "en"
}
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## backends
### Name
backends
### description
`backends` is a built-in system table of doris, which is stored under the information_schema database. You can view the `BE` node information through the `backends` system table.
The `backends` table schema is:
```sql
MySQL [information_schema]> desc information_schema.backends;
+-----------------------+-------------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+-------------+------+-------+---------+-------+
| BackendId | BIGINT | Yes | false | NULL | |
| Cluster | VARCHAR(40) | Yes | false | NULL | |
| IP | VARCHAR(40) | Yes | false | NULL | |
| HeartbeatPort | INT | Yes | false | NULL | |
| BePort | INT | Yes | false | NULL | |
| HttpPort | INT | Yes | false | NULL | |
| BrpcPort | INT | Yes | false | NULL | |
| LastStartTime | VARCHAR(40) | Yes | false | NULL | |
| LastHeartbeat | VARCHAR(40) | Yes | false | NULL | |
| Alive | VARCHAR(40) | Yes | false | NULL | |
| SystemDecommissioned | VARCHAR(40) | Yes | false | NULL | |
| ClusterDecommissioned | VARCHAR(40) | Yes | false | NULL | |
| TabletNum | BIGINT | Yes | false | NULL | |
| DataUsedCapacity | BIGINT | Yes | false | NULL | |
| AvailCapacity | BIGINT | Yes | false | NULL | |
| TotalCapacity | BIGINT | Yes | false | NULL | |
| UsedPct | DOUBLE | Yes | false | NULL | |
| MaxDiskUsedPct | DOUBLE | Yes | false | NULL | |
| RemoteUsedCapacity | BIGINT | Yes | false | NULL | |
| Tag | VARCHAR(40) | Yes | false | NULL | |
| ErrMsg | VARCHAR(40) | Yes | false | NULL | |
| Version | VARCHAR(40) | Yes | false | NULL | |
| Status | VARCHAR(40) | Yes | false | NULL | |
+-----------------------+-------------+------+-------+---------+-------+
```
backends 系统表展示出来的信息基本与 `show backends` 语句展示出的信息一致。但是backends系统表的各个字段类型更加明确,且可以利用backends 系统表去做过滤、join等操作。
The information displayed by the `backends` system table is basically consistent with the information displayed by the `show backends` statement. However, the types of each field in the `backends` system table are more specific, and you can use the `backends` system table to perform operations such as filtering and joining.
### Example
```sql
MySQL [information_schema]> select * from information_schema.backends;
+-----------+-----------------+-----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+--------------------+------------------+--------------------+--------------------------+--------+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| BackendId | Cluster | IP | HeartbeatPort | BePort | HttpPort | BrpcPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | ClusterDecommissioned | TabletNum | DataUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status |
+-----------+-----------------+-----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+--------------------+------------------+--------------------+--------------------------+--------+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| 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} |
+-----------+-----------------+-----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+--------------------+------------------+--------------------+--------------------------+--------+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+
```
### KeyWords
backends, information_schema
### Best Practice

View File

@ -0,0 +1,83 @@
---
{
"title": "rowsets",
"language": "en"
}
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## rowsets
### Name
rowsets
### description
`rowsets` is a built-in system table of doris, which is stored under the information_schema database. You can view the current rowsets information of each `BE` through the `rowsets` system table.
The `rowsets` table schema is:
```sql
MySQL [(none)]> desc information_schema.rowsets;
+------------------------+------------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------------+------------+------+-------+---------+-------+
| BACKEND_ID | BIGINT | Yes | false | NULL | |
| ROWSET_ID | VARCHAR(*) | Yes | false | NULL | |
| TABLET_ID | BIGINT | Yes | false | NULL | |
| ROWSET_NUM_ROWS | BIGINT | Yes | false | NULL | |
| TXN_ID | BIGINT | Yes | false | NULL | |
| NUM_SEGMENTS | BIGINT | Yes | false | NULL | |
| START_VERSION | BIGINT | Yes | false | NULL | |
| END_VERSION | BIGINT | Yes | false | NULL | |
| INDEX_DISK_SIZE | BIGINT | Yes | false | NULL | |
| DATA_DISK_SIZE | BIGINT | Yes | false | NULL | |
| CREATION_TIME | BIGINT | Yes | false | NULL | |
| OLDEST_WRITE_TIMESTAMP | BIGINT | Yes | false | NULL | |
| NEWEST_WRITE_TIMESTAMP | BIGINT | Yes | false | NULL | |
+------------------------+------------+------+-------+---------+-------+
```
### Example
```sql
select * from information_schema.rowsets where BACKEND_ID = 10004 limit 10;
+------------+--------------------------------------------------+-----------+-----------------+--------+--------------+---------------+-------------+-----------------+----------------+---------------+------------------------+------------------------+
| BACKEND_ID | ROWSET_ID | TABLET_ID | ROWSET_NUM_ROWS | TXN_ID | NUM_SEGMENTS | START_VERSION | END_VERSION | INDEX_DISK_SIZE | DATA_DISK_SIZE | CREATION_TIME | OLDEST_WRITE_TIMESTAMP | NEWEST_WRITE_TIMESTAMP |
+------------+--------------------------------------------------+-----------+-----------------+--------+--------------+---------------+-------------+-----------------+----------------+---------------+------------------------+------------------------+
| 10004 | 02000000000000994847fbd41a42297d7c7a57d3bcb46f8c | 10771 | 66850 | 6 | 1 | 3 | 3 | 2894 | 688855 | 1659964582 | 1659964581 | 1659964581 |
| 10004 | 020000000000008d4847fbd41a42297d7c7a57d3bcb46f8c | 10771 | 66850 | 2 | 1 | 2 | 2 | 2894 | 688855 | 1659964575 | 1659964574 | 1659964574 |
| 10004 | 02000000000000894847fbd41a42297d7c7a57d3bcb46f8c | 10771 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1659964567 | 1659964567 | 1659964567 |
| 10004 | 020000000000009a4847fbd41a42297d7c7a57d3bcb46f8c | 10773 | 66639 | 6 | 1 | 3 | 3 | 2897 | 686828 | 1659964582 | 1659964581 | 1659964581 |
| 10004 | 020000000000008e4847fbd41a42297d7c7a57d3bcb46f8c | 10773 | 66639 | 2 | 1 | 2 | 2 | 2897 | 686828 | 1659964575 | 1659964574 | 1659964574 |
| 10004 | 02000000000000884847fbd41a42297d7c7a57d3bcb46f8c | 10773 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1659964567 | 1659964567 | 1659964567 |
| 10004 | 02000000000000984847fbd41a42297d7c7a57d3bcb46f8c | 10757 | 66413 | 6 | 1 | 3 | 3 | 2893 | 685381 | 1659964582 | 1659964581 | 1659964581 |
| 10004 | 020000000000008c4847fbd41a42297d7c7a57d3bcb46f8c | 10757 | 66413 | 2 | 1 | 2 | 2 | 2893 | 685381 | 1659964575 | 1659964574 | 1659964574 |
| 10004 | 02000000000000874847fbd41a42297d7c7a57d3bcb46f8c | 10757 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1659964567 | 1659964567 | 1659964567 |
| 10004 | 020000000000009c4847fbd41a42297d7c7a57d3bcb46f8c | 10739 | 1698 | 8 | 1 | 3 | 3 | 454 | 86126 | 1659964582 | 1659964582 | 1659964582 |
+------------+--------------------------------------------------+-----------+-----------------+--------+--------------+---------------+-------------+-----------------+----------------+---------------+------------------------+------------------------+
```
### KeyWords
rowsets, information_schema
### Best Practice

View File

@ -1019,6 +1019,14 @@
"admin-manual/privilege-ldap/ldap"
]
},
{
"type": "category",
"label": "System Table",
"items": [
"admin-manual/system-table/backends",
"admin-manual/system-table/rowsets"
]
},
"admin-manual/multi-tenant",
{
"type": "category",

View File

@ -0,0 +1,85 @@
---
{
"title": "backends",
"language": "zh-CN"
}
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## backends
### Name
backends
### description
`backends` 是doris内置的一张系统表,存放在`information_schema`数据库下。通过`backends`系统表可以查看当前doris集群中的 `BE` 节点信息。
`backends` 表结构为:
```sql
MySQL [information_schema]> desc information_schema.backends;
+-----------------------+-------------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+-------------+------+-------+---------+-------+
| BackendId | BIGINT | Yes | false | NULL | |
| Cluster | VARCHAR(40) | Yes | false | NULL | |
| IP | VARCHAR(40) | Yes | false | NULL | |
| HeartbeatPort | INT | Yes | false | NULL | |
| BePort | INT | Yes | false | NULL | |
| HttpPort | INT | Yes | false | NULL | |
| BrpcPort | INT | Yes | false | NULL | |
| LastStartTime | VARCHAR(40) | Yes | false | NULL | |
| LastHeartbeat | VARCHAR(40) | Yes | false | NULL | |
| Alive | VARCHAR(40) | Yes | false | NULL | |
| SystemDecommissioned | VARCHAR(40) | Yes | false | NULL | |
| ClusterDecommissioned | VARCHAR(40) | Yes | false | NULL | |
| TabletNum | BIGINT | Yes | false | NULL | |
| DataUsedCapacity | BIGINT | Yes | false | NULL | |
| AvailCapacity | BIGINT | Yes | false | NULL | |
| TotalCapacity | BIGINT | Yes | false | NULL | |
| UsedPct | DOUBLE | Yes | false | NULL | |
| MaxDiskUsedPct | DOUBLE | Yes | false | NULL | |
| RemoteUsedCapacity | BIGINT | Yes | false | NULL | |
| Tag | VARCHAR(40) | Yes | false | NULL | |
| ErrMsg | VARCHAR(40) | Yes | false | NULL | |
| Version | VARCHAR(40) | Yes | false | NULL | |
| Status | VARCHAR(40) | Yes | false | NULL | |
+-----------------------+-------------+------+-------+---------+-------+
```
`backends` 系统表展示出来的信息基本与 `show backends` 语句展示出的信息一致。但是`backends`系统表的各个字段类型更加明确,且可以利用 `backends` 系统表去做过滤、join等操作。
### Example
```sql
MySQL [information_schema]> select * from information_schema.backends;
+-----------+-----------------+-----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+--------------------+------------------+--------------------+--------------------------+--------+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| BackendId | Cluster | IP | HeartbeatPort | BePort | HttpPort | BrpcPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | ClusterDecommissioned | TabletNum | DataUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status |
+-----------+-----------------+-----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+--------------------+------------------+--------------------+--------------------------+--------+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| 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} |
+-----------+-----------------+-----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+--------------------+------------------+--------------------+--------------------------+--------+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+
```
### KeyWords
backends, information_schema
### Best Practice

View File

@ -0,0 +1,83 @@
---
{
"title": "rowsets",
"language": "zh-CN"
}
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## rowsets
### Name
rowsets
### description
`rowsets` 是doris内置的一张系统表,存放在`information_schema`数据库下。通过 `rowsets` 系统表可以查看各个`BE` 当前rowsets情况。
rowsets表结构为:
```sql
MySQL [(none)]> desc information_schema.rowsets;
+------------------------+------------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------------+------------+------+-------+---------+-------+
| BACKEND_ID | BIGINT | Yes | false | NULL | |
| ROWSET_ID | VARCHAR(*) | Yes | false | NULL | |
| TABLET_ID | BIGINT | Yes | false | NULL | |
| ROWSET_NUM_ROWS | BIGINT | Yes | false | NULL | |
| TXN_ID | BIGINT | Yes | false | NULL | |
| NUM_SEGMENTS | BIGINT | Yes | false | NULL | |
| START_VERSION | BIGINT | Yes | false | NULL | |
| END_VERSION | BIGINT | Yes | false | NULL | |
| INDEX_DISK_SIZE | BIGINT | Yes | false | NULL | |
| DATA_DISK_SIZE | BIGINT | Yes | false | NULL | |
| CREATION_TIME | BIGINT | Yes | false | NULL | |
| OLDEST_WRITE_TIMESTAMP | BIGINT | Yes | false | NULL | |
| NEWEST_WRITE_TIMESTAMP | BIGINT | Yes | false | NULL | |
+------------------------+------------+------+-------+---------+-------+
```
### Example
```sql
select * from information_schema.rowsets where BACKEND_ID = 10004 limit 10;
+------------+--------------------------------------------------+-----------+-----------------+--------+--------------+---------------+-------------+-----------------+----------------+---------------+------------------------+------------------------+
| BACKEND_ID | ROWSET_ID | TABLET_ID | ROWSET_NUM_ROWS | TXN_ID | NUM_SEGMENTS | START_VERSION | END_VERSION | INDEX_DISK_SIZE | DATA_DISK_SIZE | CREATION_TIME | OLDEST_WRITE_TIMESTAMP | NEWEST_WRITE_TIMESTAMP |
+------------+--------------------------------------------------+-----------+-----------------+--------+--------------+---------------+-------------+-----------------+----------------+---------------+------------------------+------------------------+
| 10004 | 02000000000000994847fbd41a42297d7c7a57d3bcb46f8c | 10771 | 66850 | 6 | 1 | 3 | 3 | 2894 | 688855 | 1659964582 | 1659964581 | 1659964581 |
| 10004 | 020000000000008d4847fbd41a42297d7c7a57d3bcb46f8c | 10771 | 66850 | 2 | 1 | 2 | 2 | 2894 | 688855 | 1659964575 | 1659964574 | 1659964574 |
| 10004 | 02000000000000894847fbd41a42297d7c7a57d3bcb46f8c | 10771 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1659964567 | 1659964567 | 1659964567 |
| 10004 | 020000000000009a4847fbd41a42297d7c7a57d3bcb46f8c | 10773 | 66639 | 6 | 1 | 3 | 3 | 2897 | 686828 | 1659964582 | 1659964581 | 1659964581 |
| 10004 | 020000000000008e4847fbd41a42297d7c7a57d3bcb46f8c | 10773 | 66639 | 2 | 1 | 2 | 2 | 2897 | 686828 | 1659964575 | 1659964574 | 1659964574 |
| 10004 | 02000000000000884847fbd41a42297d7c7a57d3bcb46f8c | 10773 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1659964567 | 1659964567 | 1659964567 |
| 10004 | 02000000000000984847fbd41a42297d7c7a57d3bcb46f8c | 10757 | 66413 | 6 | 1 | 3 | 3 | 2893 | 685381 | 1659964582 | 1659964581 | 1659964581 |
| 10004 | 020000000000008c4847fbd41a42297d7c7a57d3bcb46f8c | 10757 | 66413 | 2 | 1 | 2 | 2 | 2893 | 685381 | 1659964575 | 1659964574 | 1659964574 |
| 10004 | 02000000000000874847fbd41a42297d7c7a57d3bcb46f8c | 10757 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1659964567 | 1659964567 | 1659964567 |
| 10004 | 020000000000009c4847fbd41a42297d7c7a57d3bcb46f8c | 10739 | 1698 | 8 | 1 | 3 | 3 | 454 | 86126 | 1659964582 | 1659964582 | 1659964582 |
+------------+--------------------------------------------------+-----------+-----------------+--------+--------------+---------------+-------------+-----------------+----------------+---------------+------------------------+------------------------+
```
### KeyWords
rowsets, information_schema
### Best Practice