@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, maxMemstoreTS
blockEncoder, 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, newBlock
appendFileInfo, checkKey, checkValue, compressionByName, createOutputStream, getPath, toString, writeFileInfo
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(KeyValue kv) throws IOException
append
in interface HFile.Writer
append
in class HFileWriterV2
kv
- KeyValue to add. Cannot be empty nor null.IOException
public void append(byte[] key, byte[] value) throws IOException
append
in interface HFile.Writer
append
in class HFileWriterV2
key
- Key to add. Cannot be empty nor null.value
- Value to add. Cannot be empty nor null.IOException
public void append(byte[] key, byte[] value, byte[] tag) throws IOException
append
in interface HFile.Writer
append
in class HFileWriterV2
key
- 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.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 © 2014 The Apache Software Foundation. All rights reserved.