|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.HFileArchiveUtil
public class HFileArchiveUtil
Helper class for all utilities related to archival/retrieval of HFiles
Method Summary | |
---|---|
static org.apache.hadoop.fs.Path |
getArchivePath(org.apache.hadoop.conf.Configuration conf)
Get the full path to the archive directory on the configured FileSystem |
static org.apache.hadoop.fs.Path |
getRegionArchiveDir(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path tabledir,
org.apache.hadoop.fs.Path regiondir)
Get the archive directory for a given region under the specified table |
static org.apache.hadoop.fs.Path |
getRegionArchiveDir(org.apache.hadoop.fs.Path rootdir,
org.apache.hadoop.fs.Path tabledir,
org.apache.hadoop.fs.Path regiondir)
Get the archive directory for a given region under the specified table |
static org.apache.hadoop.fs.Path |
getStoreArchivePath(org.apache.hadoop.conf.Configuration conf,
HRegion region,
byte[] family)
Get the directory to archive a store directory |
static org.apache.hadoop.fs.Path |
getStoreArchivePath(org.apache.hadoop.conf.Configuration conf,
HRegionInfo region,
org.apache.hadoop.fs.Path tabledir,
byte[] family)
Get the directory to archive a store directory |
static org.apache.hadoop.fs.Path |
getStoreArchivePath(org.apache.hadoop.conf.Configuration conf,
String tableName,
String regionName,
String familyName)
Get the directory to archive a store directory |
static org.apache.hadoop.fs.Path |
getTableArchivePath(org.apache.hadoop.conf.Configuration conf,
String tableName)
Get the path to the table archive directory based on the configured archive directory. |
static org.apache.hadoop.fs.Path |
getTableArchivePath(org.apache.hadoop.fs.Path tabledir)
Get the path to the table archive directory based on the configured archive directory. |
static org.apache.hadoop.fs.Path |
getTableArchivePath(org.apache.hadoop.fs.Path rootdir,
String tableName)
Get the path to the table archive directory based on the configured archive directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.apache.hadoop.fs.Path getStoreArchivePath(org.apache.hadoop.conf.Configuration conf, String tableName, String regionName, String familyName) throws IOException
conf
- Configuration
to read for the archive directory nametableName
- table name under which the store currently livesregionName
- region encoded name under which the store currently livesfamily
- name of the family in the store
Path
to the directory to archive the given store or
null if it should not be archived
IOException
public static org.apache.hadoop.fs.Path getStoreArchivePath(org.apache.hadoop.conf.Configuration conf, HRegion region, byte[] family)
conf
- Configuration
to read for the archive directory nameregion
- parent region information under which the store currently
livesfamily
- name of the family in the store
Path
to the directory to archive the given store or
null if it should not be archivedpublic static org.apache.hadoop.fs.Path getStoreArchivePath(org.apache.hadoop.conf.Configuration conf, HRegionInfo region, org.apache.hadoop.fs.Path tabledir, byte[] family)
conf
- Configuration
to read for the archive directory name. Can be null.region
- parent region information under which the store currently livestabledir
- directory for the table under which the store currently livesfamily
- name of the family in the store
Path
to the directory to archive the given store or null if it should
not be archivedpublic static org.apache.hadoop.fs.Path getRegionArchiveDir(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path tabledir, org.apache.hadoop.fs.Path regiondir)
conf
- Configuration
to read the archive directory from. Can be nulltabledir
- the original table directory. Cannot be null.regiondir
- the path to the region directory. Cannot be null.
Path
to the directory to archive the given region, or null if it
should not be archivedpublic static org.apache.hadoop.fs.Path getRegionArchiveDir(org.apache.hadoop.fs.Path rootdir, org.apache.hadoop.fs.Path tabledir, org.apache.hadoop.fs.Path regiondir)
rootdir
- Path
to the root directory where hbase files are stored (for building
the archive path)tabledir
- the original table directory. Cannot be null.regiondir
- the path to the region directory. Cannot be null.
Path
to the directory to archive the given region, or null if it
should not be archivedpublic static org.apache.hadoop.fs.Path getTableArchivePath(org.apache.hadoop.fs.Path tabledir)
Get the path to the table's archive directory.
Generally of the form: /hbase/.archive/[tablename]
tabledir
- directory of the table to be archived. Cannot be null.
Path
to the archive directory for the tablepublic static org.apache.hadoop.fs.Path getTableArchivePath(org.apache.hadoop.fs.Path rootdir, String tableName)
Get the path to the table's archive directory.
Generally of the form: /hbase/.archive/[tablename]
rootdir
- Path
to the root directory where hbase files are stored (for building
the archive path)tableName
- Name of the table to be archived. Cannot be null.
Path
to the archive directory for the tablepublic static org.apache.hadoop.fs.Path getTableArchivePath(org.apache.hadoop.conf.Configuration conf, String tableName) throws IOException
Assumed that the table should already be archived.
conf
- Configuration
to read the archive directory property. Can be nulltableName
- Name of the table to be archived. Cannot be null.
Path
to the archive directory for the table
IOException
public static org.apache.hadoop.fs.Path getArchivePath(org.apache.hadoop.conf.Configuration conf) throws IOException
FileSystem
conf
- to look for archive directory name and root directory. Cannot be null. Notes for
testing: requires a FileSystem root directory to be specified.
Path
to the archive directory, as defined by the configuration
IOException
- if an unexpected error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |