morningman commented on code in PR #16789:
URL: https://github.com/apache/doris/pull/16789#discussion_r1107913745
##########
fe/fe-core/src/main/java/org/apache/doris/deploy/DeployManager.java:
##########
@@ -77,45 +77,39 @@
*
* Environment variables:
*
- * FE_EXIST_ENTPOINT:
+ * FE_EXIST_ENDPOINT:
* he existing FE(Master + Follower) before the new FE start up.
* The main reason of this var is to indicate whether there is already an
alive Master
* or the consensus of who is master is needed.
*
* FE_INIT_NUMBER:
* Number of newly start up FE(Master + Follower), can only be 1 or 3.
*
- * Only one of FE_EXIST_ENTPOINT and FE_INIT_NUMBER need to be set.
+ * Only one of FE_EXIST_ENDPOINT and FE_INIT_NUMBER need to be set.
*
* eg:
*
* 1. Start 1 FE as a single Master
- * set FE_EXIST_ENTPOINT as empty
+ * set FE_EXIST_ENDPOINT as empty
* set FE_INIT_NUMBER = 1
*
* 2. Start 3 FE(Master + Follower)
- * set FE_EXIST_ENTPOINT as empty
+ * set FE_EXIST_ENDPOINT as empty
* set FE_INIT_NUMBER = 3
*
* 3. With 1 existing FE(Master), add 2 FEs to reach HA.
- * set FE_EXIST_ENTPOINT=existing_fe_host:edit_log_port
+ * set FE_EXIST_ENDPOINT=existing_fe_host:edit_log_port
* set FE_INIT_NUMBER as empty
*
*/
public class DeployManager extends MasterDaemon {
private static final Logger LOG =
LogManager.getLogger(DeployManager.class);
- // We misspelled the environment value ENV_FE_EXIST_ENT(D)POINT. But for
forward compatibility,
- // we have to keep this misspelling for a while.
- // TODO(cmy): remove it later
- @Deprecated
- public static final String ENV_FE_EXIST_ENTPOINT = "FE_EXIST_ENTPOINT";
-
public static final String ENV_FE_EXIST_ENDPOINT = "FE_EXIST_ENDPOINT";
public static final String ENV_FE_INIT_NUMBER = "FE_INIT_NUMBER";
public enum NodeType {
- ELECTABLE, OBSERVER, BACKEND, BROKER
+ ELECTABLE, OBSERVER, BACKEND, BROKER, CN
Review Comment:
```suggestion
ELECTABLE, OBSERVER, BACKEND, BROKER, BACKEND_CN
```
##########
fe/fe-core/src/main/java/org/apache/doris/deploy/DeployManager.java:
##########
@@ -148,38 +146,51 @@ public DeployManager(Env env, long intervalMs) {
// Derived Class can override this method to init more private env
variables,
// but must class the parent's init at first.
protected void initEnvVariables(String envElectableFeServiceGroup, String
envObserverFeServiceGroup,
- String envBackendServiceGroup, String envBrokerServiceGroup) {
+ String envBackendServiceGroup, String envBrokerServiceGroup,
String envCnServiceGroup) {
this.electableFeServiceGroup =
Strings.nullToEmpty(System.getenv(envElectableFeServiceGroup));
this.observerFeServiceGroup =
Strings.nullToEmpty(System.getenv(envObserverFeServiceGroup));
this.backendServiceGroup =
Strings.nullToEmpty(System.getenv(envBackendServiceGroup));
this.brokerServiceGroup =
Strings.nullToEmpty(System.getenv(envBrokerServiceGroup));
+ this.cnServiceGroup =
Strings.nullToEmpty(System.getenv(envCnServiceGroup));
- LOG.info("get deploy env: {}, {}, {}, {}", envElectableFeServiceGroup,
envObserverFeServiceGroup,
- envBackendServiceGroup, envBrokerServiceGroup);
+ LOG.info("get deploy env: {}, {}, {}, {}, {}",
envElectableFeServiceGroup, envObserverFeServiceGroup,
+ envBackendServiceGroup, envBrokerServiceGroup,
envCnServiceGroup);
- // electableFeServiceGroup and backendServiceGroup must exist
- if (Strings.isNullOrEmpty(electableFeServiceGroup) ||
Strings.isNullOrEmpty(backendServiceGroup)) {
- LOG.warn("failed to init service group name."
- + " electableFeServiceGroup: {}, backendServiceGroup: {}",
- electableFeServiceGroup, backendServiceGroup);
- System.exit(-1);
Review Comment:
I don't remember why we exit if service group does not exist.
But are you sure it is OK to remove it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]