org.apache.hadoop.hbase.migration.nineteen.io
Class Reference
java.lang.Object
org.apache.hadoop.hbase.migration.nineteen.io.Reference
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
public class Reference
- extends Object
- implements org.apache.hadoop.io.Writable
A reference to a part of a store file. The file referenced usually lives
under a different region. The part referenced is usually the top or bottom
half of the file. References are made at region split time. Being lazy
about copying data between the parent of the split and the split daughters
makes splitting faster.
References work with HalfMapFileReader
. 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
HalfMapFileReader
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.hbaserepository,qAReLZD-OyQORZWq_vqR1k==,959247014679548184
:
i.e. an id followed by the name of the referenced region. The data
('mapfiles') of references are empty. The accompanying info
file
contains the midkey
that demarks top and bottom of the
referenced storefile, the id of the remote store we're referencing and
whether we're to serve the top or bottom region of the remote store file.
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 |
Reference
public Reference(int ern,
long fid,
HStoreKey m,
Reference.Range fr)
Reference
public Reference()
getFileId
public long getFileId()
getFileRegion
public Reference.Range getFileRegion()
getMidkey
public HStoreKey getMidkey()
getEncodedRegionName
public int getEncodedRegionName()
toString
public String toString()
- Overrides:
toString
in class Object
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
isTopFileRegion
public static boolean isTopFileRegion(Reference.Range r)
Copyright © 2009 The Apache Software Foundation