d8tltanc commented on a change in pull request #8683: URL: https://github.com/apache/kafka/pull/8683#discussion_r445042974
########## File path: clients/src/main/java/org/apache/kafka/clients/ClusterConnectionStates.java ########## @@ -357,6 +398,36 @@ private NodeConnectionState nodeState(String id) { return state; } + /** + * Get the id set of nodes which are in CONNECTING state + */ + public Set<String> connectingNodes() { + return this.connectingNodes; + } + + /** + * Get the timestamp of the latest connection attempt of a given node + * @param id the connection to fetch the state for + */ + public long lastConnectAttemptMs(String id) { + NodeConnectionState nodeState = this.nodeState.get(id); + return nodeState == null ? 0 : nodeState.lastConnectAttemptMs; + } + + public long connectionSetupTimeoutMs(String id) { + NodeConnectionState nodeState = this.nodeState.get(id); + return nodeState.connectionSetupTimeoutMs; Review comment: Sure. Now `isConnectionSetupTimeout` is also using this checker. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org