exorciseIndex(result); opts.out.println("OK"); opts.out.println("Wrote new segments file \"" + result.newSegments.getSegmentsFileName() + "\"");
public void execute(Terminal terminal, ShardPath shardPath, Directory indexDirectory, Lock writeLock, PrintStream printStream, boolean verbose) throws IOException { checkCorruptMarkerFileIsPresent(indexDirectory); final CheckIndex.Status status; try (CheckIndex checker = new CheckIndex(indexDirectory, writeLock)) { checker.setChecksumsOnly(true); checker.setInfoStream(printStream, verbose); status = checker.checkIndex(null); if (status.missingSegments == false) { if (status.clean == false) { terminal.println("Writing..."); checker.exorciseIndex(status); terminal.println("OK"); terminal.println("Wrote new segments file \"" + status.segmentsFileName + "\""); } } else { throw new ElasticsearchException("Index is unrecoverable - there are missing segments"); } } }
exorciseIndex(result); opts.out.println("OK"); opts.out.println("Wrote new segments file \"" + result.newSegments.getSegmentsFileName() + "\"");
exorciseIndex(result); opts.out.println("OK"); opts.out.println("Wrote new segments file \"" + result.newSegments.getSegmentsFileName() + "\"");
exorciseIndex(result); opts.out.println("OK"); opts.out.println("Wrote new segments file \"" + result.newSegments.getSegmentsFileName() + "\"");
logger.debug("fixing index, writing new segments file ..."); checkIndex.exorciseIndex(status); if (logger.isDebugEnabled()) { logger.debug("index fixed, wrote new segments file \"{}\"", status.segmentsFileName);
logger.debug("fixing index, writing new segments file ..."); checkIndex.exorciseIndex(status); if (logger.isDebugEnabled()) { logger.debug("index fixed, wrote new segments file \"{}\"", status.segmentsFileName);
public void execute(Terminal terminal, ShardPath shardPath, Directory indexDirectory, Lock writeLock, PrintStream printStream, boolean verbose) throws IOException { checkCorruptMarkerFileIsPresent(indexDirectory); final CheckIndex.Status status; try (CheckIndex checker = new CheckIndex(indexDirectory, writeLock)) { checker.setChecksumsOnly(true); checker.setInfoStream(printStream, verbose); status = checker.checkIndex(null); if (status.missingSegments == false) { if (status.clean == false) { terminal.println("Writing..."); checker.exorciseIndex(status); terminal.println("OK"); terminal.println("Wrote new segments file \"" + status.segmentsFileName + "\""); } } else { throw new ElasticsearchException("Index is unrecoverable - there are missing segments"); } } }
public void execute(Terminal terminal, ShardPath shardPath, Directory indexDirectory, Lock writeLock, PrintStream printStream, boolean verbose) throws IOException { checkCorruptMarkerFileIsPresent(indexDirectory); final CheckIndex.Status status; try (CheckIndex checker = new CheckIndex(indexDirectory, writeLock)) { checker.setChecksumsOnly(true); checker.setInfoStream(printStream, verbose); status = checker.checkIndex(null); if (status.missingSegments == false) { if (status.clean == false) { terminal.println("Writing..."); checker.exorciseIndex(status); terminal.println("OK"); terminal.println("Wrote new segments file \"" + status.segmentsFileName + "\""); } } else { throw new ElasticsearchException("Index is unrecoverable - there are missing segments"); } } }