Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Update Broker doc #1884

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
39c4ddb
[doc] Update Broker doc by zhiliangliu
mklzl Jan 21, 2025
48bcd44
[doc]Refresh Character Set Statement Document Modification (#1833)
qsy840035156 Jan 21, 2025
98bc635
improve the article format of backends() and frontends() function (#1…
DongLiang-0 Jan 21, 2025
4bece7d
improve catalogs() and frontends_disks() function article format (#1812)
DongLiang-0 Jan 21, 2025
a377eec
improve the article format of hdfs() and mv_infos() function (#1828)
DongLiang-0 Jan 21, 2025
78b38d9
improve query(), number(),tasks(),jobs(),partitions() function articl…
DongLiang-0 Jan 21, 2025
034020f
[doc]Bit processing function documentation modification (#1832)
qsy840035156 Jan 21, 2025
c4ec486
[doc] Merge json_parse_* docs into json_parse zh_doc (#1846)
mklzl Jan 21, 2025
1f42571
[doc] Fix some json function zh_doc (#1829)
mklzl Jan 21, 2025
d79b447
[doc] Fix some json function zh_doc (#1827)
mklzl Jan 21, 2025
3f08952
[doc]Refresh table statement document modification (#1843)
qsy840035156 Jan 21, 2025
c22e502
[update] Delete to bitmap with check (#1888)
KassieZ Jan 21, 2025
42189b9
Benchmark - delete clickhouse intro (#1855)
wangtianyi2004 Jan 21, 2025
6e23577
[fix] Fix data-model/unique typo (#1743) (#1744)
potoo0 Jan 21, 2025
bec1850
[doc] Fix json_fun_* en_doc (#1862)
mklzl Jan 21, 2025
2596fb2
[opt](functions) update some numeric functions docs (#1811)
chaoyangqi Jan 21, 2025
f971684
improve the article format of local(), hudi_meta(), iceberg_meta() fu…
DongLiang-0 Jan 22, 2025
1cc0a6f
[doc]Optimize the article format of S3 TVF (#1804)
DongLiang-0 Jan 22, 2025
416aba7
[doc] Fix some syntax format err
mklzl Jan 22, 2025
9bfbe29
[doc](function) opt string function doc (#1849)
smallhibiscus Jan 22, 2025
4ff019f
[doc](bitmap) bitmap func part 2 (#1848)
gnehil Jan 22, 2025
2b55bbe
[doc](sql) bitmap-1 func (#1852)
catpineapple Jan 22, 2025
68d87c8
[doc](sql) system func (#1839)
catpineapple Jan 22, 2025
93bd8fc
[opt](function) optimize some struct function docs (#1845)
chaoyangqi Jan 22, 2025
8997450
[doc] remove doc 2.0 batch delete partitions (#1746)
baimafeima-yf Jan 22, 2025
7acbfe5
improve Backup and Restore Statements SQL Manual (#1853)
DongLiang-0 Jan 22, 2025
3009a89
style:update archived page style (#1900)
yang1666204 Jan 22, 2025
21cc326
[Fix](doc) fix Build docs with ldb toolchain (#1797)
zclllyybb Jan 22, 2025
7a91fd2
[doc] Modify the documentation of functions of array_map, array_max, …
ixzc Jan 22, 2025
2dde685
[doc] Update Broker doc by zhiliangliu
mklzl Jan 21, 2025
cadd17c
[doc] Fix some syntax format err
mklzl Jan 22, 2025
3154f91
[doc] Fix some syntax format err
mklzl Jan 22, 2025
a8ae879
Merge branch 'lzl_broker_patch' of https://github.com/mklzl/doris-web…
mklzl Jan 22, 2025
7e62d92
[doc] Fix some syntax format err
mklzl Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,44 @@ specific language governing permissions and limitations
under the License.
-->

## ALTER-SYSTEM-ADD-BROKER
## Description

### Name
This statement is used to add one or more BROKER nodes. (For administrators only!)
mklzl marked this conversation as resolved.
Show resolved Hide resolved

ALTER SYSTEM ADD BROKER
## Syntax

### Description
```sql
ALTER SYSTEM ADD BROKER broker_name "<host1>:<ipc_port>","<host2>:<ipc_port>", ...;
mklzl marked this conversation as resolved.
Show resolved Hide resolved
```

This statement is used to add a BROKER node. (Administrator only!)
## Required Parameters

grammar:
**1. broker_name**
mklzl marked this conversation as resolved.
Show resolved Hide resolved
The name given to the added broker process. It is recommended to keep the broker_name consistent within the same cluster.

```sql
ALTER SYSTEM ADD BROKER broker_name "broker_host1:broker_ipc_port1","broker_host2:broker_ipc_port2",...;
```
**2. host**
mklzl marked this conversation as resolved.
Show resolved Hide resolved
The IP of the node where the broker process needs to be added. If FQDN is enabled, use the FQDN of the node.

### Example
**3. ipc_port**
The PORT of the node where the broker process needs to be added, and the default value of this port is 8000.

1. Add two brokers
## Output
No Output Fields

```sql
ALTER SYSTEM ADD BROKER "host1:port", "host2:port";
```
2. When fe enable fqdn([fqdn](../../../admin-manual/cluster-management/fqdn.md)),add one Broker
## Access Control Requirements
The user who executes this operation needs to have the NODE_PRIV permission.

```sql
ALTER SYSTEM ADD BROKER "broker_fqdn1:port";
```
## Examples

### Keywords
1. Add two Brokers

ALTER, SYSTEM, ADD, FOLLOWER, ALTER SYSTEM
```sql
ALTER SYSTEM ADD BROKER "host1:port", "host2:port";
```
2. Add a Broker using FQDN

```sql
ALTER SYSTEM ADD BROKER "broker_fqdn1:port";
```

### Best Practice

Original file line number Diff line number Diff line change
Expand Up @@ -25,42 +25,48 @@ specific language governing permissions and limitations
under the License.
-->

## ALTER-SYSTEM-DROP-BROKER
## Description

### Name
This statement is used to delete BROKER nodes. (For administrators only)
mklzl marked this conversation as resolved.
Show resolved Hide resolved

ALTER SYSTEM DROP BROKER
## Syntax

### Description

This statement is to delete the BROKER node, (administrator only)

grammar:
1. Drop all Brokers
```sql
ALTER SYSTEM DROP ALL BROKER broker_name;
mklzl marked this conversation as resolved.
Show resolved Hide resolved
```

2. Drop one or more Broker nodes
```sql
-- Delete all brokers
ALTER SYSTEM DROP ALL BROKER broker_name
-- Delete a Broker node
ALTER SYSTEM DROP BROKER broker_name "host:port"[,"host:port"...];
ALTER SYSTEM DROP BROKER broker_name "<host1>:<ipc_port>"[,"<host2>:<ipc_port>", ...];
mklzl marked this conversation as resolved.
Show resolved Hide resolved
```
## Required Parameters

### Example
**1. broker_name**
The name of the broker process to be deleted.

1. Delete all brokers
**2. host**
The IP of the node where the broker process to be deleted is located. If FQDN is enabled, use the FQDN of the node.

```sql
ALTER SYSTEM DROP ALL BROKER broker_name
```
**3. ipc_port**
The PORT of the node where the broker process to be deleted is located, and the default value of this port is 8000.

2. Delete a Broker node
## Output
mklzl marked this conversation as resolved.
Show resolved Hide resolved
No Output Fields

```sql
ALTER SYSTEM DROP BROKER broker_name "host:port"[,"host:port"...];
```
## Access Control Requirements
The user who executes this operation needs to have the NODE_PRIV permission.

### Keywords
## Examples

ALTER, SYSTEM, DROP, FOLLOWER, ALTER SYSTEM
1. Delete all Brokers

### Best Practice
```sql
ALTER SYSTEM DROP ALL BROKER broker_name;
```

2. Delete a specific Broker node

```sql
ALTER SYSTEM DROP BROKER broker_name "10.10.10.1:8000";
```
47 changes: 29 additions & 18 deletions docs/sql-manual/sql-statements/Show-Statements/SHOW-BROKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,45 @@ specific language governing permissions and limitations
under the License.
-->

## SHOW-BROKER
## Description

### Name
This statement is used to view the status of the currently existing broker processes.

SHOW BROKER

### Description

This statement is used to view the currently existing broker

grammar:
## Syntax:

```sql
SHOW BROKER;
```

illustrate:
## Required Parameters
mklzl marked this conversation as resolved.
Show resolved Hide resolved
No Required Parameters

1. LastStartTime indicates the last BE start time.
2. LastHeartbeat indicates the last heartbeat.
3. Alive indicates whether the node is alive or not.
4. ErrMsg is used to display the error message when the heartbeat fails.
## Output
| Column | DateType | Note |
|-------|----|---------------------------------|
| Name | varchar | Broker Process Name |
| Host | varchar | Broker Process Node IP |
| Port | varchar | Broker Process Node Port |
| Alive | varchar | Broker Process Node Status |
| LastStartTime | varchar | Broker Process Last Start Time |
|LastUpdateTime | varchar | Broker Process Last Update Time |
|ErrMsg | varchar | Error message of the last failed startup of the Broker process |

### Example

### Keywords
## Access Control Requirements
The user executing this statement needs to have the `ADMIN/OPERATOR` permission.

SHOW, BROKER
## Examples

### Best Practice
1. View the status of the currently existing broker processes
```sql
show broker;
```
```text
+-------------+------------+------+-------+---------------------+---------------------+--------+
| Name | Host | Port | Alive | LastStartTime | LastUpdateTime | ErrMsg |
+-------------+------------+------+-------+---------------------+---------------------+--------+
| broker_test | 10.10.10.1 | 8196 | true | 2025-01-21 11:30:10 | 2025-01-21 11:31:40 | |
+-------------+------------+------+-------+---------------------+---------------------+--------+
```

Original file line number Diff line number Diff line change
Expand Up @@ -25,39 +25,43 @@ specific language governing permissions and limitations
under the License.
-->

## ALTER-SYSTEM-ADD-BROKER

### Name

ALTER SYSTEM ADD BROKER

## 描述

该语句用于添加一个 BROKER 节点。(仅管理员使用!)
该语句用于添加一个或者多个 BROKER 节点。(仅管理员使用!)

语法:
## 语法

```sql
ALTER SYSTEM ADD BROKER broker_name "broker_host1:broker_ipc_port1","broker_host2:broker_ipc_port2",...;
ALTER SYSTEM ADD BROKER broker_name "<host1>:<ipc_port>","<host2>:<ipc_port>", ...;
```

## 举例
## 必选参数
**1. broker_name**
给添加的 `broker` 进程起的名字。同一个集群中的 broker_name 建议保持一致。

1. 增加两个 Broker
**2. host**
需要添加的 `broker` 进程所在节点的 `IP` ,如果启用了 `FQDN`,则使用该节点的 `FQDN`。

**3. ipc_port**
需要添加的 `broker` 进程所在节点的 `PORT` ,该端口默认值为 `8000`。

```sql
ALTER SYSTEM ADD BROKER "host1:port", "host2:port";
```
2. fe开启fqdn([fqdn](../../../admin-manual/cluster-management/fqdn.md))时添加一个Broker
## 输出字段

```sql
ALTER SYSTEM ADD BROKER "broker_fqdn1:port";
```
## 权限控制
执行该操作的用户需要具备 `NODE_PRIV` 的权限。

## 示例

### Keywords
1. 增加两个 Broker

ALTER, SYSTEM, ADD, FOLLOWER, ALTER SYSTEM
```sql
ALTER SYSTEM ADD BROKER "host1:port", "host2:port";
```
2. 增加一个 Broker,使用 FQDN

```sql
ALTER SYSTEM ADD BROKER "broker_fqdn1:port";
```

### Best Practice

Original file line number Diff line number Diff line change
Expand Up @@ -25,42 +25,47 @@ specific language governing permissions and limitations
under the License.
-->

## ALTER-SYSTEM-DROP-BROKER

### Name

ALTER SYSTEM DROP BROKER

## 描述

该语句是删除 BROKER 节点,(仅限管理员使用)

语法:
## 语法

1. 删除所有 Broker
```sql
删除所有 Broker
ALTER SYSTEM DROP ALL BROKER broker_name
删除某一个 Broker 节点
ALTER SYSTEM DROP BROKER broker_name "host:port"[,"host:port"...];
ALTER SYSTEM DROP ALL BROKER broker_name;
```

## 举例
2. 删除某一个 Broker 节点
```sql
ALTER SYSTEM DROP BROKER broker_name "<host1>:<ipc_port>"[,"<host2>:<ipc_port>", ...];
```
## 必选参数

1. 删除所有 Broker
**1. broker_name**
需要删除的 `broker` 进程的名字。

```sql
ALTER SYSTEM DROP ALL BROKER broker_name
```
**2. host**
需要删除的 `broker` 进程所在节点的 `IP` ,如果启用了 `FQDN`,则使用该节点的 `FQDN`。

2. 删除某一个 Broker 节点
**3. ipc_port**
需要删除的 `broker` 进程所在节点的 `PORT` ,该端口默认值为 `8000`。

```sql
ALTER SYSTEM DROP BROKER broker_name "host:port"[,"host:port"...];
```
## 输出字段
## 权限控制
执行该操作的用户需要具备 `NODE_PRIV` 的权限。

### Keywords
## 示例

ALTER, SYSTEM, DROP, FOLLOWER, ALTER SYSTEM
1. 删除所有 Broker

### Best Practice
```sql
ALTER SYSTEM DROP ALL BROKER broker_name;
```

2. 删除某一个 Broker 节点

```sql
ALTER SYSTEM DROP BROKER broker_name "10.10.10.1:8000";
```
Loading