Package org.apache.hadoop.hbase.io
Class Reference
java.lang.Object
org.apache.hadoop.hbase.io.Reference
A reference to the top or bottom half of a store file where 'bottom' is the first half of the
 file containing the keys that sort lowest and 'top' is the second half of the file with keys that
 sort greater than those of the bottom half. 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 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.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescription(package private) static enumFor split HStoreFiles, it specifies if the file covers the lower half or the upper half of the key range
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionDeprecated.need by pb serializationReference(byte[] splitRow, Reference.Range fr) Constructor
- 
Method SummaryModifier and TypeMethodDescriptionorg.apache.hadoop.hbase.shaded.protobuf.generated.FSProtos.Referenceconvert()static Referenceconvert(org.apache.hadoop.hbase.shaded.protobuf.generated.FSProtos.Reference r) static ReferencecreateBottomReference(byte[] splitRow) Returns AReferencethat points at the bottom half of a an hfilestatic ReferencecreateTopReference(byte[] splitRow) Returns AReferencethat points at top half of a an hfilebooleanbyte[]inthashCode()static booleanvoidreadFields(DataInput in) Deprecated.Writables are going away.byte[]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).toString()org.apache.hadoop.fs.Pathwrite(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p) 
- 
Field Details- 
splitkey
- 
region
 
- 
- 
Constructor Details- 
ReferenceReference(byte[] splitRow, Reference.Range fr) Constructor- Parameters:
- splitRow- This is row we are splitting around.
 
- 
ReferenceDeprecated.need by pb serializationUsed by serializations.
 
- 
- 
Method Details- 
createTopReferenceReturns AReferencethat points at top half of a an hfile
- 
createBottomReferenceReturns AReferencethat points at the bottom half of a an hfile
- 
getFileRegion
- 
getSplitKey
- 
toString
- 
isTopFileRegion
- 
readFieldsDeprecated.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.- Throws:
- IOException
 
- 
writepublic org.apache.hadoop.fs.Path write(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path p) throws IOException - Throws:
- IOException
 
- 
convert
- 
convert
- 
toByteArrayUse 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).- Returns:
- This instance serialized as a delimited protobuf w/ a magic pb prefix.
- Throws:
- IOException
 
- 
hashCode
- 
equals
 
-