@Override public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor nextURP) { if (this.solrACServer == null) { // Used with embedded Solr AC core; when AC core is deployed on same Solr and 'main index' this.solrACServer = new EmbeddedSolrServer(core.getCoreContainer(), solrAC); } return new AutocompleteUpdateRequestProcessor(solrACServer, fields, copyAsIsFields, separator, nextURP); }
@Override public void inform(SolrCore core) { this.core = core; queryOnlyComponents = new ArrayList<SearchComponent>(); queryOnlyComponents.add(core.getSearchComponent("query")); if (shfInfo == null) { shardHandlerFactory = core.getCoreContainer().getShardHandlerFactory(); } else { shardHandlerFactory = core.createInitInstance(shfInfo, ShardHandlerFactory.class, null, null); core.addCloseHook(new CloseHook() { @Override public void preClose(SolrCore core) { shardHandlerFactory.close(); } @Override public void postClose(SolrCore core) { } }); } }
@Override public void init(DataImporter dataImporter, Map<String, String> params) { super.init(dataImporter, params); zkClient = dataImporter.getCore().getCoreContainer().getZkController().getZkClient(); }
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); } }
boolean zookeeper = false; if (this.core != null && this.core.getCoreContainer().isZooKeeperAware()) { zookeeper = true;
CoreContainer cc = null; if (req.getCore() != null) { cc = req.getCore().getCoreContainer(); isZkAware = cc.isZooKeeperAware();