public class HFileArchiveUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static Path |
getArchivePath(Configuration conf)
Get the full path to the archive directory on the configured
MasterFileSystem |
static Path |
getRegionArchiveDir(Path rootDir,
TableName tableName,
Path regiondir)
Get the archive directory for a given region under the specified table
|
static Path |
getRegionArchiveDir(Path rootDir,
TableName tableName,
String encodedRegionName)
Get the archive directory for a given region under the specified table
|
static Path |
getStoreArchivePath(Configuration conf,
HRegionInfo region,
Path tabledir,
byte[] family)
Get the directory to archive a store directory
|
static Path |
getStoreArchivePath(Configuration conf,
TableName tableName,
String regionName,
String familyName)
Get the directory to archive a store directory
|
static Path |
getTableArchivePath(Configuration conf,
TableName tableName)
Get the path to the table archive directory based on the configured archive directory.
|
static Path |
getTableArchivePath(Path rootdir,
TableName tableName)
Get the path to the table archive directory based on the configured archive directory.
|
static TableName |
getTableName(Path archivePath) |
public static Path getStoreArchivePath(Configuration conf,
TableName 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 livesfamilyName - name of the family in the storePath to the directory to archive the given store or
null if it should not be archivedIOExceptionpublic static Path getStoreArchivePath(Configuration conf,
HRegionInfo region,
Path tabledir,
byte[] family)
throws IOException
conf - Configuration to read for the archive directory name.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 storePath to the directory to archive the given store or null if it should
not be archivedIOExceptionpublic static Path getRegionArchiveDir(Path rootDir,
TableName tableName,
Path regiondir)
tableName - the table name. 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 Path getRegionArchiveDir(Path rootDir,
TableName tableName,
String encodedRegionName)
rootDir - Path to the root directory where hbase files are stored (for building
the archive path)tableName - name of the table to archive. Cannot be null.Path to the directory to archive the given region, or null if it
should not be archivedpublic static Path getTableArchivePath(Path rootdir,
TableName 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 Path getTableArchivePath(Configuration conf,
TableName 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 tableIOExceptionpublic static Path getArchivePath(Configuration conf)
throws IOException
MasterFileSystemconf - 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 configurationIOException - if an unexpected error occurspublic static TableName getTableName(Path archivePath)