[Enhancement] compatible with old cn (#31747)
Signed-off-by: abc982627271 <liuxuefen@starrocks.com>
This commit is contained in:
parent
ff9980a9dc
commit
63f0c28a25
|
|
@ -41,7 +41,7 @@ namespace starrocks::config {
|
|||
CONF_Int32(cluster_id, "-1");
|
||||
// The port on which ImpalaInternalService is exported.
|
||||
CONF_Int32(be_port, "9060");
|
||||
CONF_Int32(thrift_port, "9060");
|
||||
CONF_Int32(thrift_port, "0");
|
||||
|
||||
// The port for brpc.
|
||||
CONF_Int32(brpc_port, "8060");
|
||||
|
|
|
|||
|
|
@ -152,9 +152,15 @@ void start_be(const std::vector<StorePath>& paths, bool as_cn) {
|
|||
LOG(INFO) << process_name << " start step " << start_step++ << ": block cache init successfully";
|
||||
|
||||
// Start thrift server
|
||||
auto thrift_server = BackendService::create<BackendService>(exec_env, config::be_port);
|
||||
int thrift_port = config::be_port;
|
||||
if (as_cn && config::thrift_port != 0) {
|
||||
thrift_port = config::thrift_port;
|
||||
LOG(WARNING) << "'thrift_port' is deprecated, please update be.conf to use 'be_port' instead!";
|
||||
}
|
||||
auto thrift_server = BackendService::create<BackendService>(exec_env, thrift_port);
|
||||
|
||||
if (auto status = thrift_server->start(); !status.ok()) {
|
||||
LOG(ERROR) << "Fail to start BackendService thrift server on port " << config::be_port << ": " << status;
|
||||
LOG(ERROR) << "Fail to start BackendService thrift server on port " << thrift_port << ": " << status;
|
||||
shutdown_logging();
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
sys_log_level = INFO
|
||||
|
||||
# ports for admin, web, heartbeat service
|
||||
thrift_port = 9060
|
||||
be_port = 9060
|
||||
be_http_port = 8040
|
||||
heartbeat_service_port = 9050
|
||||
brpc_port = 8060
|
||||
|
|
|
|||
Loading…
Reference in New Issue