Skip to content

Commit

Permalink
[ISSUE #9111] Broker Support export RocksDB Config to json file and e…
Browse files Browse the repository at this point in the history
…nhance admin tools
  • Loading branch information
qianye1001 committed Jan 13, 2025
1 parent 51b4fb5 commit cf4151f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected void removeConsumerOffset(String topicAtGroup) {
byte[] keyBytes = topicAtGroup.getBytes(DataConverter.CHARSET_UTF8);
this.rocksDBConfigManager.delete(keyBytes);
} catch (Exception e) {
LOG.error("kv remove consumerOffset Failed, {}", topicAtGroup);
log.error("kv remove consumerOffset Failed, {}", topicAtGroup);
}
}

Expand All @@ -109,7 +109,7 @@ protected void decodeOffset(final byte[] key, final byte[] body) {
RocksDBOffsetSerializeWrapper wrapper = JSON.parseObject(body, RocksDBOffsetSerializeWrapper.class);

this.offsetTable.put(topicAtGroup, wrapper.getOffsetTable());
LOG.info("load exist local offset, {}, {}", topicAtGroup, wrapper.getOffsetTable());
log.info("load exist local offset, {}, {}", topicAtGroup, wrapper.getOffsetTable());
}

public String rocksdbConfigFilePath() {
Expand All @@ -132,14 +132,14 @@ public synchronized void persist() {
this.rocksDBConfigManager.batchPutWithWal(writeBatch);
this.rocksDBConfigManager.flushWAL();
} catch (Exception e) {
LOG.error("consumer offset persist Failed", e);
log.error("consumer offset persist Failed", e);
} finally {
writeBatch.close();
}
}

public synchronized void exportToJson() {
LOG.info("RocksDBConsumerOffsetManager export consumer offset to json file");
log.info("RocksDBConsumerOffsetManager export consumer offset to json file");
super.persist();
}

Expand Down

0 comments on commit cf4151f

Please sign in to comment.