brandboat commented on code in PR #20385:
URL: https://github.com/apache/kafka/pull/20385#discussion_r2298117407
##########
tools/src/main/java/org/apache/kafka/tools/ConsumerPerformance.java:
##########
@@ -258,11 +258,17 @@ protected static class ConsumerPerfOptions extends
CommandDefaultOptions {
private final OptionSpec<Integer> fetchSizeOpt;
private final OptionSpec<Void> resetBeginningOffsetOpt;
private final OptionSpec<Integer> socketBufferSizeOpt;
+ // Deprecated option, kept for backward compatibility
+ // and will be removed in a future version.
Review Comment:
Could you replace the comment with `@Deprecated(since = "4.2", forRemoval =
true)`? Same thing in other places.
##########
tools/src/main/java/org/apache/kafka/tools/ConsumerPerformance.java:
##########
@@ -349,8 +366,15 @@ public String brokerHostsAndPorts() {
}
public Properties props() throws IOException {
- Properties props = (options.has(consumerConfigOpt))
- ? Utils.loadProps(options.valueOf(consumerConfigOpt))
+ String commandConfigFile;
+ if (options.has(consumerConfigOpt)) {
+ System.out.println("Warning: --consumer.config is deprecated.
Use --command-config instead.");
+ commandConfigFile = options.valueOf(consumerConfigOpt);
+ } else {
+ commandConfigFile = options.valueOf(commandConfigOpt);
+ }
Review Comment:
This seems contradictory to the KIP, which states:
> It is an error to use both the old name and the new name together - they
are mutually exclusive.
Same thing in other options.
https://cwiki.apache.org/confluence/display/KAFKA/KIP-1147%3A+Improve+consistency+of+command-line+arguments
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]