public Node nodeById(int id) {
        return this.nodesById.get(id);
    }
Get the node by the node id (or null if the node is not online or does not exist)
@param id The id of the node
@return The node, or null if the node is not online or does not exist
clients/src/main/java/org/apache/kafka/common/Cluster.java