tinaselenge commented on code in PR #17524:
URL: https://github.com/apache/kafka/pull/17524#discussion_r1871715247
##########
clients/src/main/java/org/apache/kafka/common/requests/DescribeClusterRequest.java:
##########
@@ -51,6 +52,13 @@ public String toString() {
public DescribeClusterRequest(DescribeClusterRequestData data, short
version) {
super(ApiKeys.DESCRIBE_CLUSTER, version);
this.data = data;
+ validateVersionForIncludingFencedBrokers(version,
data.includeFencedBrokers());
+ }
+
+ private void validateVersionForIncludingFencedBrokers(short version,
boolean includeFencedBrokers) {
+ if (version < 2 && includeFencedBrokers) {
+ throw new UnsupportedVersionException("Including fenced broker
endpoints is not supported with version " + version);
+ }
Review Comment:
I agree, I think this will take quite a lot of refactoring to the testing
framework. We have unit tests for the compatibility part and integration tests
for the new option to include fenced brokers.
--
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]