@InterfaceAudience.Private public class HFileWriterV3 extends HFileWriterV2
HFile writer for version 3.fsBlockWriter, KEY_VALUE_VER_WITH_MEMSTORE, KEY_VALUE_VERSION, lastDataBlockOffset, MAX_MEMSTORE_TS_KEY, maxMemstoreTSblockEncoder, cacheConf, closeOutputStream, comparator, entryCount, fileInfo, firstKeyInBlock, hFileContext, lastKeyBuffer, lastKeyLength, lastKeyOffset, 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(byte[] key,
byte[] value)
Add key/value to file.
|
void |
append(byte[] key,
byte[] value,
byte[] tag)
Add key/value to file.
|
void |
append(KeyValue kv)
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, append, appendMetaBlock, checkBlockBoundary, close, finishInit, getFileContext, newBlockappendFileInfo, checkKey, checkValue, compressionByName, createOutputStream, getPath, toString, writeFileInfopublic 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
IOExceptionpublic void append(KeyValue kv) throws IOException
append in interface HFile.Writerappend in class HFileWriterV2kv - KeyValue to add. Cannot be empty nor null.IOExceptionpublic void append(byte[] key,
byte[] value)
throws IOException
append in interface HFile.Writerappend in class HFileWriterV2key - Key to add. Cannot be empty nor null.value - Value to add. Cannot be empty nor null.IOExceptionpublic void append(byte[] key,
byte[] value,
byte[] tag)
throws IOException
append in interface HFile.Writerappend in class HFileWriterV2key - Key to add. Cannot be empty nor null.value - Value to add. Cannot be empty nor null.tag - Tag t add. Cannot be empty or null.IOExceptionprotected void finishFileInfo()
throws IOException
AbstractHFileWriterfinishFileInfo in class AbstractHFileWriterIOExceptionprotected int getMajorVersion()
getMajorVersion in class HFileWriterV2protected int getMinorVersion()
getMinorVersion in class HFileWriterV2protected void finishClose(FixedFileTrailer trailer) throws IOException
AbstractHFileWriterfinishClose in class AbstractHFileWriterIOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.