Example usage for org.apache.solr.cloud ZkController createClusterZkNodes

List of usage examples for org.apache.solr.cloud ZkController createClusterZkNodes

Introduction

In this page you can find the example usage for org.apache.solr.cloud ZkController createClusterZkNodes.

Prototype

public static void createClusterZkNodes(SolrZkClient zkClient)
        throws KeeperException, InterruptedException, IOException 

Source Link

Document

Create the zknodes necessary for a cluster to operate

Usage

From source file:com.shaie.solr.MiniSolrCloudCluster.java

License:Apache License

public MiniSolrCloudCluster(File workDir, File solrXml, String connectString) {
    this.workDir = workDir;
    try (final SolrZkClient zkClient = new SolrZkClient(connectString, 120000)) {
        ZkController.createClusterZkNodes(zkClient);
        zkClient.makePath("/solr.xml", solrXml, false, true);
        System.setProperty(SOLRXML_LOCATION_PROP_NAME, SOLRXML_LOCATION_PROP_VALUE);
    } catch (final Exception e) {
        throw Throwables.propagate(e);
    }/*from w w w .j  a  v  a 2  s  .co  m*/
}