@InterfaceAudience.Private public class HFileWriterV3 extends HFileWriterV2
HFile
writer for version 3.Modifier and Type | Class and Description |
---|---|
(package private) static class |
HFileWriterV3.WriterFactoryV3 |
HFileWriterV2.WriterFactoryV2
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
LOG |
private int |
maxTagsLength |
fsBlockWriter, KEY_VALUE_VER_WITH_MEMSTORE, KEY_VALUE_VERSION, lastDataBlockOffset, MAX_MEMSTORE_TS_KEY, maxMemstoreTS
blockEncoder, cacheConf, closeOutputStream, comparator, entryCount, fileInfo, firstCellInBlock, hFileContext, lastCell, metaData, metaNames, name, outputStream, path, totalKeyLength, totalUncompressedBytes, totalValueLength
Constructor and Description |
---|
HFileWriterV3(org.apache.hadoop.conf.Configuration conf,
CacheConfig cacheConf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.FSDataOutputStream ostream,
KeyValue.KVComparator comparator,
HFileContext fileContext)
Constructor that takes a path, creates and closes the output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
append(Cell cell)
Add key/value to file.
|
protected void |
finishClose(FixedFileTrailer trailer)
Sets remaining trailer fields, writes the trailer to disk, and optionally
closes the output stream.
|
protected void |
finishFileInfo()
Add last bits of metadata to file info before it is written out.
|
protected int |
getMajorVersion() |
protected int |
getMinorVersion() |
addDeleteFamilyBloomFilter, addGeneralBloomFilter, addInlineBlockWriter, appendMetaBlock, checkBlockBoundary, close, finishInit, getFileContext, newBlock
appendFileInfo, checkKey, checkValue, compressionByName, createOutputStream, getPath, toString, writeFileInfo
private static final org.apache.commons.logging.Log LOG
private int maxTagsLength
public HFileWriterV3(org.apache.hadoop.conf.Configuration conf, CacheConfig cacheConf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FSDataOutputStream ostream, KeyValue.KVComparator comparator, HFileContext fileContext) throws IOException
IOException
public void append(Cell cell) throws IOException
append
in interface HFile.Writer
append
in class HFileWriterV2
cell
- Cell to add. Cannot be empty nor null.IOException
protected void finishFileInfo() throws IOException
AbstractHFileWriter
finishFileInfo
in class AbstractHFileWriter
IOException
protected int getMajorVersion()
getMajorVersion
in class HFileWriterV2
protected int getMinorVersion()
getMinorVersion
in class HFileWriterV2
protected void finishClose(FixedFileTrailer trailer) throws IOException
AbstractHFileWriter
finishClose
in class AbstractHFileWriter
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.