List of usage examples for org.apache.solr.client.solrj.embedded JettySolrRunner getSolrDispatchFilter
public SolrDispatchFilter getSolrDispatchFilter()
From source file:com.shaie.solr.MiniSolrCloudCluster.java
License:Apache License
/** * Kills the Solr instance identified by the given {@code nodeId}. Unlike {@link #stopSolr(String)}, this method * prevents Solr from doing a graceful shutdown, so that states recorded in ZooKeeper aren't consistent. */// w w w.j a v a 2 s . com public void killSolr(String nodeId) { final JettySolrRunner solrRunner = getJettySolrRunner(nodeId); final SolrDispatchFilter solrFilter = solrRunner.getSolrDispatchFilter(); final SolrZooKeeper solrZooKeeper = solrFilter.getCores().getZkController().getZkClient() .getSolrZooKeeper(); try { // solrZooKeeper.closeCnxn() doesn't really work solrZooKeeper.close(); } catch (final InterruptedException e) { throw new RuntimeException(e); } stopSolr(nodeId); }