public static List<HostAndPort> splitToHostsAndPortsStrictly(String quorum) throws BadConfigException { List<HostAndPort> hostAndPorts = ZookeeperUtils.splitToHostsAndPorts(quorum); if (hostAndPorts.isEmpty()) { throw new BadConfigException("empty zookeeper quorum"); } return hostAndPorts; }
public static String convertToHostsOnlyList(String quorum) throws BadConfigException { List<HostAndPort> hostAndPorts = splitToHostsAndPortsStrictly(quorum); return ZookeeperUtils.buildHostsOnlyList(hostAndPorts); }