private boolean recoveryClusterConfig(StringBuilder strBuff, ProcessResult result) {
        logger.info("[Recovery Cluster Conf] begin ");
        Map<String, ClusterSettingEntity> storedSettingMap =
                (Map<String, ClusterSettingEntity>) readObjectFromFile(
                        backupAndRecoveryPath, storeFileNameClusterConf);
        if (storedSettingMap == null) {
            logger.error(strBuff.append("  read configure file ")
                    .append(backupAndRecoveryPath).append("/")
                    .append(storeFileNameClusterConf).append(" failure!").toString());
            strBuff.delete(0, strBuff.length());
            return false;
        }
        logger.info("[Recovery Cluster Conf] upload cluster configurations to master");
        if (!writeClusterConfInfo(storedSettingMap, strBuff, result)) {
            logger.error(strBuff.append("  write cluster configurations failure!")
                    .append(result.getErrMsg()).toString());
            strBuff.delete(0, strBuff.length());
            return false;
        }
        logger.info("[Recovery Cluster Conf] read restored cluster configurations from master");
        Map<String, ClusterSettingEntity> clusterSettingMap = getClusterConfInfo(strBuff);
        if (clusterSettingMap == null) {
            logger.error("  read restored cluster setting configurations failure!");
            return false;
        }
        logger.info("[Recovery Cluster Conf] verify configurations");
        if (storedSettingMap.size() != clusterSettingMap.size()) {
            logger.error("  verify failure, restored cluster configure size not equal!");
            return false;
        }
        for (Map.Entry<String, ClusterSettingEntity> qryEntry : storedSettingMap.entrySet()) {
            ClusterSettingEntity targetEntity = clusterSettingMap.get(qryEntry.getKey());
            if (targetEntity == null || !targetEntity.isDataEquals(qryEntry.getValue())) {
                logger.error(strBuff
                        .append("  verify failure, stored cluster configure value not equal!")
                        .append(" data in server is ").append(qryEntry.getValue().toString())
                        .append(", data stored is ").append((targetEntity == null)
                                ? null
                                : targetEntity.toString())
                        .toString());
                return false;
            }
        }
        logger.info("[Recovery Cluster Conf] end, success!");
        return true;
    }
Recovery Cluster configurations

@param strBuff  the string buffer
@param result   the process result
@return         true for success, false for failure
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/tools/cli/CliMetaDataBRU.java