@Override public void blockUntilFinished() { super.blockUntilFinished(); synchronized (myLock) { if (currentException != null) { throw new RuntimeException(currentException); } } }
@Override public void blockUntilFinished() { super.blockUntilFinished(); synchronized (myLock) { if (currentException != null) { throw new RuntimeException(currentException); } } }
@Override public void commitTransaction() throws SolrServerException, IOException { LOGGER.trace("commitTransaction"); if (batch.size() > 0) { loadBatch(); } if (numLoadedDocs > 0) { if (client instanceof ConcurrentUpdateSolrClient) { ((ConcurrentUpdateSolrClient) client).blockUntilFinished(); } } }
@Override public void commitTransaction() throws SolrServerException, IOException { LOGGER.trace("commitTransaction"); if (batch.size() > 0) { sendBatch(); } if (numSentItems > 0) { SolrClient s = getNonRetryingSolrServer(); if (s instanceof ConcurrentUpdateSolrClient) { ((ConcurrentUpdateSolrClient) s).blockUntilFinished(); } } }
@Nullable @Override public SolrClient getIndexingSolrServer() throws Exception { SolrClient server = getSolrServer(); if (server instanceof HttpSolrClient) { String url = ((HttpSolrClient) server).getBaseURL(); ConcurrentUpdateSolrClient concurrentUpdateSolrServer = new ConcurrentUpdateSolrClient(url, 1000, Runtime.getRuntime().availableProcessors()); concurrentUpdateSolrServer.setConnectionTimeout(remoteSolrServerConfiguration.getConnectionTimeout()); concurrentUpdateSolrServer.setSoTimeout(remoteSolrServerConfiguration.getSocketTimeout()); concurrentUpdateSolrServer.blockUntilFinished(); server = concurrentUpdateSolrServer; } return server; }
@Nullable @Override public SolrClient getIndexingSolrServer() throws Exception { SolrClient server = getSolrServer(); if (server instanceof HttpSolrClient) { String url = ((HttpSolrClient) server).getBaseURL(); ConcurrentUpdateSolrClient concurrentUpdateSolrServer = new ConcurrentUpdateSolrClient(url, 1000, Runtime.getRuntime().availableProcessors()); concurrentUpdateSolrServer.setConnectionTimeout(remoteSolrServerConfiguration.getConnectionTimeout()); concurrentUpdateSolrServer.setSoTimeout(remoteSolrServerConfiguration.getSocketTimeout()); concurrentUpdateSolrServer.blockUntilFinished(); server = concurrentUpdateSolrServer; } return server; }
&& (req.getDeleteByIdMap() == null || req.getDeleteByIdMap().isEmpty())) { if (req.getDeleteQuery() == null) { blockUntilFinished(); return client.request(request, collection); blockUntilFinished(); return client.request(request, collection); blockUntilFinished(); // empty the queue return client.request(request, collection);
&& (req.getDeleteByIdMap() == null || req.getDeleteByIdMap().isEmpty())) { if (req.getDeleteQuery() == null) { blockUntilFinished(); return client.request(request, collection); blockUntilFinished(); return client.request(request, collection); blockUntilFinished(); // empty the queue return client.request(request, collection);