|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.hfile.AbstractHFileWriter
org.apache.hadoop.hbase.io.hfile.HFileWriterV1
public class HFileWriterV1
Writes version 1 HFiles. Mainly used for testing backwards-compatibilty.
Field Summary | |
---|---|
static String |
BLOOM_FILTER_DATA_KEY
Meta data block name for bloom filter bits. |
Fields inherited from class org.apache.hadoop.hbase.io.hfile.AbstractHFileWriter |
---|
blockSize, cacheConf, closeOutputStream, comparator, compressAlgo, entryCount, fileInfo, firstKeyInBlock, lastKeyBuffer, lastKeyLength, lastKeyOffset, metaData, metaNames, name, outputStream, path, totalKeyLength, totalUncompressedBytes, totalValueLength |
Constructor Summary | |
---|---|
HFileWriterV1(CacheConfig cacheConf,
org.apache.hadoop.fs.FSDataOutputStream outputStream,
int blockSize,
Compression.Algorithm compress,
KeyValue.KeyComparator comparator)
Constructor that takes a stream. |
|
HFileWriterV1(CacheConfig cacheConf,
org.apache.hadoop.fs.FSDataOutputStream outputStream,
int blockSize,
String compressAlgoName,
KeyValue.KeyComparator comparator)
Constructor that takes a stream. |
|
HFileWriterV1(org.apache.hadoop.conf.Configuration conf,
CacheConfig cacheConf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path)
Constructor that uses all defaults for compression and block size. |
|
HFileWriterV1(org.apache.hadoop.conf.Configuration conf,
CacheConfig cacheConf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
int blockSize,
Compression.Algorithm compress,
KeyValue.KeyComparator comparator)
Constructor that takes a path, creates and closes the output stream. |
|
HFileWriterV1(org.apache.hadoop.conf.Configuration conf,
CacheConfig cacheConf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
int blockSize,
String compressAlgoName,
KeyValue.KeyComparator comparator)
Constructor that takes a path, creates and closes the output stream. |
Method Summary | |
---|---|
void |
addBloomFilter(BloomFilterWriter bfw)
Version 1 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. |
Methods inherited from class org.apache.hadoop.hbase.io.hfile.AbstractHFileWriter |
---|
appendFileInfo, checkKey, checkValue, compressionByName, createOutputStream, finishClose, getPath, toString, writeFileInfo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String BLOOM_FILTER_DATA_KEY
Constructor Detail |
---|
public HFileWriterV1(org.apache.hadoop.conf.Configuration conf, CacheConfig cacheConf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException
IOException
public HFileWriterV1(org.apache.hadoop.conf.Configuration conf, CacheConfig cacheConf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, int blockSize, String compressAlgoName, KeyValue.KeyComparator comparator) throws IOException
IOException
public HFileWriterV1(org.apache.hadoop.conf.Configuration conf, CacheConfig cacheConf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, int blockSize, Compression.Algorithm compress, KeyValue.KeyComparator comparator) throws IOException
IOException
public HFileWriterV1(CacheConfig cacheConf, org.apache.hadoop.fs.FSDataOutputStream outputStream, int blockSize, String compressAlgoName, KeyValue.KeyComparator comparator) throws IOException
IOException
public HFileWriterV1(CacheConfig cacheConf, org.apache.hadoop.fs.FSDataOutputStream outputStream, int blockSize, Compression.Algorithm compress, KeyValue.KeyComparator comparator) throws IOException
IOException
Method Detail |
---|
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 addBloomFilter(BloomFilterWriter bfw)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |