public static class HFileBlock.Writer extends Object
HFile
block writer. The intended usage pattern
is as follows:
HFileBlock.Writer
, providing a compression algorithm.
startWriting(org.apache.hadoop.hbase.io.hfile.BlockType)
and get a data stream to write to.
Constructor and Description |
---|
HFileBlock.Writer(HFileDataBlockEncoder dataBlockEncoder,
HFileContext fileContext) |
Modifier and Type | Method and Description |
---|---|
int |
encodedBlockSizeWritten()
Returns the number of bytes written into the current block so far, or
zero if not writing the block at the moment.
|
protected void |
finishBlockAndWriteHeaderAndData(DataOutputStream out)
Writes the header and the compressed data of this block (or uncompressed
data when not using compression) into the given stream.
|
public HFileBlock.Writer(HFileDataBlockEncoder dataBlockEncoder, HFileContext fileContext)
dataBlockEncoder
- data block encoding algorithm to useprotected void finishBlockAndWriteHeaderAndData(DataOutputStream out) throws IOException
out
- the output stream to write theIOException
public int encodedBlockSizeWritten()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.