private static AmsServerInfo findAmsServerInfo(
      String serviceName, String zkServerAddress, String cluster) throws Exception {
    switch (serviceName) {
      case Constants.THRIFT_TABLE_SERVICE_NAME:
        return JacksonUtil.parseObject(
            ZookeeperService.getInstance(zkServerAddress)
                .getData(AmsHAProperties.getTableServiceMasterPath(cluster)),
            AmsServerInfo.class);
      case Constants.THRIFT_OPTIMIZING_SERVICE_NAME:
        return JacksonUtil.parseObject(
            ZookeeperService.getInstance(zkServerAddress)
                .getData(AmsHAProperties.getOptimizingServiceMasterPath(cluster)),
            AmsServerInfo.class);
      default:
        throw new RuntimeException(String.format("invalid service name %s", serviceName));
    }
  }
parse thrift url, now support thrift://host:port/{catalogName} and
zookeeper://host:port/{cluster}/{catalogName} . parse to AmsThriftUrl that contains properties
schema, host, port, catalogName, socketTimeout, url.

@param url - thrift url
@return -
amoro-common/src/main/java/org/apache/amoro/client/AmsThriftUrl.java