private List<Tuple3<String, Integer, Long>> buildOffsetResetInfo(
            Map<String, Map<Integer, Tuple2<Long, Long>>> topicPartOffsetMap) {
        long adjOffset = -1;
        MessageStore store = null;
        List<Tuple3<String, Integer, Long>> result = new ArrayList<>();
        MessageStoreManager storeManager = broker.getStoreManager();
        for (Map.Entry<String, Map<Integer, Tuple2<Long, Long>>> entry : topicPartOffsetMap.entrySet()) {
            Map<Integer, Tuple2<Long, Long>> partOffsetMap = entry.getValue();
            if (partOffsetMap == null) {
                continue;
            }
            // process offset value
            for (Map.Entry<Integer, Tuple2<Long, Long>> entry1 : partOffsetMap.entrySet()) {
                if (entry1.getValue() == null) {
                    continue;
                }
                Tuple2<Long, Long> offsetTuple = entry1.getValue();
                // get topic store
                try {
                    store = storeManager.getOrCreateMessageStore(
                            entry.getKey(), entry1.getKey());
                } catch (Throwable e) {
                    //
                }
                if (store == null) {
                    continue;
                }
                // adjust reset offset value
                adjOffset = MixedUtils.mid(offsetTuple.getF0(),
                        store.getIndexMinOffset(), store.getIndexMaxOffset());
                result.add(new Tuple3<>(entry.getKey(), entry1.getKey(), adjOffset));
            }
        }
        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