private boolean validManOffsetResetInfo(WebFieldDef fieldDef,
            Map<String, Long> manOffsetInfoMap,
            ProcessResult result) {
        String brokerId;
        String topicName;
        String strPartId;
        int partitionId;
        long adjOffset;
        MessageStore store = null;
        MessageStoreManager storeManager = broker.getStoreManager();
        List<Tuple3<String, Integer, Long>> offsetVals = new ArrayList<>();
        String localBrokerId = String.valueOf(broker.getTubeConfig().getBrokerId());
        // get topic configure infos
        Map<String, TopicMetadata> topicConfigMap =
                broker.getMetadataManager().getTopicConfigMap();
        for (Map.Entry<String, Long> entry : manOffsetInfoMap.entrySet()) {
            if (entry.getKey() == null || entry.getValue() == null) {
                continue;
            }
            // parse and check partitionKey value
            String[] keyItems = entry.getKey().split(TokenConstants.ATTR_SEP);
            if (keyItems.length != 3) {
                result.setFailResult(fieldDef.id,
                        new StringBuilder(512).append("Parameter ")
                                .append(fieldDef.name).append("'s key invalid:")
                                .append(entry.getKey())
                                .append(" must be brokerId:topicName:partitionId !").toString());
                return result.isSuccess();
            }
            brokerId = keyItems[0].trim();
            topicName = keyItems[1].trim();
            strPartId = keyItems[2].trim();
            if (!localBrokerId.equals(brokerId)
                    || !topicConfigMap.containsKey(topicName)) {
                continue;
            }
            try {
                partitionId = Integer.parseInt(strPartId);
            } catch (NumberFormatException e) {
                result.setFailResult(fieldDef.id,
                        new StringBuilder(512).append("Parameter ")
                                .append(fieldDef.name).append("'s key invalid:")
                                .append(entry.getKey())
                                .append("'s partitionId value not number!").toString());
                return result.isSuccess();
            }
            // check and adjust offset value
            try {
                store = storeManager.getOrCreateMessageStore(topicName, partitionId);
            } catch (Throwable e) {
                //
            }
            if (store == null) {
                continue;
            }
            adjOffset = MixedUtils.mid(entry.getValue(),
                    store.getIndexMinOffset(), store.getIndexMaxOffset());
            offsetVals.add(new Tuple3<>(topicName, partitionId, adjOffset));
        }
        if (offsetVals.isEmpty()) {
            result.setFailResult(fieldDef.id,
                    new StringBuilder(512).append("Parameter ")
                            .append(fieldDef.name).append("'s value is invalid!").toString());
        } else {
            result.setSuccResult(offsetVals);
        }
        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