private boolean recoveryConsumeCtrlConfig(StringBuilder strBuff, ProcessResult result) {
        logger.info("[Recovery Csm Ctrl] begin ");
        Map<String, GroupConsumeCtrlEntity> storedGroupCsmMap =
                (Map<String, GroupConsumeCtrlEntity>) readObjectFromFile(
                        backupAndRecoveryPath, storeFileNameCsmCtrl);
        if (storedGroupCsmMap == null) {
            logger.error(strBuff.append("  read configure file ")
                    .append(backupAndRecoveryPath).append("/")
                    .append(storeFileNameCsmCtrl).append(" failure!").toString());
            strBuff.delete(0, strBuff.length());
            return false;
        }
        logger.info("[Recovery Csm Ctrl] upload consume-control configurations to master");
        if (!writeGroupCsmInfo(storedGroupCsmMap, strBuff, result)) {
            logger.error(strBuff.append("  write consume-control configurations failure!")
                    .append(result.getErrMsg()).toString());
            strBuff.delete(0, strBuff.length());
            return false;
        }
        logger.info("[Recovery Csm Ctrl] read restored consume-control configurations from master");
        Map<String, GroupConsumeCtrlEntity> groupCsmInfoMap = getGroupCsmCtrlInfos(strBuff);
        if (groupCsmInfoMap == null) {
            logger.error("  download consume-control configurations are null!");
            return false;
        }
        logger.info("[Recovery Csm Ctrl] verify configurations");
        if (groupCsmInfoMap.size() != storedGroupCsmMap.size()) {
            logger.error("  verify failure, stored consume-control configurations size not equal!");
            return false;
        }
        for (Map.Entry<String, GroupConsumeCtrlEntity> qryEntry : storedGroupCsmMap.entrySet()) {
            GroupConsumeCtrlEntity targetEntity = groupCsmInfoMap.get(qryEntry.getKey());
            if (targetEntity == null
                    || !targetEntity.isDataEquals(qryEntry.getValue())
                    || !targetEntity.isMatched(qryEntry.getValue())) {
                logger.error(strBuff
                        .append("  verify failure, stored consume-control value not equal!")
                        .append(" data in server is ").append(qryEntry.getValue().toString())
                        .append(", data stored is ").append((targetEntity == null)
                                ? null
                                : targetEntity.toString())
                        .toString());
                strBuff.delete(0, strBuff.length());
                return false;
            }
        }
        logger.info("[Recovery Csm Ctrl] end, success!");
        return true;
    }
Recovery consume control 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