AndrewJSchofield commented on code in PR #16106:
URL: https://github.com/apache/kafka/pull/16106#discussion_r1617552593


##########
clients/src/main/java/org/apache/kafka/clients/admin/QuorumInfo.java:
##########
@@ -94,21 +104,24 @@ public String toString() {
 
     public static class ReplicaState {
         private final int replicaId;
+        private final Optional<Uuid> replicaDirectoryId;
         private final long logEndOffset;
         private final OptionalLong lastFetchTimestamp;
         private final OptionalLong lastCaughtUpTimestamp;
 
         ReplicaState() {
-            this(0, 0, OptionalLong.empty(), OptionalLong.empty());
+            this(0, Optional.of(Uuid.ZERO_UUID), 0, OptionalLong.empty(), 
OptionalLong.empty());

Review Comment:
   So, this should be Optional.empty() I think.



##########
clients/src/main/java/org/apache/kafka/clients/admin/QuorumInfo.java:
##########
@@ -122,6 +135,13 @@ public int replicaId() {
             return replicaId;
         }
 
+        /**
+         * Return the directory id of the replica if configured.
+         */
+        public Optional<Uuid> replicaDirectoryId() {
+            return replicaDirectoryId;

Review Comment:
   I meant that the code which builds a DescribeQuorumResponseData from a v0/v1 
RPC response needs to return a null, or we need handling for ZERO_UUID which 
treats it as a null, and then we end up with Optional.empty(). Maybe I'm 
missing something.



##########
clients/src/main/resources/common/message/DescribeQuorumResponse.json:
##########
@@ -40,10 +44,27 @@
         { "name": "CurrentVoters", "type": "[]ReplicaState", "versions": "0+" 
},
         { "name": "Observers", "type": "[]ReplicaState", "versions": "0+" }
       ]}
-    ]}],
+    ]},
+    { "name": "Nodes", "type": "[]Node", "versions": "2+", "fields": [
+      { "name": "NodeId", "type": "int32", "versions": "2+",
+        "mapKey": true, "entityType": "brokerId", "about": "The ID of the 
associated node" },
+      { "name": "Listeners", "type": "[]Listener",
+        "about": "The listeners of this controller", "versions": "0+", 
"fields": [

Review Comment:
   I think there's still one remaining at 0+ (Listeners).



-- 
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

Reply via email to