Package org.apache.lucene.index

Examples of org.apache.lucene.index.IndexWriter.rollback()


              LOG.error(
                  "Index is corrupted, RowIds are found in wrong shard [{0}/{1}], cancelling index import for [{2}]",
                  shard, table, directory);
            }
            LOG.info("Starting rollback on [{0}/{1}]", shard, table);
            indexWriter.rollback();
            LOG.info("Finished rollback on [{0}/{1}]", shard, table);
            String name = dirPath.getName();
            int lastIndexOf = name.lastIndexOf('.');
            String badRowIdsName = name.substring(0, lastIndexOf) + ".bad_rowids";
            fileSystem.rename(dirPath, new Path(dirPath.getParent(), badRowIdsName));
View Full Code Here


        } catch (Exception e) {

            if (indexWriter != null) {

                try {
                    indexWriter.rollback();

                } catch (Exception e1) {
                    // ignore exception
                }
View Full Code Here

            } catch (Exception e) {

                if (indexWriter != null) {

                    try {
                        indexWriter.rollback();

                    } catch (Exception e1) {
                        // ignore exception
                    }
View Full Code Here

        } catch (Exception e) {

            if (indexWriter != null) {

                try {
                    indexWriter.rollback();

                } catch (Exception e1) {
                    // ignore exception
                }
View Full Code Here

    IndexWriter writer = indexSet.current().writer;
    try {
      if (commit)
        writer.commit();
      else
        writer.rollback();
    } catch (IOException e) {
      throw new RuntimeException(e);
    } finally {
      // Ensure we completely release this lock to other threads.
      while (writeLock.isHeldByCurrentThread())
View Full Code Here

        } catch (Exception e) {

            if (indexWriter != null) {

                try {
                    indexWriter.rollback();

                } catch (Exception e1) {
                    // ignore exception
                }
View Full Code Here

            } catch (Exception e) {

                if (indexWriter != null) {

                    try {
                        indexWriter.rollback();

                    } catch (Exception e1) {
                        // ignore exception
                    }
View Full Code Here

        } catch (Exception e) {

            if (indexWriter != null) {

                try {
                    indexWriter.rollback();

                } catch (Exception e1) {
                    // ignore exception
                }
View Full Code Here

      // If infoStream was set to output to a file, close it.
      InfoStream infoStream = iw.getConfig().getInfoStream();
      if (infoStream != null) {
        infoStream.close();
      }
      iw.rollback();
      getRunData().setIndexWriter(null);
    }
    return 1;
  }
}
View Full Code Here

        try {
            w.forceMerge(1);
        } catch (Exception e) {
            try {
                w.rollback();
            } catch (IOException ex) {
                throw new RuntimeException(ex);
            }

            throw new RuntimeException(e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.