Skip to content

Commit

Permalink
When using the perf command, the incoming topic name does not have tr…
Browse files Browse the repository at this point in the history
…im, which may cause the parsed topic name to contain spaces. When automatic topic creation is enabled, topics with spaces will also be automatically created (apache#12453)
  • Loading branch information
lordcheng10 authored Oct 21, 2021
1 parent 08e5d5b commit 557dfd2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public static void main(String[] args) throws Exception {
if (arguments.topic != null && arguments.topic.size() != arguments.numTopics) {
// keep compatibility with the previous version
if (arguments.topic.size() == 1) {
String prefixTopicName = TopicName.get(arguments.topic.get(0)).toString();
String prefixTopicName = TopicName.get(arguments.topic.get(0)).toString().trim();
List<String> defaultTopics = Lists.newArrayList();
for (int i = 0; i < arguments.numTopics; i++) {
defaultTopics.add(String.format("%s-%d", prefixTopicName, i));
Expand Down

0 comments on commit 557dfd2

Please sign in to comment.