@Override public String toString() { return "CommitLogSegment(" + getPath() + ')'; }
@Override public String toString() { return "CommitLogSegment(" + getPath() + ')'; }
@Override public String toString() { return "CommitLogSegment(" + getPath() + ')'; }
@Override public String toString() { return "CommitLogSegment(" + getPath() + ')'; }
/** * Close the segment file. Do not call from outside this class, use syncAndClose() instead. */ protected void internalClose() { try { channel.close(); buffer = null; } catch (IOException e) { throw new FSWriteError(e, getPath()); } }
protected void runMayThrow() throws IOException { segment.waitForFinalSync(); String command = NAME.matcher(archiveCommand).replaceAll(Matcher.quoteReplacement(segment.getName())); command = PATH.matcher(command).replaceAll(Matcher.quoteReplacement(segment.getPath())); exec(command); } }));
protected void runMayThrow() throws IOException { segment.waitForFinalSync(); String command = NAME.matcher(archiveCommand).replaceAll(Matcher.quoteReplacement(segment.getName())); command = PATH.matcher(command).replaceAll(Matcher.quoteReplacement(segment.getPath())); exec(command); } }));
/** * Close the segment file. Do not call from outside this class, use syncAndClose() instead. */ protected void internalClose() { try { channel.close(); buffer = null; } catch (IOException e) { throw new FSWriteError(e, getPath()); } }
protected void runMayThrow() throws IOException { segment.waitForFinalSync(); String command = NAME.matcher(archiveCommand).replaceAll(Matcher.quoteReplacement(segment.getName())); command = PATH.matcher(command).replaceAll(Matcher.quoteReplacement(segment.getPath())); exec(command); } }));
/** * Close the segment file. Do not call from outside this class, use syncAndClose() instead. */ protected void internalClose() { try { channel.close(); buffer = null; } catch (IOException e) { throw new FSWriteError(e, getPath()); } }
protected void runMayThrow() throws IOException { segment.waitForFinalSync(); String command = archiveCommand.replace("%name", segment.getName()); command = command.replace("%path", segment.getPath()); exec(command); } }));
void internalClose() { try { if (FileUtils.isCleanerAvailable()) FileUtils.clean(buffer); logFileAccessor.close(); } catch (IOException e) { throw new FSWriteError(e, getPath()); } }
/** * Recycle processes an unneeded segment file for reuse. * * @return a new CommitLogSegment representing the newly reusable segment. */ CommitLogSegment recycle() { try { sync(); } catch (FSWriteError e) { logger.error("I/O error flushing {} {}", this, e.getMessage()); throw e; } close(); return new CommitLogSegment(getPath()); }
throw new FSWriteError(e, alloc.getSegment().getPath());
throw new FSWriteError(e, getPath());