fvaleri commented on code in PR #17524: URL: https://github.com/apache/kafka/pull/17524#discussion_r1829145374
########## tools/src/main/java/org/apache/kafka/tools/ClusterTool.java: ########## @@ -108,6 +117,17 @@ static void execute(String... args) throws Exception { } break; } + case "list-endpoints": { + try (Admin adminClient = Admin.create(properties)) { + boolean includeFencedBrokers = Optional.of(namespace.getBoolean("include_fenced_brokers")).orElse(false); + boolean listControllerEndpoints = namespace.getString("bootstrap_controller") != null; + if (includeFencedBrokers && listControllerEndpoints) { + throw new RuntimeException("Cannot use --include-fenced-brokers with command " + command); Review Comment: ```suggestion throw new IllegalArgumentException("The option --include-fenced-brokers is only supported with --bootstrap-server option"); ``` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org