Package org.apache.hadoop.hbase.backup
Class HBackupFileSystem
java.lang.Object
org.apache.hadoop.hbase.backup.HBackupFileSystem
View to an on-disk Backup Image FileSytem Provides the set of methods necessary to interact with
the on-disk Backup Image data.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.fs.Path
getBackupPath
(String backupRootDir, String backupId) static org.apache.hadoop.fs.Path
getBackupTmpDirPath
(String backupRootDir) Get backup temporary directorystatic org.apache.hadoop.fs.Path
getBackupTmpDirPathForBackupId
(String backupRoot, String backupId) Get backup tmp directory for backupIdstatic BackupManifest
getManifest
(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path backupRootPath, String backupId) private static org.apache.hadoop.fs.Path
getManifestPath
(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path backupRootPath, String backupId) static String
getTableBackupDir
(String backupRootDir, String backupId, TableName tableName) Given the backup root dir, backup id and the table name, return the backup image location.static org.apache.hadoop.fs.Path
getTableBackupPath
(TableName tableName, org.apache.hadoop.fs.Path backupRootPath, String backupId) Given the backup root dir, backup id and the table name, return the backup image location, which is also where the backup manifest file is.
-
Field Details
-
LOG
-
-
Constructor Details
-
HBackupFileSystem
private HBackupFileSystem()This is utility class.
-
-
Method Details
-
getTableBackupDir
Given the backup root dir, backup id and the table name, return the backup image location. Return value look like: "hdfs://backup.hbase.org:9000/user/biadmin/backup/backup_1396650096738/default/t1_dn/", where "hdfs://backup.hbase.org:9000/user/biadmin/backup" is a backup root directory- Parameters:
backupRootDir
- backup root directorybackupId
- backup idtableName
- table name- Returns:
- backupPath String for the particular table
-
getBackupTmpDirPath
Get backup temporary directory- Parameters:
backupRootDir
- backup root- Returns:
- backup tmp directory path
-
getBackupTmpDirPathForBackupId
public static org.apache.hadoop.fs.Path getBackupTmpDirPathForBackupId(String backupRoot, String backupId) Get backup tmp directory for backupId- Parameters:
backupRoot
- backup rootbackupId
- backup id- Returns:
- backup tmp directory path
-
getBackupPath
-
getTableBackupPath
public static org.apache.hadoop.fs.Path getTableBackupPath(TableName tableName, org.apache.hadoop.fs.Path backupRootPath, String backupId) Given the backup root dir, backup id and the table name, return the backup image location, which is also where the backup manifest file is. return value look like: "hdfs://backup.hbase.org:9000/user/biadmin/backup/backup_1396650096738/default/t1_dn/", where "hdfs://backup.hbase.org:9000/user/biadmin/backup" is a backup root directory- Parameters:
backupRootPath
- backup root pathtableName
- table namebackupId
- backup Id- Returns:
- backupPath for the particular table
-
getManifestPath
private static org.apache.hadoop.fs.Path getManifestPath(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path backupRootPath, String backupId) throws IOException - Throws:
IOException
-
getManifest
public static BackupManifest getManifest(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path backupRootPath, String backupId) throws IOException - Throws:
IOException
-