private void buildGroupOffsetUpdateResult(String groupName, StringBuilder sBuffer,
            Map<String, Map<Integer, GroupOffsetInfo>> befTopicPartMap,
            Map<String, Map<Integer, GroupOffsetInfo>> aftTopicPartMap) {
        // build result
        WebParameterUtils.buildSuccessWithDataRetBegin(sBuffer);
        int topicCnt = 0;
        sBuffer.append("{\"groupName\":\"").append(groupName).append("\",\"before\":[");
        for (Map.Entry<String, Map<Integer, GroupOffsetInfo>> entry1 : befTopicPartMap.entrySet()) {
            if (topicCnt++ > 0) {
                sBuffer.append(",");
            }
            Map<Integer, GroupOffsetInfo> partOffMap = entry1.getValue();
            sBuffer.append("{\"topicName\":\"").append(entry1.getKey())
                    .append("\",\"offsets\":[");
            int partCnt = 0;
            for (Map.Entry<Integer, GroupOffsetInfo> entry2 : partOffMap.entrySet()) {
                if (partCnt++ > 0) {
                    sBuffer.append(",");
                }
                GroupOffsetInfo offsetInfo = entry2.getValue();
                offsetInfo.buildOffsetInfo(sBuffer);
            }
            sBuffer.append("],\"partCount\":").append(partCnt).append("}");
        }
        sBuffer.append("],\"after\":[");
        topicCnt = 0;
        for (Map.Entry<String, Map<Integer, GroupOffsetInfo>> entry1 : aftTopicPartMap.entrySet()) {
            if (topicCnt++ > 0) {
                sBuffer.append(",");
            }
            Map<Integer, GroupOffsetInfo> partOffMap = entry1.getValue();
            sBuffer.append("{\"topicName\":\"").append(entry1.getKey())
                    .append("\",\"offsets\":[");
            int partCnt = 0;
            for (Map.Entry<Integer, GroupOffsetInfo> entry2 : partOffMap.entrySet()) {
                if (partCnt++ > 0) {
                    sBuffer.append(",");
                }
                GroupOffsetInfo offsetInfo = entry2.getValue();
                offsetInfo.buildOffsetInfo(sBuffer);
            }
            sBuffer.append("],\"partCount\":").append(partCnt).append("}");
        }
        sBuffer.append("]}");
        WebParameterUtils.buildSuccessWithDataRetEnd(sBuffer, 1);
    }
Query group's offset records stored in broker.

@param groupName      group name
@param topicSet       the topic set need query
@param msgStore       history offset store
@param requestOffset  request offset
@param maxRetryCnt    max query turns
@param recStartTime   record start timestamp
@param recEndTime     record end timestamp
@param result         query result
@return  whether success
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/web/BrokerAdminServlet.java