public static List<List<String>> extractShardUrls(String zkHost, String collection) { return DELEGATE.extractShardUrls(zkHost, collection); }
public static List<List<String>> extractShardUrls(String zkHost, String collection) { return DELEGATE.extractShardUrls(zkHost, collection); }
private static void verifyZKStructure(Options opts, ArgumentParser parser) throws ArgumentParserException { if (opts.zkHost != null) { assert opts.collection != null; ZooKeeperInspector zki = new ZooKeeperInspector(); try { opts.shardUrls = zki.extractShardUrls(opts.zkHost, opts.collection); } catch (Exception e) { LOG.debug("Cannot extract SolrCloud shard URLs from ZooKeeper", e); throw new ArgumentParserException(e, parser); } assert opts.shardUrls != null; if (opts.shardUrls.size() == 0) { throw new ArgumentParserException("--zk-host requires ZooKeeper " + opts.zkHost + " to contain at least one SolrCore for collection: " + opts.collection, parser); } opts.shards = opts.shardUrls.size(); LOG.debug("Using SolrCloud shard URLs: {}", opts.shardUrls); } }
private static void verifyZKStructure(Options opts, ArgumentParser parser) throws ArgumentParserException { if (opts.zkHost != null) { assert opts.collection != null; ZooKeeperInspector zki = new ZooKeeperInspector(); try { opts.shardUrls = zki.extractShardUrls(opts.zkHost, opts.collection); } catch (Exception e) { LOG.debug("Cannot extract SolrCloud shard URLs from ZooKeeper", e); throw new ArgumentParserException(e, parser); } assert opts.shardUrls != null; if (opts.shardUrls.size() == 0) { throw new ArgumentParserException("--zk-host requires ZooKeeper " + opts.zkHost + " to contain at least one SolrCore for collection: " + opts.collection, parser); } opts.shards = opts.shardUrls.size(); LOG.debug("Using SolrCloud shard URLs: {}", opts.shardUrls); } }