private boolean writeDataToMaster(String method, String opCode,
            Map<String, String> inParamMap,
            StringBuilder strBuff,
            ProcessResult result) {
        String visitUrl;
        JsonObject jsonRes = null;
        // call master nodes
        for (String address : masterInfo.getNodeHostPortList()) {
            visitUrl = strBuff.append("http://").append(address)
                    .append("/webapi.htm?method=").append(method)
                    .append("&confModAuthToken=").append(opCode).toString();
            strBuff.delete(0, strBuff.length());
            try {
                jsonRes = HttpUtils.requestWebService(visitUrl, inParamMap);
                if (jsonRes != null) {
                    // if get data, break cycle
                    break;
                }
            } catch (Throwable e) {
                //
            }
        }
        if (jsonRes == null) {
            result.setFailResult(400, "Connect master failure!");
        } else {
            if (jsonRes.get("result").getAsBoolean()) {
                result.setSuccResult();
            } else {
                result.setFailResult(jsonRes.get("errCode").getAsInt(),
                        jsonRes.get("errMsg").getAsString());
            }
        }
        return result.isSuccess();
    }
Write data to Masters

@param method      the method name
@param opCode      the operation code
@param inParamMap  the parameter map
@param strBuff     the string buffer
@param result      the process result
@return            success or failure
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/tools/cli/CliMetaDataBRU.java