public class HFileWriterV1 extends AbstractHFileWriter
Modifier and Type | Field and Description |
---|---|
static String |
BLOOM_FILTER_DATA_KEY
Meta data block name for bloom filter bits.
|
blockEncoder, blockSize, cacheConf, closeOutputStream, comparator, compressAlgo, entryCount, fileInfo, firstKeyInBlock, lastKeyBuffer, lastKeyLength, lastKeyOffset, metaData, metaNames, name, outputStream, path, totalKeyLength, totalUncompressedBytes, totalValueLength
SCHEMA_CONFIGURED_UNALIGNED_HEAP_SIZE
Constructor and Description |
---|
HFileWriterV1(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,
int blockSize,
Compression.Algorithm compress,
HFileDataBlockEncoder blockEncoder,
KeyValue.KeyComparator comparator)
Constructor that takes a path, creates and closes the output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
addDeleteFamilyBloomFilter(BloomFilterWriter bfw)
Store delete family Bloom filter in the file, which is only supported in
HFile V2.
|
void |
addGeneralBloomFilter(BloomFilterWriter bfw)
Version 1 general Bloom filters are stored in two meta blocks with two different
keys.
|
void |
addInlineBlockWriter(InlineBlockWriter bloomWriter)
Adds an inline block writer such as a multi-level block index writer or
a compound Bloom filter writer.
|
void |
append(byte[] key,
byte[] value)
Add key/value to file.
|
void |
append(KeyValue kv)
Add key/value to file.
|
void |
appendMetaBlock(String metaBlockName,
org.apache.hadoop.io.Writable content)
Add a meta block to the end of the file.
|
void |
close() |
protected void |
finishFileInfo()
Add last bits of metadata to file info before it is written out.
|
appendFileInfo, checkKey, checkValue, compressionByName, createOutputStream, finishClose, getPath, toString, writeFileInfo
createUnknown, getColumnFamilyName, getSchemaMetrics, getTableName, heapSize, isSchemaConfigured, passSchemaMetricsTo, resetSchemaMetricsConf, schemaConfAsJSON, schemaConfigurationChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getColumnFamilyName
public static final String BLOOM_FILTER_DATA_KEY
public HFileWriterV1(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, int blockSize, Compression.Algorithm compress, HFileDataBlockEncoder blockEncoder, KeyValue.KeyComparator comparator) throws IOException
IOException
public void appendMetaBlock(String metaBlockName, org.apache.hadoop.io.Writable content)
AbstractHFileWriter.appendFileInfo(byte[], byte[])
metaBlockName
- name of the blockcontent
- will call readFields to get data later (DO NOT REUSE)public void append(KeyValue kv) throws IOException
kv
- KeyValue to add. Cannot be empty nor null.IOException
public void append(byte[] key, byte[] value) throws IOException
key
- Key to add. Cannot be empty nor null.value
- Value to add. Cannot be empty nor null.IOException
public void close() throws IOException
IOException
protected void finishFileInfo() throws IOException
AbstractHFileWriter
finishFileInfo
in class AbstractHFileWriter
IOException
public void addInlineBlockWriter(InlineBlockWriter bloomWriter)
HFile.Writer
public void addGeneralBloomFilter(BloomFilterWriter bfw)
public void addDeleteFamilyBloomFilter(BloomFilterWriter bfw) throws IOException
HFile.Writer
IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.