distributed-deploy: update the english logs

Signed-off-by: zeoio <kinsleer@outlook.com>
This commit is contained in:
何跃江 2020-04-29 06:43:31 +08:00 committed by zeoio
parent 9ff3d3bdc2
commit 96327c7723
15 changed files with 68 additions and 68 deletions

View file

@ -108,7 +108,7 @@ public class InstallController {
osEnum = OSEnum.valueOf(osType);
} catch (Exception e) {
// log.error("解析系统类型异常", e);
log.error("Parsing system type exception", e);
log.error("Parsing os type exception", e);
e.printStackTrace();
}
if (osEnum == null) {
@ -116,7 +116,7 @@ public class InstallController {
downloadResponse.setCode(ResponseCode.Fail);
// downloadResponse.setMsg("不支持指定的系统类型: " + osType);
downloadResponse.setMsg("Slave node system type error: " + osType);
downloadResponse.setMsg("Unsupport the os type : " + osType);
setErrorResult(response, downloadResponse);
return;
}
@ -128,7 +128,7 @@ public class InstallController {
if (StringUtils.isEmpty(filePath)) {
downloadResponse.setCode(ResponseCode.Fail);
// downloadResponse.setMsg("打包安装文件失败");
downloadResponse.setMsg("Package installation file failed");
downloadResponse.setMsg("Fail to package exception");
setErrorResult(response, downloadResponse);
return;
}
@ -152,27 +152,27 @@ public class InstallController {
// 修改服务器对应的状态
// log.info(String.format("设置从节点 %s 状态为下载完成", remoteAddr));
log.info(String.format("Set slave node %s status to download complete", remoteAddr));
log.info(String.format("slave node %s download complete", remoteAddr));
this.rolesBiz.setServerStatus(remoteAddr, InstallStatusEnum.DOWNLOADED);
} catch (FileNotFoundException e) {
// log.error("下载文件不存在", e);
log.error("The download file does not exist", e);
log.error("File Not Exist Exception", e);
e.printStackTrace();
downloadResponse.setCode(ResponseCode.Fail);
// downloadResponse.setMsg("下载文件不存在");
downloadResponse.setMsg("The download file does not exist");
downloadResponse.setMsg("File Not Exist Exception");
setErrorResult(response, downloadResponse);
} catch (IOException e) {
// log.error("获取HttpServletResponse输出流发生异常", e);
log.error("Get HttpServletResponse output stream exception", e);
log.error("Writting HttpServletResponse IO exception", e);
e.printStackTrace();
downloadResponse.setCode(ResponseCode.Fail);
// downloadResponse.setMsg("获取HttpServletResponse输出流发生异常");
downloadResponse.setMsg("Get HttpServletResponse output stream exception");
downloadResponse.setMsg("Writting HttpServletResponse IO exception");
setErrorResult(response, downloadResponse);
} finally {
@ -186,7 +186,7 @@ public class InstallController {
@InvokeLog(name = "pushInstallPackage", description = "推送安装文件")
public HttpInstallResponse pushInstallPackage(HttpServletRequest request) {
// log.info("准备接收主节点推送的安装包");
log.info("Prepare to receive the installation package pushed by the master node");
log.info("Prepare to receive the package from the master node");
this.installBiz.setMasterServer("http://" + request.getRemoteAddr() + ":8080");
@ -199,7 +199,7 @@ public class InstallController {
this.installBiz.installPackageReady();
} catch (Exception e) {
// log.error("接收安装包异常", e);
log.error("Abnormal reception of installation package", e);
log.error("Exception when receive the package and Abort!", e);
response.setCode(ResponseCode.Fail.getCode());
e.printStackTrace();
}

View file

@ -56,7 +56,7 @@ public class RegisterController {
String remoteAddr = request.getRemoteAddr();
// log.info(String.format("从节点 %s 开始注册", remoteAddr));
log.info(String.format("Slave node %s starts registration", remoteAddr));
log.info(String.format("Slave node %s starts to regist", remoteAddr));
roleService.addServerRole(remoteAddr, roleRegEntity.getServerPort(),null);

View file

@ -70,16 +70,16 @@ public class InitializeBiz {
if (!initConfigService.isCorrectConfig(configEntity)) {
// log.error("配置文件中相关配置项出错或为空");
log.error("The relevant configuration items in the configuration file are wrong or empty");
log.error("The configuration file is not valid and the value cannot be null");
response.setCode(ResponseCode.Fail);
// response.setMsg("配置文件中相关配置项出错或为空");
response.setMsg("The relevant configuration items in the configuration file are wrong or empty");
response.setMsg("The configuration file is not valid and the value cannot be null");
return response;
}
configFileGen.createConfigFile(configEntity);
} catch (FileNotFoundException fe) {
// log.error("文件不存在异常", fe);
log.error("Exception file does not exist", fe);
log.error("File Not Exist Exception", fe);
response.setCode(ResponseCode.Fail);
fe.printStackTrace();
} catch (Exception e) {

View file

@ -171,7 +171,7 @@ public class InstallBiz {
return !this.checkPointDb.nodesTableEmpty();
} catch (SQLException e) {
// log.error("查询本地数据库失败", e);
log.error("Query local database failed", e);
log.error("Fail to query the local database", e);
e.printStackTrace();
}
@ -186,7 +186,7 @@ public class InstallBiz {
public void slaveInstall(RoleEnum role, List<String> ports, Map<String, String> hosts, String roleFolderName) {
new Thread(() -> {
// log.info(String.format("从节点开始进行角色 %s 的安装", role.name()));
log.info(String.format("The slave node starts the installation of role %s", role.name()));
log.info(String.format("Begin to install the role %s in the slave node", role.name()));
if (this.startInstall(role, ports, hosts, roleFolderName)) {
InstallResult result = new InstallResult();
result.setRole(role);
@ -198,12 +198,12 @@ public class InstallBiz {
HttpInstallResponse response = JSONObject.parseObject(res, HttpInstallResponse.class);
if (ResponseCode.SUCCESS.getCode().equals(response.getCode())) {
// log.info(String.format("向主节点报告安装 %s 状态成功", role.name()));
log.info(String.format("Report successful installation %s status to the master node", role.name()));
log.info(String.format("Report install1 %s success to the master node", role.name()));
break;
}
}
// log.info(String.format("向主节点报告安装 %s 状态失败,稍后重试...", role.name()));
log.info(String.format("Report failed installation %s status to the master node, try again later ...", role.name()));
log.info(String.format("Fail to report the status of %s to the master node, try again later ...", role.name()));
try {
Thread.sleep(5000);
} catch (Exception e) {
@ -213,7 +213,7 @@ public class InstallBiz {
} while (true);
} catch (Exception e) {
// log.error("向主服务器发送安装完成状态异常", e);
log.error("Send abnormal installation completion status to the main server", e);
log.error("Exception occur when send status to the main server after install complete", e);
e.printStackTrace();
}
}
@ -262,7 +262,7 @@ public class InstallBiz {
}
} catch (Exception e) {
// log.error(String.format("更新 docker 容器 %s 的 HostsPath 异常", currentOrdererName), e);
log.error(String.format("Update HostsPath exception of docker container %s", currentOrdererName), e);
log.error(String.format("Exception occur when update HostsPath of docker container %s", currentOrdererName), e);
e.printStackTrace();
}
}

View file

@ -99,7 +99,7 @@ public class NewInstallBiz implements InstallMode {
// 修改自己的状态
// log.info("主节点修改安装状态");
log.info("Master node to modify the installation status");
log.info("Modify the master node status");
for (String ip : allMyIps) {
this.rolesBiz.setServerStatus(ip, InstallStatusEnum.DOWNLOADED);
}
@ -184,7 +184,7 @@ public class NewInstallBiz implements InstallMode {
private boolean createFabricGenesis(InitConfigEntity configEntity) {
// log.info("开始 fabric 创世");
log.info("Start fabric create genesis");
log.info("begin to create the genesis block");
String fabricDir = modeService.getInstallPath() + "channel-artifacts" + File.separator;
FileUtil.makeFilePath(fabricDir, true);
@ -198,15 +198,15 @@ public class NewInstallBiz implements InstallMode {
ProcessUtil.Result res = ProcessUtil.execCmd(cmd, null, modeService.getInstallPath());
if (res.getCode() == 0) {
// log.info("创世成功");
log.info("Genesis block creation succeeded");
log.info("Genesis block create success");
return true;
} else {
// log.warn("创世失败");
log.warn("Genesis block creation failed");
log.warn("Genesis block create failed");
}
} catch (Exception e) {
// log.error("生成创世块异常", e);
log.error("Genesis block creation abnormal", e);
log.error("Exception occur when the Genesis block create ", e);
e.printStackTrace();
}

View file

@ -98,13 +98,13 @@ public class OrdererExtendBiz {
configFileGen.createExtendCerts();
} catch (Exception e) {
// log.error("为新增的 orderer 节点生成证书异常", e);
log.error("Generate certificate exception for newly added orderer node", e);
log.error("Exception when generate certificate for new orderer node", e);
e.printStackTrace();
return;
}
// log.info("为新增 orderer 生成 docker 相关文件");
log.info("Generate docker related files for new orderer");
log.info("Generate docker files for new orderer");
// 生成 docker-compose-order-xxxx.yaml start-order.sh 文件
Map<String, String> filePathMap = new HashMap<>(16);
@ -140,19 +140,19 @@ public class OrdererExtendBiz {
}
// log.info("修改所有其他 orderer 节点配置");
log.info("Modify all other orderer node configurations");
log.info("Modify configurations in all other orderer node ");
// 修改所有其他 orderer 节点配置并重启
updateOldOrdererContainers(newOrdererHostConfig, configEntity);
// 收集所有节点加入的通道
// log.info("获取所有节点加入的通道列表");
log.info("Get a list of channels added by all nodes");
log.info("Get the channels list by all nodes");
Set<String> channelList = new HashSet<>();
try {
channelList.addAll(fabricCliService.getAllChannels(configEntity));
} catch (IOException e) {
// log.error("获取节点加入的所有通道异常", e);
log.error("Get all the channels that the node joins are abnormal", e);
log.error("Exception occur when get the channels list", e);
e.printStackTrace();
}
@ -179,7 +179,7 @@ public class OrdererExtendBiz {
if (!CollectionUtils.isEmpty(channelList)) {
for (String channelName : channelList) {
// log.info(String.format("将新加入的 orderer(s) 加入 %s 通道", channelName));
log.info(String.format("Add the newly added orderer(s) to the %s channel", channelName));
log.info(String.format("Add the new orderer(s) to the %s channel", channelName));
if (!updateService.updateNetworkConfig(channelName, configEntity, oldOrdererConfig)) {
// log.error(String.format("为通道 %s 更新网络配置失败", channelName));
log.error(String.format("Failed to update network configuration for channel %s", channelName));
@ -192,11 +192,11 @@ public class OrdererExtendBiz {
log.info("Get the latest genesis block");
if (!fabricCliService.fetchGenesisBlock(configEntity)) {
// log.error("获取创世块发生错误");
log.error("Error getting genesis block");
log.error("Error occur when fetch genesis block");
}
// log.info("注册 orderer 节点角色");
log.info("Register orderer node role");
log.info("Register the orderer role");
List<String> ports = new ArrayList<>();
for (String ip : orderGroups.keySet()) {
List<String> hostList = orderGroups.get(ip);
@ -217,12 +217,12 @@ public class OrdererExtendBiz {
this.rolesBiz.setServerStatus(ip, InstallStatusEnum.DOWNLOADED);
} else {
// log.info("为新增 orderer 打包安装包");
log.info("Package installation package for new orderer");
log.info("Package for new orderer");
String packFilePath = fileService.packExtendNodeFiles(ip, folderName, RoleEnum.ORDER, configEntity);
// 发送到节点启动
// log.info("将生成的文件包发送到新增 orderer 节点");
log.info("Send the generated file package to the newly added orderer node");
log.info("Send the package to the new orderer node");
remoteService.pushSlaveInstallPackage(ip, packFilePath, configEntity);
}
}
@ -233,7 +233,7 @@ public class OrdererExtendBiz {
List<ServerEntity> serverList = this.rolesBiz.getRolesMap().get(RoleEnum.ORDER);
for (String ip : filePathMap.keySet()) {
// log.info(String.format("发送安装命令到新增 orderer 节点 %s", ip));
log.info(String.format("Send installation command to newly added orderer node %s", ip));
log.info(String.format("Send installation command to new orderer node %s", ip));
String path = filePathMap.get(ip);
@ -373,7 +373,7 @@ public class OrdererExtendBiz {
}
}
// log.error(String.format("发送更新 orderer 指令到节点 %s 返回错误, 稍后重试", ip));
log.error(String.format("An error was returned when sending the update orderer command to node %s, try again later", ip));
log.error(String.format("Receive error from node %s when command to update, try again later", ip));
try {
Thread.sleep(3000);
} catch (InterruptedException e) {

View file

@ -77,18 +77,18 @@ public class OrdererRemoveBiz {
// 收集所有节点加入的通道
// log.info("获取所有节点加入的通道列表");
log.info("Get channel list belongs to all joined nodes");
log.info("Get channel list info");
Set<String> channelList = new HashSet<>();
try {
channelList.addAll(fabricCliService.getAllChannels(configEntity));
} catch (IOException e) {
// log.error("获取节点加入的所有通道异常", e);
log.error("Abnormal error when getting the channel list belonging to all the joined nodes", e);
log.error("Exception occur when get channel list info", e);
e.printStackTrace();
}
// log.info("缩容orderer-获取的通道列表:" + JSON.toJSONString(channelList));
// log.info("修改网络配置");
log.info("Reduce orderer - Obtained channel list" + JSON.toJSONString(channelList));
log.info("scale down orderer - Obtained channel list" + JSON.toJSONString(channelList));
log.info("Modify network configuration");
Map<String, String> oldOrdererConfig = configEntity.getOrdererHostConfig();
@ -96,11 +96,11 @@ public class OrdererRemoveBiz {
for (String host : removedOrdererHostConfig.keySet()) {
// log.info("缩容orderer-oldOrdererConfig=" + JSON.toJSONString(oldOrdererConfig));
log.info("Reduce orderer-oldOrdererConfig=" + JSON.toJSONString(oldOrdererConfig));
log.info("scale down orderer-oldOrdererConfig=" + JSON.toJSONString(oldOrdererConfig));
oldOrdererConfig.remove(host);
// 修改网络配置
// log.info("将移除的 orderer(s) 从系统通道中移除");
log.info("Remove the stopped orderer(s) from the system channel");
log.info("stop the orderer(s) and remove from the system channel");
// 先修改系统通道
if (!updateService.updateNetworkConfig(configEntity.getNetwork() + "-sys-channel", configEntity, oldOrdererConfig)) {
// log.error(String.format("为系统通道 %s 更新网络配置失败", configEntity.getNetwork() + "-sys-channel"));
@ -110,7 +110,7 @@ public class OrdererRemoveBiz {
channelList.remove(configEntity.getNetwork() + "-sys-channel");
for (String channelName : channelList) {
// log.info(String.format("将移除的 orderer(s) 从通道 %s 中移除", channelName));
log.info(String.format("Remove the removed orderer(s) from channel %s", channelName));
log.info(String.format("Remove the orderer(s) from channel %s", channelName));
if (!updateService.updateNetworkConfig(channelName, configEntity, oldOrdererConfig)) {
// log.error(String.format("为通道 %s 更新网络配置失败", channelName));
log.error(String.format("Failed to update network configuration for channel %s", channelName));
@ -125,7 +125,7 @@ public class OrdererRemoveBiz {
log.info("Remove orderer(s) node");
removeOrdererContainer(removedOrdererHostConfig, configEntity);
// log.info("将已移除的 orderer(s) 节点从数据库中删除");
log.info("Remove the removed orderer(s) node from the database");
log.info("Remove the orderer(s) node from the database");
// 从数据库中删除
for (String host : removedOrdererHostConfig.keySet()) {
String ip = removedOrdererHostConfig.get(host);

View file

@ -94,7 +94,7 @@ public class PeerExtendBiz {
Map<String, String> ipPathMap = this.createNewPeerDockerFile(configEntity, peerHostGroup);
//将新生成的证书拷贝到主节点安装目录
// log.info("将新生成的证书拷贝到主节点安装目录");
log.info("Copy the newly generated certificate to the master node installation directory");
log.info("Copy the new-generated certificate to the master node installation directory");
fileService.masterCopyCryptoConfig();
// log.info("注册新Peer节点角色");
log.info("Register a new Peer node role");
@ -196,13 +196,13 @@ public class PeerExtendBiz {
this.rolesBiz.setServerStatus(ip, InstallStatusEnum.DOWNLOADED);
} else {
// log.info("为新增 peer 打包安装包");
log.info("Package the installation package for the newly added peer node");
log.info("Package for the new peer node");
String packFilePath = fileService.packExtendNodeFiles(ip, folderName, RoleEnum.PEER, configEntity);
// 发送到节点启动
// log.info("将生成的文件包发送到新增 peer 节点");
log.info("Send the generated file package to the newly added peer node");
log.info("Send the package to the new peer node");
remoteService.pushSlaveInstallPackage(ip, packFilePath, configEntity);
}
}
@ -212,7 +212,7 @@ public class PeerExtendBiz {
List<ServerEntity> serverList = this.rolesBiz.getRolesMap().get(RoleEnum.PEER);
for (String ip : ipPathMap.keySet()) {
// log.info(String.format("发送安装命令到新增 peer 节点 %s", ip));
log.info(String.format("Send installation command to the newly added peer node %s", ip));
log.info(String.format("Send installation command to the new peer node %s", ip));
String path = ipPathMap.get(ip);
@ -232,7 +232,7 @@ public class PeerExtendBiz {
HttpInstallResponse response = remoteService.sendInstallCommand(server, RoleEnum.PEER, folderName, configEntity);
if (ResponseCode.SUCCESS.getCode().equals(response.getCode())) {
// log.warn(String.format("发送安装指令给 %s 节点安装 peer 成功", ip));
log.warn(String.format("Send installation instructions to %s, successful installation of peer node", ip));
log.warn(String.format("Send installation instructions to %s node to install peer successfully", ip));
this.rolesBiz.setServerStatus(ip, InstallStatusEnum.INSTALLING);
break;
}

View file

@ -136,7 +136,7 @@ public class FabricCliService {
}
} catch (Exception e) {
// log.error("执行 docker 脚步获取通道异常", e);
log.error("An exception occurred while executing docker steps to get the channel", e);
log.error("An exception occurred while executing script to get the channel", e);
e.printStackTrace();
}
}
@ -161,12 +161,12 @@ public class FabricCliService {
try {
if (!this.createCliYamlFile(destFilePath, initConfigEntity)) {
// log.error("创建cli容器相关文件失败");
log.error("Failed to create files related to cli container");
log.error("Failed to create the cli container");
return false;
}
} catch (IOException e) {
// log.error("创建cli容器相关文件异常", e);
log.error("An exception occurred while creating the cli container related file", e);
log.error("An exception occurred while creating the cli container ", e);
e.printStackTrace();
return false;
@ -176,7 +176,7 @@ public class FabricCliService {
ProcessUtil.Result result = ProcessUtil.execCmd("bash " + destFilePath + "start-peer.sh startCli", null, destFilePath);
if (result.getCode() == 0) {
// log.info("启动 cli 容器成功");
log.info("Successfully started cli container");
log.info("Started cli container successfully");
return true;
}
} catch (Exception e) {

View file

@ -297,7 +297,7 @@ public class FileService {
break;
}
// log.info(String.format("为新 %s 节点 %s 准备智能安装包", role, serverAddress));
log.info(String.format("Prepare smart installation package for new %s node %s", role, serverAddress));
log.info(String.format("Prepare the package to install the smart contracts for new %s node %s", role, serverAddress));
// 建一个临时目录
String tmpPath = System.getProperty("java.io.tmpdir");
@ -325,7 +325,7 @@ public class FileService {
return packFilePath;
} catch (IOException e) {
// log.error("生成智能安装包时异常", e);
log.error("Exception when generating smart installation package", e);
log.error("Exception when generating the package for the smart contracts ", e);
e.printStackTrace();
}
@ -361,7 +361,7 @@ public class FileService {
}
}
// log.info("缩容节点,移除证书路径:" + rmPath);
log.info("Reduce nodes, remove certificate path: " + rmPath);
log.info("scale down nodes, remove certificate path: " + rmPath);
FileUtil.rmFile(new File(rmPath));
}
}

View file

@ -54,7 +54,7 @@ public class InitConfigService {
initConfigEntity = yaml.loadAs(new FileInputStream(file), InitConfigEntity.class);
} catch (Exception e) {
// log.error("配置文件读取异常,请检查各配置项是否符合格式要求");
log.error("An exception occurred while reading the configuration file, please check whether each configuration item meets the format requirements");
log.error("An exception occurred while reading the configuration , please check whether each configuration item meets the format requirements");
}
return initConfigEntity;
}
@ -64,23 +64,23 @@ public class InitConfigService {
if (!isNotEmptyConfig(initConfigEntity)) {
// log.error("配置文件中相关配置项为空");
log.error("The relevant configuration items in the configuration file are empty");
log.error("The value in the configuration cannot be null");
isCorrect = false;
}
if (!isCorrectFormat(initConfigEntity)) {
// log.error("配置文件中相关域名的ip和端口格式不正确");
log.error("The ip and port formats of related domain names in the configuration file are incorrect");
log.error("The ip port and domain names is not valid");
isCorrect = false;
}
if (!isCorrectDomain(initConfigEntity)) {
// log.error("配置文件中orderer或peer的域名不匹配");
log.error("The orderer or peer domain names in the configuration file do not match");
log.error("The orderer or peer domain names is not matched");
isCorrect = false;
}
if (!checkPeerConfig(initConfigEntity)) {
// log.error("配置文件中peer没有配置相应的交易查询端口");
log.error("The peer does not configure the relevant transaction query interface in the configuration file");
log.error("No transaction query port about peer in the configuration ");
isCorrect = false;
}

View file

@ -105,7 +105,7 @@ public class InstallService {
break;
}
// log.warn(String.format("发送安装指令给 %s 节点安装 %s 失败,稍后重试...", server.getHost(), role.name().toLowerCase()));
log.warn(String.format("Sending installation instructions to %s node failed to install %s, try again later...", server.getHost(), role.name().toLowerCase()));
log.warn(String.format("Failed to sending installation instructions to %s node to install %s, try again later...", server.getHost(), role.name().toLowerCase()));
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
@ -200,7 +200,7 @@ public class InstallService {
}
if (result.isSuccess()) {
// log.info(String.format("节点 %s 已完成 %s 角色的安装", remoteAddress, result.getRole().name()));
log.info(String.format("Node %s has completed the installation of %s roles", remoteAddress, result.getRole().name()));
log.info(String.format("Node %s has intalled complete %s roles", remoteAddress, result.getRole().name()));
// 加入数据库
switch (result.getRole()) {

View file

@ -100,7 +100,7 @@ public class ModeService {
}
if (result.isSuccess()) {
// log.info(String.format("节点 %s 已完成 %s 角色的安装", remoteAddress, result.getRole().name()));
log.info(String.format("Node %s has completed the installation of role %s", remoteAddress, result.getRole().name()));
log.info(String.format("Node %s has installde complete role %s", remoteAddress, result.getRole().name()));
// 加入数据库
switch (result.getRole()) {

View file

@ -63,7 +63,7 @@ public class RemoteService {
*/
public HttpInstallResponse sendInstallCommand(ServerEntity server, RoleEnum role, String folderName, InitConfigEntity configEntity) {
// log.info(String.format("主节点给从节点 %s 发送安装角色:%s", server.getHost(), role.name()));
log.info(String.format("The master node sends the installation role %s to slave node %s", role.name(), server.getHost()));
log.info(String.format("The master node sends the comm1 to install role %s to slave node %s", role.name(), server.getHost()));
try {
Map<String, String> revisedHosts = new HashMap<>();
Map<String, String> hosts = environmentService.getRoleNeedSetHost(role, configEntity);
@ -86,10 +86,10 @@ public class RemoteService {
String result = this.httpClient.sendFileAndJson(server.getHttpUrl() + "/v1/install/start", "", JSONObject.toJSONString(entity));
if (result.isEmpty()) {
// log.error("注册角色返回结果为空");
log.error("The result value returned when registering a role is empty");
log.error("Receive the result is null after registering a role");
} else {
// log.info("注册角色返回结果: " + result);
log.info("The value returned when registering a role is: " + result);
log.info("The value received when registering a role is: " + result);
return JSON.parseObject(result, HttpInstallResponse.class);
}
} catch (Exception e) {

View file

@ -75,7 +75,7 @@ public class RoleService {
this.parseRole(roles, slaveAddress, configEntity.getOrdererHostConfig(), RoleEnum.ORDER, configEntity);
this.parseRole(roles, slaveAddress, configEntity.getPeerHostConfig(), RoleEnum.PEER, configEntity);
// log.info(String.format("服务器 %s 解析后,所承担的角色有: ", slaveAddress, roles.keySet().stream().map(Enum::name).collect(Collectors.joining(","))));
log.info(String.format("After parsing by server %s, the assumed roles are: ", slaveAddress, roles.keySet().stream().map(Enum::name).collect(Collectors.joining(","))));
log.info(String.format("Parsed by server %s, the roles are: ", slaveAddress, roles.keySet().stream().map(Enum::name).collect(Collectors.joining(","))));
return roles;
}