Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 public static String convertToHostsOnlyList(String quorum) throws BadConfigException {
   List<HostAndPort> hostAndPorts = splitToHostsAndPortsStrictly(quorum);
   return ZookeeperUtils.buildHostsOnlyList(hostAndPorts);
 }