AndrewJSchofield commented on code in PR #22512:
URL: https://github.com/apache/kafka/pull/22512#discussion_r3529104180
##########
clients/src/main/java/org/apache/kafka/common/Node.java:
##########
@@ -31,30 +31,47 @@ public class Node {
private final int port;
private final String rack;
private final boolean isFenced;
+ private final boolean isCoordinator;
// Cache hashCode as it is called in performance sensitive parts of the
code (e.g. RecordAccumulator.ready)
private Integer hash;
public Node(int id, String host, int port) {
- this(id, host, port, null, false);
+ this(id, host, port, null, false, false);
}
public Node(int id, String host, int port, String rack) {
- this.id = id;
- this.idString = Integer.toString(id);
- this.host = host;
- this.port = port;
- this.rack = rack;
- this.isFenced = false;
+ this(id, host, port, rack, false, false);
}
public Node(int id, String host, int port, String rack, boolean isFenced) {
+ this(id, host, port, rack, isFenced, false);
+ }
+
+ public Node(int id, String host, int port, String rack, boolean isFenced,
boolean isCoordinator) {
Review Comment:
That is a sensible idea. Since this trick was a late addition to the
implementation of this KIP, I didn't do that. I wonder if you have a volunteer
in mind for the writing the KIP.
--
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]