private boolean validAndGetTopicPartInfo(String groupName,
            WebFieldDef groupFldDef,
            Set<String> topicSet,
            ProcessResult result) {
        Set<String> subTopicSet =
                broker.getOffsetManager().getGroupSubInfo(groupName);
        if (subTopicSet == null || subTopicSet.isEmpty()) {
            result.setFailResult(400, new StringBuilder(512)
                    .append("Parameter ").append(groupFldDef.name)
                    .append(": subscribed topic set of ").append(groupName)
                    .append(" query result is null!").toString());
            return result.isSuccess();
        }
        // filter valid topic set
        Set<String> tgtTopicSet = new HashSet<>();
        if (topicSet.isEmpty()) {
            tgtTopicSet = subTopicSet;
        } else {
            for (String topic : topicSet) {
                if (subTopicSet.contains(topic)) {
                    tgtTopicSet.add(topic);
                }
            }
            if (tgtTopicSet.isEmpty()) {
                result.setFailResult(400, new StringBuilder(512)
                        .append("Parameter ").append(groupFldDef.name)
                        .append(": ").append(groupName)
                        .append(" unsubscribed to the specified topic set!").toString());
                return result.isSuccess();
            }
        }
        Map<String, Set<Integer>> topicPartMap = getTopicPartitions(tgtTopicSet);
        if (topicPartMap.isEmpty()) {
            result.setFailResult(400, new StringBuilder(512)
                    .append("Parameter ").append(groupFldDef.name)
                    .append(": all topics subscribed by the group have been deleted!").toString());
            return result.isSuccess();
        }
        result.setSuccResult(topicPartMap);
        return result.isSuccess();
    }
Disable or Enable broker's statistics functions

@param enable     whether enable or disable
@param statsType  the statistics type to be operated on
@param req        HttpServletRequest
@param sBuffer    query result
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/web/BrokerAdminServlet.java