[ https://issues.apache.org/jira/browse/KAFKA-7735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Federico Valeri updated KAFKA-7735: ----------------------------------- Fix Version/s: 3.6.0 > StateChangeLogMerger tool can not work due to incorrect topic regular matches > ----------------------------------------------------------------------------- > > Key: KAFKA-7735 > URL: https://issues.apache.org/jira/browse/KAFKA-7735 > Project: Kafka > Issue Type: Bug > Components: tools > Affects Versions: 2.0.0 > Reporter: Fangbin Sun > Assignee: Federico Valeri > Priority: Major > Fix For: 3.6.0 > > > When StateChangeLogMerger tool tries to obtain a topic's state-change-log, it > returns nothing. > {code:java} > bin/kafka-run-class.sh com.cmss.kafka.api.StateChangeLogMerger --logs > state-change.log --topic test{code} > This tool uses a topic partition regex as follows: > {code:java} > val topicPartitionRegex = new Regex("\\[(" + Topic.LEGAL_CHARS + "+),( > )*([0-9]+)\\]"){code} > However the state-change-log no longer prints log in the above format. e.g. > in 0.10.2.0, it prints some state-change logs by case class TopicAndPartition > which overrided as follows: > {code:java} > override def toString = "[%s,%d]".format(topic, partition){code} > In a newer version (e.g. 1.0.0+) it prints most of state-change logs in the > form of "partition $topic-$partition", as a workaround one can modify the > topic partition regex like: > {code:java} > val topicPartitionRegex = new Regex("(partition " + Topic.LEGAL_CHARS + > "+)-([0-9]+)"){code} > and match topic with "matcher.group(1).substring(10)", however some output of > state changes might be a little bit redundant. -- This message was sent by Atlassian Jira (v8.20.10#820010)