Skip to content

Commit

Permalink
6
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyiZzz committed Sep 19, 2023
1 parent c9e70cc commit 141f403
Show file tree
Hide file tree
Showing 56 changed files with 174 additions and 62 deletions.
2 changes: 1 addition & 1 deletion be/src/agent/heartbeat_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void HeartbeatServer::heartbeat(THeartbeatResult& heartbeat_result,
heartbeat_result.backend_info.__set_http_port(config::webserver_port);
heartbeat_result.backend_info.__set_be_rpc_port(-1);
heartbeat_result.backend_info.__set_brpc_port(config::brpc_port);
heartbeat_result.backend_info.__set_arrow_flight_port(config::arrow_flight_port);
heartbeat_result.backend_info.__set_arrow_flight_sql_port(config::arrow_flight_sql_port);
heartbeat_result.backend_info.__set_version(get_short_version());
heartbeat_result.backend_info.__set_be_start_time(_be_epoch);
heartbeat_result.backend_info.__set_be_node_role(config::be_node_role);
Expand Down
2 changes: 1 addition & 1 deletion be/src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ DEFINE_Int32(be_port, "9060");
// port for brpc
DEFINE_Int32(brpc_port, "8060");

DEFINE_Int32(arrow_flight_port, "-1");
DEFINE_Int32(arrow_flight_sql_port, "-1");

// the number of bthreads for brpc, the default value is set to -1,
// which means the number of bthreads is #cpu-cores
Expand Down
6 changes: 3 additions & 3 deletions be/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ DECLARE_Int32(be_port);
// port for brpc
DECLARE_Int32(brpc_port);

// port for arrow flight
// Default -1, do not start arrow flight server.
DECLARE_Int32(arrow_flight_port);
// port for arrow flight sql
// Default -1, do not start arrow flight sql server.
DECLARE_Int32(arrow_flight_sql_port);

// the number of bthreads for brpc, the default value is set to -1,
// which means the number of bthreads is #cpu-cores
Expand Down
2 changes: 1 addition & 1 deletion be/src/service/doris_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ int main(int argc, char** argv) {
// 5. arrow flight service
std::shared_ptr<doris::flight::FlightSqlServer> flight_server =
std::move(doris::flight::FlightSqlServer::create()).ValueOrDie();
status = flight_server->init(doris::config::arrow_flight_port);
status = flight_server->init(doris::config::arrow_flight_sql_port);

// 6. start daemon thread to do clean or gc jobs
doris::Daemon daemon;
Expand Down
2 changes: 1 addition & 1 deletion conf/be.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ be_port = 9060
webserver_port = 8040
heartbeat_service_port = 9050
brpc_port = 8060
arrow_flight_port = -1
arrow_flight_sql_port = -1

# HTTPS configures
enable_https = false
Expand Down
1 change: 1 addition & 0 deletions conf/fe.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ http_port = 8030
rpc_port = 9020
query_port = 9030
edit_log_port = 9010
arrow_flight_sql_port = -1

# Choose one if there are more than one ip except loopback address.
# Note that there should at most one ip match this list.
Expand Down
1 change: 1 addition & 0 deletions docs/en/community/developer-guide/be-vscode-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ be_rpc_port = 9070
webserver_port = 8040
heartbeat_service_port = 9050
brpc_port = 8060
arrow_flight_sql_port = -1
# Note that there should be at most one ip that matches this list.
# If no ip matches this rule, it will choose one randomly.
Expand Down
1 change: 1 addition & 0 deletions docs/en/community/developer-guide/fe-idea-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ sys_log_level = INFO
http_port = 8030
rpc_port = 9020
query_port = 9030
arrow_flight_sql_port = -1
edit_log_port = 9010

# Choose one if there are more than one ip except loopback address.
Expand Down
1 change: 1 addition & 0 deletions docs/en/docs/admin-manual/cluster-management/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ admin set frontend config("disable_tablet_scheduler" = "true");
http_port = 18030
rpc_port = 19020
query_port = 19030
arrow_flight_sql_port = 19040
edit_log_port = 19010
...
```
Expand Down
6 changes: 6 additions & 0 deletions docs/en/docs/admin-manual/config/be-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ There are two ways to configure BE configuration items:
* Description: The port of BRPC on BE, used for communication between BEs
* Default value: 8060
#### `arrow_flight_sql_port`
* Type: int32
* Description: The port of Arrow Flight SQL server on BE, used for communication between Arrow Flight Client and BE
* Default value: -1
#### `enable_https`
* Type: bool
Expand Down
6 changes: 6 additions & 0 deletions docs/en/docs/admin-manual/config/fe-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,12 @@ Default:9030
FE MySQL server port
#### `arrow_flight_sql_port`
Default:-1
Arrow Flight SQL server port
#### `frontend_address`
Status: Deprecated, not recommended use. This parameter may be deleted later
Expand Down
3 changes: 3 additions & 0 deletions docs/en/docs/admin-manual/http-actions/fe/bootstrap-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ none
"data": {
"queryPort": 9030,
"rpcPort": 9020,
"arrowFlightSqlPort": 9040,
"maxReplayedJournal": 17287
},
"count": 0
Expand All @@ -85,6 +86,7 @@ none
* `queryPort` is the MySQL protocol port of the FE node.
* `rpcPort` is the thrift RPC port of the FE node.
* `maxReplayedJournal` represents the maximum metadata journal id currently played back by the FE node.
* `arrowFlightSqlPort` is the Arrow Flight SQL port of the FE node.
## Examples
Expand Down Expand Up @@ -114,6 +116,7 @@ none
"data": {
"queryPort": 9030,
"rpcPort": 9020,
"arrowFlightSqlPort": 9040,
"maxReplayedJournal": 17287
},
"count": 0
Expand Down
1 change: 1 addition & 0 deletions docs/en/docs/admin-manual/http-actions/fe/node-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ frontends:
"HttpPort",
"QueryPort",
"RpcPort",
"ArrowFlightSqlPort",
"Role",
"IsMaster",
"ClusterId",
Expand Down
5 changes: 5 additions & 0 deletions docs/en/docs/admin-manual/maint-monitor/metadata-operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ FE currently has the following ports
* http_port: http port, also used to push image
* rpc_port: thrift server port of Frontend
* query_port: Mysql connection port
* arrow_flight_sql_port: Arrow Flight SQL connection port

1. edit_log_port

Expand All @@ -256,6 +257,10 @@ FE currently has the following ports

After modifying the configuration, restart FE directly. This only affects mysql's connection target.

5. arrow_flight_sql_port

After modifying the configuration, restart FE directly. This only affects arrow flight sql server connection target.

### Recover metadata from FE memory
In some extreme cases, the image file on the disk may be damaged, but the metadata in the memory is intact. At this point, we can dump the metadata from the memory and replace the image file on the disk to recover the metadata. the entire non-stop query service operation steps are as follows:

Expand Down
1 change: 1 addition & 0 deletions docs/en/docs/get-starting/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ mysql> show frontends\G;
HttpPort: 8030
QueryPort: 9030
RpcPort: 9020
ArrowFlightSqlPort: 9040
Role: FOLLOWER
IsMaster: true
ClusterId: 1685821635
Expand Down
1 change: 1 addition & 0 deletions docs/en/docs/install/standard-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Doris instances communicate directly over the network. The following table shows
| FE | http_port | 8030 | FE <--> FE, user <--> FE | HTTP server port on FE |
| FE | rpc_port | 9020 | BE --> FE, FE <--> FE | Thrift server port on FE; The configurations of each FE should be consistent. |
| FE | query_port | 9030 | user <--> FE | MySQL server port on FE |
| FE | arrow_flight_sql_port | 9040 | user <--> FE | Arrow Flight SQL server port on FE |
| FE | edit\_log_port | 9010 | FE <--> FE | Port on FE for BDBJE communication |
| Broker | broker ipc_port | 8000 | FE --> Broker, BE --> Broker | Thrift server port on Broker for receiving requests |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ mysql> desc function frontends();
| 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 |
Expand Down Expand Up @@ -85,6 +86,7 @@ mysql> select * from frontends()\G
HttpPort: 8034
QueryPort: 9033
RpcPort: 9023
ArrowFlightSqlPort: 9040
Role: FOLLOWER
IsMaster: true
ClusterId: 1258341841
Expand Down
1 change: 1 addition & 0 deletions docs/zh-CN/community/developer-guide/be-vscode-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ be_rpc_port = 9070
webserver_port = 8040
heartbeat_service_port = 9050
brpc_port = 8060
arrow_flight_sql_port = -1

# Note that there should at most one ip match this list.
# If no ip match this rule, will choose one randomly.
Expand Down
1 change: 1 addition & 0 deletions docs/zh-CN/community/developer-guide/fe-idea-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ sys_log_level = INFO
http_port = 8030
rpc_port = 9020
query_port = 9030
arrow_flight_sql_port = -1
edit_log_port = 9010

# Choose one if there are more than one ip except loopback address.
Expand Down
1 change: 1 addition & 0 deletions docs/zh-CN/docs/admin-manual/cluster-management/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ admin set frontend config("disable_tablet_scheduler" = "true");
http_port = 18030
rpc_port = 19020
query_port = 19030
arrow_flight_sql_port = 19040
edit_log_port = 19010
...
```
Expand Down
6 changes: 6 additions & 0 deletions docs/zh-CN/docs/admin-manual/config/be-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ BE 重启后该配置将失效。如果想持久化修改结果,使用如下
* 描述:BE 上的 brpc 的端口,用于 BE 之间通讯
* 默认值:8060

#### `arrow_flight_sql_port`

* 类型:int32
* 描述:FE 上的 Arrow Flight SQL server 的端口,用于从 Arrow Flight Client 和 BE 之间通讯
* 默认值:-1

#### `enable_https`

* 类型:bool
Expand Down
6 changes: 6 additions & 0 deletions docs/zh-CN/docs/admin-manual/config/fe-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,12 @@ heartbeat_mgr 中处理心跳事件的线程数。

Doris FE 通过 mysql 协议查询连接端口

#### `arrow_flight_sql_port`

默认值:-1

Doris FE 通过 Arrow Flight SQL 协议查询连接端口

#### `frontend_address`

状态:已弃用,不建议使用。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ under the License.
"data": {
"queryPort": 9030,
"rpcPort": 9020,
"arrowFlightSqlPort": 9040,
"maxReplayedJournal": 17287
},
"count": 0
Expand All @@ -85,6 +86,7 @@ under the License.
* `queryPort` 是 FE 节点的 MySQL 协议端口。
* `rpcPort` 是 FE 节点的 thrift RPC 端口。
* `maxReplayedJournal` 表示 FE 节点当前回放的最大元数据日志id。
* `arrowFlightSqlPort` 是 FE 节点的 Arrow Flight SQL 协议端口。

## Examples

Expand Down Expand Up @@ -114,6 +116,7 @@ under the License.
"data": {
"queryPort": 9030,
"rpcPort": 9020,
"arrowFlightSqlPort": 9040,
"maxReplayedJournal": 17287
},
"count": 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ frontends:
"HttpPort",
"QueryPort",
"RpcPort",
"ArrowFlightSqlPort",
"Role",
"IsMaster",
"ClusterId",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ FE 目前有以下几个端口
* http_port:http 端口,也用于推送 image
* rpc_port:FE 的 thrift server port
* query_port:Mysql 连接端口
* arrow_flight_sql_port: Arrow Flight SQL 连接端口

1. edit_log_port

Expand All @@ -257,6 +258,9 @@ FE 目前有以下几个端口

修改配置后,直接重启 FE 即可。这个只影响到 mysql 的连接目标。

5. arrow_flight_sql_port

修改配置后,直接重启 FE 即可。这个只影响到 Arrow Flight SQL 的连接目标。

### 从 FE 内存中恢复元数据

Expand Down
2 changes: 2 additions & 0 deletions docs/zh-CN/docs/get-starting/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ mysql> show frontends\G
HttpPort: 8030
QueryPort: 9030
RpcPort: 9020
ArrowFlightSqlPort: 9040
Role: FOLLOWER
IsMaster: true
ClusterId: 1685821635
Expand Down Expand Up @@ -277,6 +278,7 @@ mysql> SHOW BACKENDS\G
BePort: 9060
HttpPort: 8040
BrpcPort: 8060
ArrowFlightSqlPort: 8070
LastStartTime: 2022-08-16 15:31:37
LastHeartbeat: 2022-08-17 13:33:17
Alive: true
Expand Down
1 change: 1 addition & 0 deletions docs/zh-CN/docs/install/standard-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Doris 各个实例直接通过网络进行通讯。以下表格展示了所有
| FE | http_port | 8030 | FE <--> FE,用户 <--> FE |FE 上的 http server 端口 |
| FE | rpc_port | 9020 | BE --> FE, FE <--> FE | FE 上的 thrift server 端口,每个fe的配置需要保持一致|
| FE | query_port | 9030 | 用户 <--> FE | FE 上的 mysql server 端口 |
| FE | arrow_flight_sql_port | 9040 | 用户 <--> FE | FE 上的 Arrow Flight SQL server 端口 |
| FE | edit\_log_port | 9010 | FE <--> FE | FE 上的 bdbje 之间通信用的端口 |
| Broker | broker\_ipc_port | 8000 | FE --> Broker, BE --> Broker | Broker 上的 thrift server,用于接收请求 |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ mysql> desc function frontends();
| 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 |
Expand Down Expand Up @@ -84,6 +85,7 @@ mysql> select * from frontends()\G
HttpPort: 8034
QueryPort: 9033
RpcPort: 9023
ArrowFlightSqlPort: 9040
Role: FOLLOWER
IsMaster: true
ClusterId: 1258341841
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public class Config extends ConfigBase {
public static int query_port = 9030;

@ConfField(description = {"FE Arrow-Flight-SQL server 的端口号", "The port of FE Arrow-Flight-SQ server"})
public static int flight_sql_query_port = -1;
public static int arrow_flight_sql_port = -1;

@ConfField(description = {"MySQL 服务的 IO 线程数", "The number of IO threads in MySQL service"})
public static int mysql_service_io_threads_num = 4;
Expand Down
7 changes: 6 additions & 1 deletion fe/fe-core/src/main/java/org/apache/doris/DorisFE.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public static void start(String dorisHomeDir, String pidDir, String[] args, Star
}

if (options.enableQeService) {
QeService qeService = new QeService(Config.query_port, Config.flight_sql_query_port,
QeService qeService = new QeService(Config.query_port, Config.arrow_flight_sql_port,
ExecuteEnv.getInstance().getScheduler());
qeService.start();
}
Expand Down Expand Up @@ -232,6 +232,11 @@ private static void checkAllPorts() throws IOException {
"Rpc port", NetUtils.RPC_PORT_SUGGESTION)) {
throw new IOException("port " + Config.rpc_port + " already in use");
}
if (Config.arrow_flight_sql_port != -1
&& !NetUtils.isPortAvailable(FrontendOptions.getLocalHostAddress(), Config.arrow_flight_sql_port,
"Arrow Flight SQL port", NetUtils.ARROW_FLIGHT_SQL_SUGGESTION)) {
throw new IOException("port " + Config.arrow_flight_sql_port + " already in use");
}
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class BackendsProcDir implements ProcDirInterface {
private static final Logger LOG = LogManager.getLogger(BackendsProcDir.class);

public static final ImmutableList<String> TITLE_NAMES = new ImmutableList.Builder<String>().add("BackendId")
.add("Host").add("HeartbeatPort").add("BePort").add("HttpPort").add("BrpcPort").add("ArrowFlightSQLPort")
.add("Host").add("HeartbeatPort").add("BePort").add("HttpPort").add("BrpcPort").add("ArrowFlightSqlPort")
.add("LastStartTime").add("LastHeartbeat").add("Alive").add("SystemDecommissioned").add("TabletNum")
.add("DataUsedCapacity").add("TrashUsedCapcacity").add("AvailCapacity").add("TotalCapacity").add("UsedPct")
.add("MaxDiskUsedPct").add("RemoteUsedCapacity").add("Tag").add("ErrMsg").add("Version").add("Status")
Expand Down Expand Up @@ -107,7 +107,7 @@ public static List<List<String>> getBackendInfos() {
backendInfo.add(String.valueOf(backend.getBePort()));
backendInfo.add(String.valueOf(backend.getHttpPort()));
backendInfo.add(String.valueOf(backend.getBrpcPort()));
backendInfo.add(String.valueOf(backend.getArrowFlightSQLPort()));
backendInfo.add(String.valueOf(backend.getArrowFlightSqlPort()));
backendInfo.add(TimeUtils.longToTimeString(backend.getLastStartTime()));
backendInfo.add(TimeUtils.longToTimeString(backend.getLastUpdateMs()));
backendInfo.add(String.valueOf(backend.isAlive()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class FrontendsProcNode implements ProcNodeInterface {

public static final ImmutableList<String> TITLE_NAMES = new ImmutableList.Builder<String>()
.add("Name").add("Host").add("EditLogPort").add("HttpPort").add("QueryPort").add("RpcPort")
.add("Role").add("IsMaster").add("ClusterId").add("Join").add("Alive")
.add("ArrowFlightSqlPort").add("Role").add("IsMaster").add("ClusterId").add("Join").add("Alive")
.add("ReplayedJournalId").add("LastStartTime").add("LastHeartbeat")
.add("IsHelper").add("ErrMsg").add("Version")
.add("CurrentConnected")
Expand Down Expand Up @@ -119,9 +119,11 @@ public static void getFrontendsInfo(Env env, List<List<String>> infos) {
if (fe.getHost().equals(env.getSelfNode().getHost())) {
info.add(Integer.toString(Config.query_port));
info.add(Integer.toString(Config.rpc_port));
info.add(Integer.toString(Config.arrow_flight_sql_port));
} else {
info.add(Integer.toString(fe.getQueryPort()));
info.add(Integer.toString(fe.getRpcPort()));
info.add(Integer.toString(fe.getArrowFlightSqlPort()));
}

info.add(fe.getRole().name());
Expand Down
Loading

0 comments on commit 141f403

Please sign in to comment.