diff --git a/docs/streams/developer-guide/app-reset-tool.html b/docs/streams/developer-guide/app-reset-tool.html index 7f299ac994160..e80f53940a5bb 100644 --- a/docs/streams/developer-guide/app-reset-tool.html +++ b/docs/streams/developer-guide/app-reset-tool.html @@ -71,20 +71,18 @@

Step 1: Run the application reset toolOption (* = required) Description --------------------- ----------- -* --application-id <String: id> The Kafka Streams application ID +* --application-id <String: id> REQUIRED: The Kafka Streams application ID (application.id). ---bootstrap-server <String: server to REQUIRED unless --bootstrap-servers - connect to> (deprecated) is specified. The server - (s) to connect to. The broker list - string in the form HOST1:PORT1,HOST2: - PORT2. +--bootstrap-server <String: server to The server(s) to connect to. + connect to> The broker list string in the form HOST1:PORT1,HOST2:PORT2. + (default: localhost:9092) --by-duration <String: urls> Reset offsets to offset by duration from current timestamp. Format: 'PnDTnHnMnS' ---config-file <String: file name> (Deprecated) Property file containing configs to be +--config-file <String: file name> (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 <String: file name> Config properties file to be passed to admin clients +--command-config <String: file name> 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 fa21432b5870a..ac448f20957fa 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 @@ static ArgumentParser argParser() { .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 void onCompletion(RecordMetadata metadata, Exception exception) { } static final class ConfigPostProcessor { - final String bootstrapServers; + final String bootstrapServer; final String topicName; final long numRecords; final long warmupRecords; @@ -582,7 +582,7 @@ static final class ConfigPostProcessor { 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 ConfigPostProcessor(ArgumentParser parser, String[] args) throws IOExcept 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 ConfigPostProcessor(ArgumentParser parser, String[] args) throws IOExcept 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 13877975cf298..08fc1d590e826 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 @@ private static class StreamsResetterOptions extends CommandDefaultOptions { 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 007a22a80202c..fa844dfbbe528 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 void testConfigPostProcessor() throws IOException, ArgumentParserExceptio "--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);