private boolean recoveryBrokerConfig(StringBuilder strBuff, ProcessResult result) {
        logger.info("[Recovery Broker Conf] begin ");
        Map<String, BrokerConfEntity> storedBrokerConfigMap =
                (Map<String, BrokerConfEntity>) readObjectFromFile(
                        backupAndRecoveryPath, storeFileNameBrokerConf);
        if (storedBrokerConfigMap == null) {
            logger.error(strBuff.append("  read configure file ")
                    .append(backupAndRecoveryPath).append("/")
                    .append(storeFileNameBrokerConf).append(" failure!").toString());
            strBuff.delete(0, strBuff.length());
            return false;
        }
        logger.info("[Recovery Broker Conf]  upload broker configurations to master");
        if (!writeBrokerConfInfo(storedBrokerConfigMap, strBuff, result)) {
            logger.error(strBuff.append("  write broker configurations failure!")
                    .append(result.getErrMsg()).toString());
            strBuff.delete(0, strBuff.length());
            return false;
        }
        logger.info("[Recovery Broker Conf] read restored broker configurations from master");
        Map<String, BrokerConfEntity> brokerConfMap = getBrokerConfInfos(strBuff);
        if (brokerConfMap == null) {
            logger.error("  read restored broker configurations failure!");
            return false;
        }
        logger.info("[Recovery Broker Conf] verify configurations");
        if (brokerConfMap.size() != storedBrokerConfigMap.size()) {
            logger.error("  verify failure, restored brokerConfig size not equal!");
            return false;
        }
        for (Map.Entry<String, BrokerConfEntity> qryEntry : storedBrokerConfigMap.entrySet()) {
            BrokerConfEntity targetEntity = brokerConfMap.get(qryEntry.getKey());
            if (targetEntity == null || !targetEntity.isDataEquals(qryEntry.getValue())) {
                logger.error(strBuff
                        .append("  verify failure, stored brokerConfig 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 Broker Conf] end, success!");
        return true;
    }
Recovery broker 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