@InterfaceAudience.Private public class Reference extends Object
References work with a special half store file type. References know how to write out the reference format in the file system and are what is 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 splittable if it has instances of store file references.
References are cleaned up by compactions.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Reference.Range
For split HStoreFiles, it specifies if the file covers the lower half or the upper half of the
key range
|
Modifier and Type | Field and Description |
---|---|
private Reference.Range |
region |
private byte[] |
splitkey |
Constructor and Description |
---|
Reference()
Deprecated.
need by pb serialization
|
Reference(byte[] splitRow,
Reference.Range fr)
Constructor
|
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.hbase.shaded.protobuf.generated.FSProtos.Reference |
convert() |
static Reference |
convert(org.apache.hadoop.hbase.shaded.protobuf.generated.FSProtos.Reference r) |
static Reference |
createBottomReference(byte[] splitRow)
n * @return A
Reference that points at the bottom half of a an hfile |
static Reference |
createTopReference(byte[] splitRow)
n * @return A
Reference that points at top half of a an hfile |
boolean |
equals(Object o) |
Reference.Range |
getFileRegion()
n
|
byte[] |
getSplitKey()
n
|
int |
hashCode() |
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)
Deprecated.
Writables are going away. Use the pb serialization methods instead. Remove in a
release after 0.96 goes out. This is here only to migrate old Reference files
written with Writables before 0.96.
|
(package private) byte[] |
toByteArray()
Use this when writing to a stream and you want to use the pb mergeDelimitedFrom (w/o the
delimiter, pb reads to EOF which may not be what you want).
|
String |
toString() |
org.apache.hadoop.fs.Path |
write(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p) |
private byte[] splitkey
private Reference.Range region
Reference(byte[] splitRow, Reference.Range fr)
splitRow
- This is row we are splitting around. n@Deprecated public Reference()
public static Reference createTopReference(byte[] splitRow)
Reference
that points at top half of a an hfilepublic static Reference createBottomReference(byte[] splitRow)
Reference
that points at the bottom half of a an hfilepublic Reference.Range getFileRegion()
public byte[] getSplitKey()
public String toString()
toString
in class Object
Object.toString()
public static boolean isTopFileRegion(Reference.Range r)
@Deprecated public void readFields(DataInput in) throws IOException
IOException
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
p
nIOException
public org.apache.hadoop.hbase.shaded.protobuf.generated.FSProtos.Reference convert()
public static Reference convert(org.apache.hadoop.hbase.shaded.protobuf.generated.FSProtos.Reference r)
byte[] toByteArray() throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.