[ 
https://issues.apache.org/jira/browse/KAFKA-7735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17717290#comment-17717290
 ] 

Federico Valeri edited comment on KAFKA-7735 at 4/27/23 4:31 PM:
-----------------------------------------------------------------

This tool will be deprecated in the next minor release and removed in the next 
major, see 
[KIP-906|https://cwiki.apache.org/confluence/display/KAFKA/KIP-906%3A+Tools+migration+guidelines].


was (Author: fvaleri):
This tool will be deprecated in the next minor release and removed in the next 
major, see 
[KIP-906](https://cwiki.apache.org/confluence/display/KAFKA/KIP-906%3A+Tools+migration+guidelines).

> 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
>
> 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)

Reply via email to