|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.Reference
public class Reference
A reference to the top or bottom half of a store file. The file referenced lives under a different region. References are made at region split time.
References work with a special half store file type. References know how to write out the reference format in the file system and are whats juggled when references are mixed in with direct store files. The half store file type is used reading the referred to file.
References to store files located over in some other region look like
this in the file system
1278437856009925445.3323223323
:
i.e. an id followed by hash of the referenced region.
Note, a region is itself not splitable if it has instances of store file
references. References are cleaned up by compactions.
Nested Class Summary | |
---|---|
static class |
Reference.Range
For split HStoreFiles, it specifies if the file covers the lower half or the upper half of the key range |
Constructor Summary | |
---|---|
Reference()
Used by serializations. |
|
Reference(byte[] splitRow,
Reference.Range fr)
Constructor |
Method Summary | |
---|---|
Reference.Range |
getFileRegion()
|
byte[] |
getSplitKey()
|
static boolean |
isTopFileRegion(Reference.Range r)
|
static Reference |
read(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p)
Read a Reference from FileSystem. |
void |
readFields(DataInput in)
|
String |
toString()
|
void |
write(DataOutput out)
|
org.apache.hadoop.fs.Path |
write(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Reference(byte[] splitRow, Reference.Range fr)
splitRow
- This is row we are splitting around.fr
- public Reference()
Method Detail |
---|
public Reference.Range getFileRegion()
public byte[] getSplitKey()
public String toString()
toString
in class Object
Object.toString()
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public static boolean isTopFileRegion(Reference.Range r)
public org.apache.hadoop.fs.Path write(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p) throws IOException
IOException
public static Reference read(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p) throws IOException
fs
- p
-
p
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |