This one has been doctored to be used in migrations. Private and protecteds have been made public, etc.
Each HStore maintains a bunch of different data files. The filename is a mix of the parent dir, the region name, the column name, and a file identifier. The name may also be a reference to a store file located elsewhere. This class handles all that path-building stuff for you.
An HStoreFile usually tracks 4 things: its parent dir, the region identifier, the column family, and the file identifier. If you know those four things, you know how to obtain the right HStoreFile. HStoreFiles may also reference store files in another region serving either from the top-half of the remote file or from the bottom-half. Such references are made fast splitting regions.
Plain HStoreFiles are named for a randomly generated id as in: 1278437856009925445
A file by this name is made in both the mapfiles
and info
subdirectories of a HStore columnfamily directoy: E.g. If the column family is 'anchor:', then under the region directory there is a subdirectory named 'anchor' within which is a 'mapfiles' and 'info' subdirectory. In each will be found a file named something like 1278437856009925445
, one to hold the data in 'mapfiles' and one under 'info' that holds the sequence id for this store file.
References to store files located over in some other region look like this: 1278437856009925445.hbaserepository,qAReLZD-OyQORZWq_vqR1k==,959247014679548184
: i.e. an id followed by the name of the referenced region. The data ('mapfiles') of HStoreFile references are empty. The accompanying info
file contains the midkey, 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 not splitable if it has instances of store file references (References are cleaned up by compactions).
When merging or splitting HRegions, we might want to modify one of the params for an HStoreFile (effectively moving it elsewhere).
|
|
|
|