This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1e547dee782 MINOR: Update inconsistent description for 
kafka-streams-application-reset and kafka-producer-perf-test (#20445)
1e547dee782 is described below

commit 1e547dee782052ac298663eec89941873cbf59d6
Author: Jhen-Yung Hsu <[email protected]>
AuthorDate: Sun Nov 2 04:38:19 2025 +0800

    MINOR: Update inconsistent description for kafka-streams-application-reset 
and kafka-producer-perf-test (#20445)
    
    The value placeholder for the --bootstrap-server argument in the usage
    output (e.g., when running with --help) has been corrected from the
    plural form (BOOTSTRAP-SERVERS) to the consistent singular form
    (BOOTSTRAP-SERVER).
    
    Reviewers: Chia-Ping Tsai <[email protected]>
---
 docs/streams/developer-guide/app-reset-tool.html           | 14 ++++++--------
 .../java/org/apache/kafka/tools/ProducerPerformance.java   | 14 +++++++-------
 .../main/java/org/apache/kafka/tools/StreamsResetter.java  |  2 +-
 .../org/apache/kafka/tools/ProducerPerformanceTest.java    |  2 +-
 4 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/docs/streams/developer-guide/app-reset-tool.html 
b/docs/streams/developer-guide/app-reset-tool.html
index 7f299ac9941..e80f53940a5 100644
--- a/docs/streams/developer-guide/app-reset-tool.html
+++ b/docs/streams/developer-guide/app-reset-tool.html
@@ -71,20 +71,18 @@
             <p>The tool accepts the following parameters:</p>
             <pre><code class="language-text">Option (* = required)             
    Description
 ---------------------                 -----------
-* --application-id &lt;String: id&gt;       The Kafka Streams application ID
+* --application-id &lt;String: id&gt;       REQUIRED: The Kafka Streams 
application ID
                                         (application.id).
---bootstrap-server &lt;String: server to  REQUIRED unless --bootstrap-servers
-                            connect to&gt;                            
(deprecated) is specified. The server
-                                         (s) to connect to. The broker list
-                                         string in the form HOST1:PORT1,HOST2:
-                                         PORT2.
+--bootstrap-server &lt;String: server to  The server(s) to connect to.
+                           connect to&gt;  The broker list string in the form 
HOST1:PORT1,HOST2:PORT2.
+                                        (default: localhost:9092)
 --by-duration &lt;String: urls&gt;          Reset offsets to offset by 
duration from
                                         current timestamp. Format: 
&#39;PnDTnHnMnS&#39;
---config-file &lt;String: file name&gt;    (Deprecated) Property file 
containing configs to be
+--config-file &lt;String: file name&gt;     (Deprecated) Property file 
containing configs to be
                                         passed to admin clients and embedded 
consumer.
                                         This option will be removed in a 
future version.
                                         Use --command-config instead.
---command-config &lt;String: file name&gt; Config properties file to be passed 
to admin clients
+--command-config &lt;String: file name&gt;  Config properties file to be 
passed to admin clients
                                         and embedded consumer.
 --dry-run                             Display the actions that would be
                                         performed without executing the reset
diff --git 
a/tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java 
b/tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java
index fa21432b587..ac448f20957 100644
--- a/tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java
+++ b/tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java
@@ -241,8 +241,8 @@ public class ProducerPerformance {
                 .action(store())
                 .required(false)
                 .type(String.class)
-                .metavar("BOOTSTRAP-SERVERS")
-                .dest("bootstrapServers")
+                .metavar("BOOTSTRAP-SERVER")
+                .dest("bootstrapServer")
                 .help("The server(s) to connect to. This config takes 
precedence over bootstrap.servers specified " +
                         "via --command-property or --command-config.");
 
@@ -566,7 +566,7 @@ public class ProducerPerformance {
     }
 
     static final class ConfigPostProcessor {
-        final String bootstrapServers;
+        final String bootstrapServer;
         final String topicName;
         final long numRecords;
         final long warmupRecords;
@@ -582,7 +582,7 @@ public class ProducerPerformance {
 
         public ConfigPostProcessor(ArgumentParser parser, String[] args) 
throws IOException, ArgumentParserException {
             Namespace namespace = parser.parseArgs(args);
-            this.bootstrapServers = namespace.getString("bootstrapServers");
+            this.bootstrapServer = namespace.getString("bootstrapServer");
             this.topicName = namespace.getString("topic");
             this.numRecords = namespace.getLong("numRecords");
             this.warmupRecords = Math.max(namespace.getLong("warmupRecords"), 
0);
@@ -608,7 +608,7 @@ public class ProducerPerformance {
             if (recordSize != null && recordSize <= 0) {
                 throw new ArgumentParserException("--record-size should be 
greater than zero.", parser);
             }
-            if (bootstrapServers == null && commandProperties == null && 
producerConfigs == null && producerConfigFile == null && commandConfigFile == 
null) {
+            if (bootstrapServer == null && commandProperties == null && 
producerConfigs == null && producerConfigFile == null && commandConfigFile == 
null) {
                 throw new ArgumentParserException("At least one of 
--bootstrap-server, --command-property, --producer-props, --producer.config or 
--command-config must be specified.", parser);
             }
             if (commandProperties != null && producerConfigs != null) {
@@ -637,8 +637,8 @@ public class ProducerPerformance {
                 commandConfigFile = producerConfigFile;
             }
             this.producerProps = readProps(commandProperties, 
commandConfigFile);
-            if (bootstrapServers != null) {
-                producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, 
bootstrapServers);
+            if (bootstrapServer != null) {
+                producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, 
bootstrapServer);
             }
             // setup transaction related configs
             this.transactionsEnabled = transactionDurationMsArg != null
diff --git a/tools/src/main/java/org/apache/kafka/tools/StreamsResetter.java 
b/tools/src/main/java/org/apache/kafka/tools/StreamsResetter.java
index 13877975cf2..08fc1d590e8 100644
--- a/tools/src/main/java/org/apache/kafka/tools/StreamsResetter.java
+++ b/tools/src/main/java/org/apache/kafka/tools/StreamsResetter.java
@@ -585,7 +585,7 @@ public class StreamsResetter {
 
         public StreamsResetterOptions(String[] args) {
             super(args);
-            applicationIdOption = parser.accepts("application-id", "The Kafka 
Streams application ID (application.id).")
+            applicationIdOption = parser.accepts("application-id", "REQUIRED: 
The Kafka Streams application ID (application.id).")
                 .withRequiredArg()
                 .ofType(String.class)
                 .describedAs("id")
diff --git 
a/tools/src/test/java/org/apache/kafka/tools/ProducerPerformanceTest.java 
b/tools/src/test/java/org/apache/kafka/tools/ProducerPerformanceTest.java
index 007a22a8020..fa844dfbbe5 100644
--- a/tools/src/test/java/org/apache/kafka/tools/ProducerPerformanceTest.java
+++ b/tools/src/test/java/org/apache/kafka/tools/ProducerPerformanceTest.java
@@ -417,7 +417,7 @@ public class ProducerPerformanceTest {
             "--transaction-duration-ms", "5000",
         };
         ProducerPerformance.ConfigPostProcessor configs = new 
ProducerPerformance.ConfigPostProcessor(parser, args);
-        assertEquals("localhost:9000", configs.bootstrapServers);
+        assertEquals("localhost:9000", configs.bootstrapServer);
         assertEquals("Hello-Kafka", configs.topicName);
         assertEquals(5, configs.numRecords);
         assertEquals(100, configs.throughput);

Reply via email to