private List<Tuple3<String, Integer, Long>> buildOffsetResetInfo(Set<String> topicSet) {
        MessageStore store = null;
        List<Tuple3<String, Integer, Long>> result = new ArrayList<>();
        MessageStoreManager storeManager = broker.getStoreManager();
        // get topic's partition set
        Map<String, Set<Integer>> topicPartMap = getTopicPartitions(topicSet);
        // fill current topic's max offset value
        for (Map.Entry<String, Set<Integer>> entry : topicPartMap.entrySet()) {
            if (entry.getKey() == null
                    || entry.getValue() == null
                    || entry.getValue().isEmpty()) {
                continue;
            }
            Set<Integer> partitionSet = entry.getValue();
            for (Integer partId : partitionSet) {
                // get topic store
                try {
                    store = storeManager.getOrCreateMessageStore(
                            entry.getKey(), partId);
                } catch (Throwable e) {
                    //
                }
                if (store == null) {
                    continue;
                }
                result.add(new Tuple3<>(entry.getKey(),
                        partId, store.getIndexMaxOffset()));
            }
        }
        return result;
    }
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