|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.hfile.HFile.Writer
public static class HFile.Writer
HFile Writer.
Field Summary | |
---|---|
protected String |
name
|
Constructor Summary | |
---|---|
HFile.Writer(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path)
Constructor that uses all defaults for compression and block size. |
|
HFile.Writer(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. |
|
HFile.Writer(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
int blocksize,
String compress,
KeyValue.KeyComparator comparator)
Constructor that takes a Path. |
|
HFile.Writer(org.apache.hadoop.fs.FSDataOutputStream ostream,
int blocksize,
Compression.Algorithm compress,
KeyValue.KeyComparator c)
Constructor that takes a stream. |
|
HFile.Writer(org.apache.hadoop.fs.FSDataOutputStream ostream,
int blocksize,
String compress,
KeyValue.KeyComparator c)
Constructor that takes a stream. |
Method Summary | |
---|---|
void |
append(byte[] key,
byte[] value)
Add key/value to file. |
void |
append(KeyValue kv)
Add key/value to file. |
void |
appendFileInfo(byte[] k,
byte[] v)
Add to the file info. |
void |
appendMetaBlock(String metaBlockName,
org.apache.hadoop.io.Writable content)
Add a meta block to the end of the file. |
void |
close()
|
org.apache.hadoop.fs.Path |
getPath()
|
long |
getTotalBytes()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String name
Constructor Detail |
---|
public HFile.Writer(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException
fs
- path
-
IOException
public HFile.Writer(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, int blocksize, String compress, KeyValue.KeyComparator comparator) throws IOException
fs
- path
- blocksize
- compress
- comparator
-
IOException
IOException
public HFile.Writer(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, int blocksize, Compression.Algorithm compress, KeyValue.KeyComparator comparator) throws IOException
fs
- path
- blocksize
- compress
- comparator
-
IOException
public HFile.Writer(org.apache.hadoop.fs.FSDataOutputStream ostream, int blocksize, String compress, KeyValue.KeyComparator c) throws IOException
ostream
- Stream to use.blocksize
- compress
- c
- RawComparator to use.
IOException
public HFile.Writer(org.apache.hadoop.fs.FSDataOutputStream ostream, int blocksize, Compression.Algorithm compress, KeyValue.KeyComparator c) throws IOException
ostream
- Stream to use.blocksize
- compress
- c
-
IOException
Method Detail |
---|
public void appendMetaBlock(String metaBlockName, org.apache.hadoop.io.Writable content)
appendFileInfo(byte[], byte[])
metaBlockName
- name of the blockcontent
- will call readFields to get data later (DO NOT REUSE)public void appendFileInfo(byte[] k, byte[] v) throws IOException
HFile.Reader.loadFileInfo()
.
k
- Keyv
- Value
IOException
public org.apache.hadoop.fs.Path getPath()
public String toString()
toString
in class Object
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 long getTotalBytes()
public void close() throws IOException
close
in interface Closeable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |