private boolean writeTopicDeployInfo(Map<String, TopicDeployEntity> topicDeployMap,
            StringBuilder strBuff, ProcessResult result) {
        if (topicDeployMap.isEmpty()) {
            return true;
        }
        int count = 0;
        Map<String, String> inParamMap = new HashMap<>();
        Map<String, TopicDeployEntity> sysTopicDeployMap = new HashMap<>();
        for (TopicDeployEntity entity : topicDeployMap.values()) {
            if (entity.getTopicName().equals(TServerConstants.OFFSET_HISTORY_NAME)) {
                sysTopicDeployMap.put(entity.getRecordKey(), entity);
                continue;
            }
            if (count++ > 0) {
                strBuff.append(",");
            }
            // build topic deploy configurations in json format
            entity.toWebJsonStr(strBuff, true, true);
            if (strBuff.length() > maxDataLength
                    || count % TServerConstants.CFG_BATCH_BROKER_OPERATE_MAX_COUNT == 0) {
                inParamMap.put("topicJsonSet", "[" + strBuff.toString() + "]");
                strBuff.delete(0, strBuff.length());
                inParamMap.put("createUser", curOperator);
                inParamMap.put("modifyUser", curOperator);
                if (!writeDataToMaster("admin_bath_add_topic_deploy_info",
                        authToken, inParamMap, strBuff, result)) {
                    return false;
                }
                count = 0;
                inParamMap.clear();
                strBuff.delete(0, strBuff.length());
            }
        }
        if (strBuff.length() > 0) {
            inParamMap.put("topicJsonSet", "[" + strBuff.toString() + "]");
            strBuff.delete(0, strBuff.length());
            inParamMap.put("createUser", curOperator);
            inParamMap.put("modifyUser", curOperator);
            if (!writeDataToMaster("admin_bath_add_topic_deploy_info",
                    authToken, inParamMap, strBuff, result)) {
                return false;
            }
            strBuff.delete(0, strBuff.length());
        }
        // update system topic deploy information
        count = 0;
        inParamMap.clear();
        for (TopicDeployEntity entity : sysTopicDeployMap.values()) {
            if (count++ > 0) {
                strBuff.append(",");
            }
            // build topic deploy configurations in json format
            entity.toWebJsonStr(strBuff, true, true);
            if (strBuff.length() > maxDataLength
                    || count % TServerConstants.CFG_BATCH_BROKER_OPERATE_MAX_COUNT == 0) {
                inParamMap.put("topicJsonSet", "[" + strBuff.toString() + "]");
                strBuff.delete(0, strBuff.length());
                inParamMap.put("createUser", curOperator);
                inParamMap.put("modifyUser", curOperator);
                if (!writeDataToMaster("admin_batch_update_topic_deploy_info",
                        authToken, inParamMap, strBuff, result)) {
                    return false;
                }
                count = 0;
                inParamMap.clear();
                strBuff.delete(0, strBuff.length());
            }
        }
        if (strBuff.length() > 0) {
            inParamMap.put("topicJsonSet", "[" + strBuff.toString() + "]");
            strBuff.delete(0, strBuff.length());
            inParamMap.put("createUser", curOperator);
            inParamMap.put("modifyUser", curOperator);
            if (!writeDataToMaster("admin_batch_update_topic_deploy_info",
                    authToken, inParamMap, strBuff, result)) {
                return false;
            }
            strBuff.delete(0, strBuff.length());
        }
        return true;
    }
Write topic deploy configurations to Master

@param topicDeployMap     the topic deploy configurations that needs to be stored
@param strBuff          the string buffer
@param result           the process result
@return         the process result
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/tools/cli/CliMetaDataBRU.java