|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.regionserver.StoreFile.Writer
public static class StoreFile.Writer
A StoreFile writer. Use this to read/write HBase Store Files. It is package local because it is an implementation detail of the HBase regionserver.
Field Summary | |
---|---|
protected HFile.Writer |
writer
|
Constructor Summary | |
---|---|
StoreFile.Writer(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
int blocksize,
Compression.Algorithm compress,
org.apache.hadoop.conf.Configuration conf,
KeyValue.KVComparator comparator,
StoreFile.BloomType bloomType,
int maxKeys)
Creates an HFile.Writer that also write helpful meta data. |
Method Summary | |
---|---|
void |
append(byte[] key,
byte[] value)
|
void |
append(KeyValue kv)
|
void |
appendFileInfo(byte[] key,
byte[] value)
|
void |
appendMetadata(long maxSequenceId,
boolean majorCompaction)
Writes meta data. |
void |
appendTimeRangeMetadata()
Add TimestampRange to Metadata |
void |
close()
|
org.apache.hadoop.fs.Path |
getPath()
|
void |
includeInTimeRangeTracker(byte[] key)
If the timeRangeTracker is not set, update TimeRangeTracker to include the timestamp of this key |
void |
includeInTimeRangeTracker(KeyValue kv)
If the timeRangeTracker is not set, update TimeRangeTracker to include the timestamp of this key |
void |
setTimeRangeTracker(TimeRangeTracker trt)
Set TimeRangeTracker |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HFile.Writer writer
Constructor Detail |
---|
public StoreFile.Writer(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, int blocksize, Compression.Algorithm compress, org.apache.hadoop.conf.Configuration conf, KeyValue.KVComparator comparator, StoreFile.BloomType bloomType, int maxKeys) throws IOException
fs
- file system to write topath
- file name to createblocksize
- HDFS block sizecompress
- HDFS block compressionconf
- user configurationcomparator
- key comparatorbloomType
- bloom filter settingmaxKeys
- maximum amount of keys to add (for blooms)
IOException
- problem writing to FSMethod Detail |
---|
public void appendMetadata(long maxSequenceId, boolean majorCompaction) throws IOException
close()
since its written as meta data to this file.
maxSequenceId
- Maximum sequence id.majorCompaction
- True if this file is product of a major compaction
IOException
- problem writing to FSpublic void appendTimeRangeMetadata() throws IOException
IOException
public void setTimeRangeTracker(TimeRangeTracker trt)
trt
- public void includeInTimeRangeTracker(KeyValue kv)
kv
-
IOException
public void includeInTimeRangeTracker(byte[] key)
key
-
IOException
public void append(KeyValue kv) throws IOException
IOException
public org.apache.hadoop.fs.Path getPath()
public void append(byte[] key, byte[] value) throws IOException
IOException
public void close() throws IOException
IOException
public void appendFileInfo(byte[] key, byte[] value) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |