|
||||||||||
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
public class HFile
File format for hbase. A file of sorted key/value pairs. Both keys and values are byte arrays.
The memory footprint of a HFile includes the following (below is taken from the TFile documentation but applies also to HFile):
File is made of data blocks followed by meta data blocks (if any), a fileinfo block, data block index, meta data block index, and a fixed size trailer which records the offsets at which file changes content type.
<data blocks><meta blocks><fileinfo><data index><meta index><trailer>Each block has a bit of magic at its start. Block are comprised of key/values. In data blocks, they are both byte arrays. Metadata blocks are a String key and a byte array value. An empty file looks like this:
<fileinfo><trailer>. That is, there are not data nor meta blocks present.
TODO: Do scanners need to be able to take a start and end row? TODO: Should BlockIndex know the name of its file? Should it have a Path that points at its file say for the case where an index lives apart from an HFile instance?
Nested Class Summary | |
---|---|
static class |
HFile.Reader
HFile Reader. |
static class |
HFile.Writer
HFile Writer. |
Field Summary | |
---|---|
static int |
DEFAULT_BLOCKSIZE
Default blocksize for hfile. |
static String |
DEFAULT_COMPRESSION
Default compression name: none. |
static Compression.Algorithm |
DEFAULT_COMPRESSION_ALGORITHM
Default compression: none. |
static int |
MAXIMUM_KEY_LENGTH
Maximum length of key in HFile. |
Constructor Summary | |
---|---|
HFile()
|
Method Summary | |
---|---|
static long |
getReadOps()
|
static long |
getReadTime()
|
static String[] |
getSupportedCompressionAlgorithms()
Get names of supported compression algorithms. |
static long |
getWriteOps()
|
static long |
getWriteTime()
|
static boolean |
isReservedFileInfoKey(byte[] key)
Return true if the given file info key is reserved for internal use by HFile. |
static void |
main(String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAXIMUM_KEY_LENGTH
public static final int DEFAULT_BLOCKSIZE
public static final Compression.Algorithm DEFAULT_COMPRESSION_ALGORITHM
public static final String DEFAULT_COMPRESSION
Constructor Detail |
---|
public HFile()
Method Detail |
---|
public static final long getReadOps()
public static final long getReadTime()
public static final long getWriteOps()
public static final long getWriteTime()
public static boolean isReservedFileInfoKey(byte[] key)
public static String[] getSupportedCompressionAlgorithms()
public static void main(String[] args) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |