@Override public List<CoreDescriptor> discover(CoreContainer cc) { return ImmutableList.of(new CoreDescriptor(coreName, cc.getCoreRootDirectory().resolve(coreName), cc.getContainerProperties(), cc.isZooKeeperAware(), CoreDescriptor.CORE_DATADIR, dataDir, CoreDescriptor.CORE_CONFIG, solrConfig, CoreDescriptor.CORE_SCHEMA, schema, CoreDescriptor.CORE_COLLECTION, System.getProperty("collection", "collection1"), CoreDescriptor.CORE_SHARD, System.getProperty("shard", "shard1"))); }
if (! cc.getCores().isEmpty() && cc.isZooKeeperAware()) { try { cc.getZkController().getZkClient().exists("/", false);
boolean zookeeper = false; if (this.core != null && this.core.getCoreContainer().isZooKeeperAware()) { zookeeper = true;
void handleError(String message, Exception e) { if (!dataImporter.getCore().getCoreContainer().isZooKeeperAware()) { writer.rollback(); } statusMessages.put(message, "Indexing error"); addStatusMessage(message); if ((config != null) && (config.getOnError() != null)) { invokeEventListener(config.getOnError(), e); } }
/** * Creates an appropriate {@link DatasetGraph} for this SolRDF instance. * * @param request the current Solr request * @param response the current Solr response. * @param parser the Query parser associated with the current request. * @param consumer a {@link GraphEventConsumer} for this query cycle. * @return an appropriate {@link DatasetGraph} for this SolRDF instance. */ DatasetGraph datasetGraph(final SolrQueryRequest request, final SolrQueryResponse response, final QParser parser, final GraphEventConsumer consumer) { return request.getCore().getCoreDescriptor().getCoreContainer().isZooKeeperAware() ? new CloudDatasetGraph(request, response, server) : new LocalDatasetGraph(request, response, parser, consumer); } }
public static void kill(JettySolrRunner jetty) throws Exception { CoreContainer cores = jetty.getCoreContainer(); if (cores != null) { if (cores.isZooKeeperAware()) { int zklocalport = ((InetSocketAddress) cores.getZkController() .getZkClient().getSolrZooKeeper().getSocketAddress()).getPort(); IpTables.blockPort(zklocalport); } } IpTables.blockPort(jetty.getLocalPort()); monkeyLog("kill jetty! " + jetty.getLocalPort()); jetty.stop(); stop(jetty); if (!jetty.isStopped()) { throw new RuntimeException("could not kill jetty"); } }
if (cores.isZooKeeperAware()) { int zklocalport = ((InetSocketAddress) cores.getZkController() .getZkClient().getSolrZooKeeper().getSocketAddress()).getPort();
if (req.getCore() != null) { cc = req.getCore().getCoreContainer(); isZkAware = cc.isZooKeeperAware();