Example usage for org.apache.solr.common.cloud ZkStateReader readConfigName

List of usage examples for org.apache.solr.common.cloud ZkStateReader readConfigName

Introduction

In this page you can find the example usage for org.apache.solr.common.cloud ZkStateReader readConfigName.

Prototype

public String readConfigName(String collection) throws KeeperException 

Source Link

Document

Returns config set name for collection.

Usage

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

License:Apache License

/** Returns a collection's configuration name, or {@code null} if the collection doesn't exist. */
public static String getCollectionConfigName(ZkStateReader zkStateReader, String collection) {
    try {//from  w  ww  .j a  va 2  s.  co  m
        return zkStateReader.readConfigName(collection);
    } catch (final SolrException e) {
        if (e.getCause() instanceof NoNodeException) {
            return null;
        }
        throw e;
    }
}