test_class.file: rocketmq-src/RocketMQ-3.4.6/rocketmq-broker/src/test/java/com/alibaba/rocketmq/broker/offset/ConsumerOffsetManagerTest.java
test_class.identifier: ConsumerOffsetManagerTest
test_case.body: @Test
      public void test_flushConsumerOffset() throws Exception {
          BrokerController brokerController = new BrokerController(//
              new BrokerConfig(), //
              new NettyServerConfig(), //
              new NettyClientConfig(), //
              new MessageStoreConfig());
          boolean initResult = brokerController.initialize();
          System.out.println("initialize " + initResult);
          brokerController.start();
  
          ConsumerOffsetManager consumerOffsetManager = new ConsumerOffsetManager(brokerController);
  
          Random random = new Random();
  
          for (int i = 0; i < 100; i++) {
              String group = "DIANPU_GROUP_" + i;
              for (int id = 0; id < 16; id++) {
                  consumerOffsetManager.commitOffset(group, "TOPIC_A", id,
                      random.nextLong() % 1024 * 1024 * 1024);
                  consumerOffsetManager.commitOffset(group, "TOPIC_B", id,
                      random.nextLong() % 1024 * 1024 * 1024);
                  consumerOffsetManager.commitOffset(group, "TOPIC_C", id,
                      random.nextLong() % 1024 * 1024 * 1024);
              }
          }
  
          consumerOffsetManager.persist();
  
          brokerController.shutdown();
      }
test_case.class_method_signature: ConsumerOffsetManagerTest.test_flushConsumerOffset()
test_case.full_signature: @Test public void test_flushConsumerOffset()
test_case.identifier: test_flushConsumerOffset
test_case.invocations: initialize println start commitOffset nextLong commitOffset nextLong commitOffset nextLong persist shutdown
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_flushConsumerOffset()
focal_class.declarator: log = LoggerFactory.getLogger(LoggerName.BrokerLoggerName)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(LoggerName.BrokerLoggerName);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: TOPIC_GROUP_SEPARATOR = "@"
focal_class.modifier: private static final
focal_class.original_string: private static final String TOPIC_GROUP_SEPARATOR = "@";
focal_class.type: String
focal_class.var_name: TOPIC_GROUP_SEPARATOR
focal_class.declarator: offsetTable =
              new ConcurrentHashMap<String, ConcurrentHashMap<Integer, Long>>(512)
focal_class.modifier: private
focal_class.original_string: private ConcurrentHashMap<String/* topic@group */, ConcurrentHashMap<Integer /*queueid */, Long /*consumeoffset*/>> offsetTable =
              new ConcurrentHashMap<String, ConcurrentHashMap<Integer, Long>>(512);
focal_class.type: ConcurrentHashMap<String/* topic@group */, ConcurrentHashMap<Integer /*queueid */, Long /*consumeoffset*/>>
focal_class.var_name: offsetTable
focal_class.declarator: brokerController
focal_class.modifier: private transient
focal_class.original_string: private transient BrokerController brokerController;
focal_class.type: BrokerController
focal_class.var_name: brokerController
focal_class.file: rocketmq-src/RocketMQ-3.4.6/rocketmq-broker/src/main/java/com/alibaba/rocketmq/broker/offset/ConsumerOffsetManager.java
focal_class.identifier: ConsumerOffsetManager
focal_class.class_method_signature: ConsumerOffsetManager.ConsumerOffsetManager()
focal_class.full_signature: public  ConsumerOffsetManager()
focal_class.identifier: ConsumerOffsetManager
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ConsumerOffsetManager()
focal_class.class_method_signature: ConsumerOffsetManager.ConsumerOffsetManager(BrokerController brokerController)
focal_class.full_signature: public  ConsumerOffsetManager(BrokerController brokerController)
focal_class.identifier: ConsumerOffsetManager
focal_class.modifiers: public
focal_class.parameters: (BrokerController brokerController)
focal_class.signature:  ConsumerOffsetManager(BrokerController brokerController)
focal_class.class_method_signature: ConsumerOffsetManager.scanUnsubscribedTopic()
focal_class.full_signature: public void scanUnsubscribedTopic()
focal_class.identifier: scanUnsubscribedTopic
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void scanUnsubscribedTopic()
focal_class.class_method_signature: ConsumerOffsetManager.offsetBehindMuchThanData(final String topic, ConcurrentHashMap<Integer, Long> table)
focal_class.full_signature: private boolean offsetBehindMuchThanData(final String topic, ConcurrentHashMap<Integer, Long> table)
focal_class.identifier: offsetBehindMuchThanData
focal_class.modifiers: private
focal_class.parameters: (final String topic, ConcurrentHashMap<Integer, Long> table)
focal_class.return: boolean
focal_class.signature: boolean offsetBehindMuchThanData(final String topic, ConcurrentHashMap<Integer, Long> table)
focal_class.class_method_signature: ConsumerOffsetManager.whichTopicByConsumer(final String group)
focal_class.full_signature: public Set<String> whichTopicByConsumer(final String group)
focal_class.identifier: whichTopicByConsumer
focal_class.modifiers: public
focal_class.parameters: (final String group)
focal_class.return: Set<String>
focal_class.signature: Set<String> whichTopicByConsumer(final String group)
focal_class.class_method_signature: ConsumerOffsetManager.whichGroupByTopic(final String topic)
focal_class.full_signature: public Set<String> whichGroupByTopic(final String topic)
focal_class.identifier: whichGroupByTopic
focal_class.modifiers: public
focal_class.parameters: (final String topic)
focal_class.return: Set<String>
focal_class.signature: Set<String> whichGroupByTopic(final String topic)
focal_class.class_method_signature: ConsumerOffsetManager.commitOffset(final String group, final String topic, final int queueId, final long offset)
focal_class.full_signature: public void commitOffset(final String group, final String topic, final int queueId, final long offset)
focal_class.identifier: commitOffset
focal_class.modifiers: public
focal_class.parameters: (final String group, final String topic, final int queueId, final long offset)
focal_class.return: void
focal_class.signature: void commitOffset(final String group, final String topic, final int queueId, final long offset)
focal_class.class_method_signature: ConsumerOffsetManager.queryOffset(final String group, final String topic, final int queueId)
focal_class.full_signature: public long queryOffset(final String group, final String topic, final int queueId)
focal_class.identifier: queryOffset
focal_class.modifiers: public
focal_class.parameters: (final String group, final String topic, final int queueId)
focal_class.return: long
focal_class.signature: long queryOffset(final String group, final String topic, final int queueId)
focal_class.class_method_signature: ConsumerOffsetManager.commitOffset(final String key, final int queueId, final long offset)
focal_class.full_signature: private void commitOffset(final String key, final int queueId, final long offset)
focal_class.identifier: commitOffset
focal_class.modifiers: private
focal_class.parameters: (final String key, final int queueId, final long offset)
focal_class.return: void
focal_class.signature: void commitOffset(final String key, final int queueId, final long offset)
focal_class.class_method_signature: ConsumerOffsetManager.encode()
focal_class.full_signature: public String encode()
focal_class.identifier: encode
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String encode()
focal_class.class_method_signature: ConsumerOffsetManager.encode(final boolean prettyFormat)
focal_class.full_signature: public String encode(final boolean prettyFormat)
focal_class.identifier: encode
focal_class.modifiers: public
focal_class.parameters: (final boolean prettyFormat)
focal_class.return: String
focal_class.signature: String encode(final boolean prettyFormat)
focal_class.class_method_signature: ConsumerOffsetManager.decode(String jsonString)
focal_class.full_signature: @Override //把从 /root/store/config/consumerOffset.json 解析的配置内容序列化到 ConsumerOffsetManager.offsetTable public void decode(String jsonString)
focal_class.identifier: decode
focal_class.modifiers: @Override //把从 /root/store/config/consumerOffset.json 解析的配置内容序列化到 ConsumerOffsetManager.offsetTable public
focal_class.parameters: (String jsonString)
focal_class.return: void
focal_class.signature: void decode(String jsonString)
focal_class.class_method_signature: ConsumerOffsetManager.configFilePath()
focal_class.full_signature: @Override public String configFilePath()
focal_class.identifier: configFilePath
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String configFilePath()
focal_class.class_method_signature: ConsumerOffsetManager.getOffsetTable()
focal_class.full_signature: public ConcurrentHashMap<String, ConcurrentHashMap<Integer, Long>> getOffsetTable()
focal_class.identifier: getOffsetTable
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ConcurrentHashMap<String, ConcurrentHashMap<Integer, Long>>
focal_class.signature: ConcurrentHashMap<String, ConcurrentHashMap<Integer, Long>> getOffsetTable()
focal_class.class_method_signature: ConsumerOffsetManager.setOffsetTable(ConcurrentHashMap<String, ConcurrentHashMap<Integer, Long>> offsetTable)
focal_class.full_signature: public void setOffsetTable(ConcurrentHashMap<String, ConcurrentHashMap<Integer, Long>> offsetTable)
focal_class.identifier: setOffsetTable
focal_class.modifiers: public
focal_class.parameters: (ConcurrentHashMap<String, ConcurrentHashMap<Integer, Long>> offsetTable)
focal_class.return: void
focal_class.signature: void setOffsetTable(ConcurrentHashMap<String, ConcurrentHashMap<Integer, Long>> offsetTable)
focal_class.class_method_signature: ConsumerOffsetManager.queryMinOffsetInAllGroup(final String topic, final String filterGroups)
focal_class.full_signature: public Map<Integer, Long> queryMinOffsetInAllGroup(final String topic, final String filterGroups)
focal_class.identifier: queryMinOffsetInAllGroup
focal_class.modifiers: public
focal_class.parameters: (final String topic, final String filterGroups)
focal_class.return: Map<Integer, Long>
focal_class.signature: Map<Integer, Long> queryMinOffsetInAllGroup(final String topic, final String filterGroups)
focal_class.class_method_signature: ConsumerOffsetManager.queryOffset(final String group, final String topic)
focal_class.full_signature: public Map<Integer, Long> queryOffset(final String group, final String topic)
focal_class.identifier: queryOffset
focal_class.modifiers: public
focal_class.parameters: (final String group, final String topic)
focal_class.return: Map<Integer, Long>
focal_class.signature: Map<Integer, Long> queryOffset(final String group, final String topic)
focal_class.class_method_signature: ConsumerOffsetManager.cloneOffset(final String srcGroup, final String destGroup, final String topic)
focal_class.full_signature: public void cloneOffset(final String srcGroup, final String destGroup, final String topic)
focal_class.identifier: cloneOffset
focal_class.modifiers: public
focal_class.parameters: (final String srcGroup, final String destGroup, final String topic)
focal_class.return: void
focal_class.signature: void cloneOffset(final String srcGroup, final String destGroup, final String topic)
focal_class.superclass: extends ConfigManager
focal_method.body: public void commitOffset(final String group, final String topic, final int queueId, final long offset) {
          // topic@group
          String key = topic + TOPIC_GROUP_SEPARATOR + group;
          this.commitOffset(key, queueId, offset);
      }
focal_method.class_method_signature: ConsumerOffsetManager.commitOffset(final String group, final String topic, final int queueId, final long offset)
focal_method.full_signature: public void commitOffset(final String group, final String topic, final int queueId, final long offset)
focal_method.identifier: commitOffset
focal_method.invocations: commitOffset
focal_method.modifiers: public
focal_method.parameters: (final String group, final String topic, final int queueId, final long offset)
focal_method.return: void
focal_method.signature: void commitOffset(final String group, final String topic, final int queueId, final long offset)