public static URI tryParseAsConnectionURI(String clusterKey) {
    // The old cluster key format may not be parsed as URI if we use ip address as the zookeeper
    // address, so here we need to catch the URISyntaxException and return false
    URI uri;
    try {
      uri = new URI(clusterKey);
    } catch (URISyntaxException e) {
      LOG.debug("failed to parse cluster key to URI: {}", clusterKey, e);
      return null;
    }
    if (FACTORIES.containsKey(uri.getScheme())) {
      return uri;
    } else {
      return null;
    }
  }
If the given {@code clusterKey} can be parsed to a {@link URI}, and the scheme of the
{@link URI} is supported by us, return the {@link URI}, otherwise return {@code null}.
@param clusterKey the cluster key, typically from replication peer config
@return a {@link URI} or {@code null}.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionRegistryFactory.java