public class LevelDbOutputWriter extends ForwardingOutputWriter<ByteBuffer>
LevelDbInputReader
.
If you want to read about the format spec it is here:
"https://github.com/google/leveldb/"
This implementation deviates from the specification above, in that it allows blocks to be zero
padded regardless of how much data is in the block, rather than only if the block is within 6
bytes of full.Constructor and Description |
---|
LevelDbOutputWriter(OutputWriter<ByteBuffer> delegate) |
Modifier and Type | Method and Description |
---|---|
void |
beginSlice()
Prepares the writer for writing after possibly having gone through
serialization or deserialization.
|
void |
endShard()
Closes the OutputChannel.
|
void |
endSlice()
Prepares the writer for possible serialization.
|
protected OutputWriter<ByteBuffer> |
getDelegate() |
protected int |
getNumBlocksWritten() |
void |
write(ByteBuffer data)
Writes a value to the output.
|
allowSliceRetry, beginShard, estimateMemoryRequirement, getContext, setContext
cleanup, close, open
public LevelDbOutputWriter(OutputWriter<ByteBuffer> delegate)
public void beginSlice() throws IOException
OutputWriter
beginSlice
in class ForwardingOutputWriter<ByteBuffer>
IOException
- in the event of failurepublic void endSlice() throws IOException
OutputWriter
endSlice
in class ForwardingOutputWriter<ByteBuffer>
IOException
- in the event of failurepublic void write(ByteBuffer data) throws IOException
OutputWriter
write
in class OutputWriter<ByteBuffer>
IOException
public void endShard() throws IOException
endShard
in class ForwardingOutputWriter<ByteBuffer>
IOException
protected OutputWriter<ByteBuffer> getDelegate()
getDelegate
in class ForwardingOutputWriter<ByteBuffer>
protected int getNumBlocksWritten()
Copyright © 2015 Google. All rights reserved.