public static SolrZkClient getZkClient(String zkHost) { return DELEGATE.getZkClient(zkHost); }
public static SolrZkClient getZkClient(String zkHost) { return DELEGATE.getZkClient(zkHost); }
public DocCollection extractDocCollection(String zkHost, String collection) { if (collection == null) { throw new IllegalArgumentException("collection must not be null"); } SolrZkClient zkClient = getZkClient(zkHost); try (ZkStateReader zkStateReader = new ZkStateReader(zkClient)) { try { // first check for alias collection = checkForAlias(zkClient, collection); zkStateReader.createClusterStateWatchersAndUpdate(); } catch (Exception e) { throw new IllegalArgumentException("Cannot find expected information for SolrCloud in ZooKeeper: " + zkHost, e); } try { return zkStateReader.getClusterState().getCollection(collection); } catch (SolrException e) { throw new IllegalArgumentException("Cannot find collection '" + collection + "' in ZooKeeper: " + zkHost, e); } } finally { zkClient.close(); } }
public DocCollection extractDocCollection(String zkHost, String collection) { if (collection == null) { throw new IllegalArgumentException("collection must not be null"); } SolrZkClient zkClient = getZkClient(zkHost); try { ZkStateReader zkStateReader = new ZkStateReader(zkClient); try { // first check for alias collection = checkForAlias(zkClient, collection); zkStateReader.createClusterStateWatchersAndUpdate(); } catch (Exception e) { throw new IllegalArgumentException("Cannot find expected information for SolrCloud in ZooKeeper: " + zkHost, e); } try { return zkStateReader.getClusterState().getCollection(collection); } catch (SolrException e) { throw new IllegalArgumentException("Cannot find collection '" + collection + "' in ZooKeeper: " + zkHost, e); } } finally { zkClient.close(); } }
try (SolrZkClient zkClient = zki.getZkClient(options.zkHost)) { String configName = zki.readConfigName(zkClient, options.collection); File tmpSolrHomeDir = zki.downloadConfigDir(zkClient, configName, options.useZkSolrConfig);
SolrZkClient zkClient = zki.getZkClient(options.zkHost); try { String configName = zki.readConfigName(zkClient, options.collection);