public class CompressedSequentialWriter extends SequentialWriter
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CompressedSequentialWriter.CompressedFileWriterMark
Class to hold a mark to the position of the file
|
protected class |
CompressedSequentialWriter.TransactionalProxy |
SequentialWriter.BufferedFileWriterMarkTransactional.AbstractTransactionalbufferOffset, fchannel, lastFlushOffset, runPostFlushbuffer, strictFlushingchannel| Constructor and Description |
|---|
CompressedSequentialWriter(java.io.File file,
java.lang.String offsetsPath,
java.io.File digestFile,
SequentialWriterOption option,
CompressionParams parameters,
MetadataCollector sstableMetadataCollector)
Create CompressedSequentialWriter without digest file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush() |
protected void |
flushData()
Override this method instead of overriding flush()
|
long |
getEstimatedOnDiskBytesWritten()
Get a quick estimation on how many bytes have been written to disk
It should for the most part be exactly the same as getOnDiskFilePointer()
|
long |
getOnDiskFilePointer()
Returns the current file pointer of the underlying on-disk file.
|
DataPosition |
mark() |
CompressionMetadata |
open(long overrideLength) |
void |
resetAndTruncate(DataPosition mark)
Drops all buffered data that's past the limits of our new file mark + buffer capacity, or syncs and truncates
the underlying file to the marked position
|
protected SequentialWriter.TransactionalProxy |
txnProxy() |
abort, close, commit, current, doFlush, finish, getLastFlushOffset, getPath, hasPosition, isOpen, length, position, prepareToCommit, resetBuffer, setPostFlushListener, skipBytes, sync, syncDataOnlyInternal, syncInternal, truncateapplyToChannel, order, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUnsignedVInt, writeUTF, writeVIntnewDefaultChannel, retrieveTemporaryBufferpublic CompressedSequentialWriter(java.io.File file,
java.lang.String offsetsPath,
java.io.File digestFile,
SequentialWriterOption option,
CompressionParams parameters,
MetadataCollector sstableMetadataCollector)
file - File to writeoffsetsPath - File name to write compression metadatadigestFile - File to write digestoption - Write option (buffer size and type will be set the same as compression params)parameters - Compression mparameterssstableMetadataCollector - Metadata collectorpublic long getOnDiskFilePointer()
SequentialWritergetOnDiskFilePointer in class SequentialWriterpublic long getEstimatedOnDiskBytesWritten()
getEstimatedOnDiskBytesWritten in class SequentialWriterpublic void flush()
flush in interface java.io.Flushableflush in class BufferedDataOutputStreamPlusprotected void flushData()
SequentialWriterflushData in class SequentialWriterpublic CompressionMetadata open(long overrideLength)
public DataPosition mark()
mark in class SequentialWriterpublic void resetAndTruncate(DataPosition mark)
SequentialWriterresetAndTruncate in class SequentialWriterprotected SequentialWriter.TransactionalProxy txnProxy()
txnProxy in class SequentialWriterCopyright © 2018 The Apache Software Foundation