public void shutdown(){ if (this.solrServer != null && this.solrServer instanceof HttpSolrServer){ HttpSolrServer httpsolrServer = (HttpSolrServer) solrServer; httpsolrServer.shutdown(); } } }
/** * Drops all existing SolrServers */ public static void invalidate() { for(SolrServer server:servers.values()) { if(server instanceof HttpSolrServer) { ((HttpSolrServer) server).shutdown(); } } servers.clear(); } }
/******************************************************/ // shutdown is a method to stop the Solr Server public void shutdown ( ) { if ( logger.isInfoEnabled ( ) ) logger.info ( "Shuting the Solr Server down in the Complex Solr Server" ) ; // If the solrServer is not null and is an instance of HttpSolrServer we can shut down it if ( this.solrServer != null && this.solrServer instanceof HttpSolrServer ) { ( ( HttpSolrServer ) this.solrServer ) .shutdown ( ) ; } }
public void shutDown() throws IOException, SolrServerException { if (solrServer != null){ solrServer.optimize(); solrServer.shutdown(); } }
@Override public void shutdown(Application application) { queryEngine.shutdown(); updateEngine.shutdown(); }
@Override public void shutdown() { super.shutdown(); try { if (jettySolrRunner != null) { if (jettySolrRunner.isRunning()) { jettySolrRunner.stop(); } } } catch (Exception e) { log.warn("could not stop JettySolrRunner {}", jettySolrRunner); } } }
@Override public void shutdown() { super.shutdown(); try { if (jettySolrRunner != null) { if (jettySolrRunner.isRunning()) { jettySolrRunner.stop(); } } } catch (Exception e) { log.warn("could not stop JettySolrRunner {}", jettySolrRunner); } } }
@Override public Request call() { Request req = new Request(); LOG.info("Live merge " + dir.getPath() + " into " + mergeUrl); final HttpSolrServer server = new HttpSolrServer(mergeUrl); try { CoreAdminRequest.MergeIndexes mergeRequest = new CoreAdminRequest.MergeIndexes(); mergeRequest.setCoreName(name); mergeRequest.setIndexDirs(Arrays.asList(dir.getPath().toString() + "/data/index")); try { mergeRequest.process(server); req.success = true; } catch (SolrServerException e) { req.e = e; return req; } catch (IOException e) { req.e = e; return req; } } finally { server.shutdown(); } return req; } };
server.shutdown();
leaderClients.get(leaderUrl).solrServer.shutdown();
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { for (String solrUrl : solrUrls) { // delete all previous records HttpSolrServer solrServer = new HttpSolrServer(solrUrl); solrServer.deleteByQuery("*:*"); // optimize here solrServer.optimize(); contribution.getExitStatus().addExitDescription("Cleared: " + solrUrl); solrServer.shutdown(); } return RepeatStatus.FINISHED; }
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { if (ontologiesSolrUrl == null) { throw new NullPointerException("ontologiesSolrUrl is null"); } HttpSolrServer ontologiesSolrServer = createSolrServer(); OntologyIndexer ontologyIndexer = new OntologyIndexer(ontologiesSolrServer); if (taxonomyOntologyMappings != null) { indexUniprotTaxonomy = true; } if (indexUniprotTaxonomy) { if (taxonomyOntologyMappings == null) { ontologyIndexer.indexUniprotTaxonomy(); } else { for (OntologyMapping om : taxonomyOntologyMappings) { ontologyIndexer.indexOntology(new UniprotTaxonomyOntologyIterator(om.getUrl())); } } } ontologyIndexer.indexObo(oboOntologyMappings.toArray(new OntologyMapping[oboOntologyMappings.size()])); long count = countDocs(ontologiesSolrServer); contribution.getExitStatus().addExitDescription("Total docs in index: "+count); ontologiesSolrServer.shutdown(); return RepeatStatus.FINISHED; }