public static int replicationHops(Map<String, Object> properties, String upstreamClusterAlias)
            throws InterruptedException, TimeoutException {
        try (MirrorClient client = new MirrorClient(properties)) {
            return client.replicationHops(upstreamClusterAlias);
        }
    }
Finds the shortest number of hops from an upstream cluster.
Returns -1 if the cluster is unreachable.
connect/mirror-client/src/main/java/org/apache/kafka/connect/mirror/RemoteClusterUtils.java