private void doRollback(SolrServer coreSolrServer, String type) {
   LOGGER.debug("ENTERING: doRollback()");
   try {
     coreSolrServer.rollback();
   } catch (SolrServerException e) {
     LOGGER.info("SolrServerException while doing rollback for persistent type {}", type, e);
   } catch (IOException e) {
     LOGGER.info("IOException while doing rollback for persistent type {}", type, e);
   }
   LOGGER.debug("EXITING: doRollback()");
 }
 protected void rollback(SolrServer solrServer) {
   try {
     solrServer.rollback();
   } catch (SolrServerException e) {
     LOG.info("Exception :", e);
     throw new DocstoreIndexException(e.getMessage());
   } catch (IOException e) {
     LOG.info("Exception :", e);
     throw new DocstoreIndexException(e.getMessage());
   }
 }
Beispiel #3
0
 @AfterClass
 public static void tearDown() throws Exception {
   try {
     if (solr != null) {
       solr.rollback();
     }
   } catch (SolrException e) {
   }
   solrCore.close();
   if (coreContainer != null) {
     coreContainer.shutdown();
   }
   FileUtils.cleanDirectory(new File(solrCore.getDataDir() + "/index"));
   FileUtils.cleanDirectory(new File(solrCore.getDataDir() + "/tlog"));
 }