You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ahuang98 (via GitHub)" <gi...@apache.org> on 2024/08/07 21:48:04 UTC

[PR] KAFKA-16521: Have Raft endpoints printed as name://host:port [kafka]

ahuang98 opened a new pull request, #16830:
URL: https://github.com/apache/kafka/pull/16830

   
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-16521: Have Raft endpoints printed as name://host:port [kafka]

Posted by "cmccabe (via GitHub)" <gi...@apache.org>.
cmccabe merged PR #16830:
URL: https://github.com/apache/kafka/pull/16830


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-16521: Have Raft endpoints printed as name://host:port [kafka]

Posted by "ahuang98 (via GitHub)" <gi...@apache.org>.
ahuang98 commented on code in PR #16830:
URL: https://github.com/apache/kafka/pull/16830#discussion_r1707987239


##########
clients/src/main/java/org/apache/kafka/clients/admin/RaftVoterEndpoint.java:
##########
@@ -91,10 +91,6 @@ public int hashCode() {
 
     @Override
     public String toString() {
-        return "RaftVoterEndpoint" +
-            "(name=" + name +
-            ", host=" + host +
-            ", port=" + port +
-            ")";
+        return name + "://" + host + ":" + port;

Review Comment:
   ^ sure thing 
   (taking it you meant if host.contains(":"))



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-16521: Have Raft endpoints printed as name://host:port [kafka]

Posted by "cmccabe (via GitHub)" <gi...@apache.org>.
cmccabe commented on code in PR #16830:
URL: https://github.com/apache/kafka/pull/16830#discussion_r1707978017


##########
clients/src/main/java/org/apache/kafka/clients/admin/RaftVoterEndpoint.java:
##########
@@ -91,10 +91,6 @@ public int hashCode() {
 
     @Override
     public String toString() {
-        return "RaftVoterEndpoint" +
-            "(name=" + name +
-            ", host=" + host +
-            ", port=" + port +
-            ")";
+        return name + "://" + host + ":" + port;

Review Comment:
   can we do something like this?
   ```
   if (name.contains(":")) {
       return name + "://[" + host + "]:" + port;
   } else {
       return name + "://" + host + ":" + port;
   }
   ```
   to get around the ipv6 brain damage?



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org