Skip to content

Commit

Permalink
commit content (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoxiaoyi authored Aug 29, 2023
1 parent b4464a4 commit 5ae1887
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public enum Status {
NEED_SAME_ROLE_GROUP(10039,
"All instances of the same service on the same machine need to be within the same role group",
"同一个服务在同一台机器上的所有实例需要在同一个角色组内"),
ODD_NUMBER_ARE_REQUIRED_FOR_DORISFE(10040, "The Number of DorisFE must be an odd number.", "DorisFE个数必须是奇数"),
;

private final int code;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,9 @@ private void serviceValidation(ServiceRoleHostMapping serviceRoleHostMapping) {
if ("ZkServer".equals(serviceRole) && (hosts.size() & 1) == 0) {
throw new ServiceException(Status.ODD_NUMBER_ARE_REQUIRED_FOR_ZKSERVER.getMsg());
}
if ("DorisFE".equals(serviceRole) && (hosts.size() & 1) == 0) {
throw new ServiceException(Status.ODD_NUMBER_ARE_REQUIRED_FOR_DORISFE.getMsg());
}
}

private List<ServiceConfig> listServiceConfigByServiceInstance(
Expand Down

0 comments on commit 5ae1887

Please sign in to comment.