Class BackupManifest
java.lang.Object
org.apache.hadoop.hbase.backup.impl.BackupManifest
Backup manifest contains all the meta data of a backup image. The manifest info will be bundled
as manifest file together with data. So that each backup image will contain all the info needed
for restore. BackupManifest is a storage container for BackupImage. It is responsible for
storing/reading backup image data and has some additional utility methods.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Backup image, the dependency graph is made up by series of backup images BackupImage contains all the relevant information to restore the backup and is used during restore operation -
Field Summary
Modifier and TypeFieldDescriptionprivate BackupManifest.BackupImage
private static final org.slf4j.Logger
static final String
-
Constructor Summary
ConstructorDescriptionBackupManifest
(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path backupPath) Construct manifest from a backup directory.BackupManifest
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path backupPath) Construct manifest from a backup directory.BackupManifest
(BackupInfo backup) Construct manifest for a ongoing backup.BackupManifest
(BackupInfo backup, TableName table) Construct a table level manifest for a backup of the named table. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add dependent backup image for this backup.Get this backup image.getDependentListByTable
(TableName table) Get the dependent image list for a specific table of this backup in time order from old to new if want to restore to this backup image level.getRestoreDependentList
(boolean reverse) Get the image list of this backup for restore in time order.Get the table set of this image.getType()
void
Set the incremental timestamp map directly.void
store
(org.apache.hadoop.conf.Configuration conf) Persist the manifest file.
-
Field Details
-
LOG
-
MANIFEST_FILE_NAME
- See Also:
-
backupImage
-
-
Constructor Details
-
BackupManifest
Construct manifest for a ongoing backup.- Parameters:
backup
- The ongoing backup info
-
BackupManifest
Construct a table level manifest for a backup of the named table.- Parameters:
backup
- The ongoing backup session info
-
BackupManifest
public BackupManifest(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path backupPath) throws IOException Construct manifest from a backup directory.- Parameters:
conf
- configurationbackupPath
- backup path- Throws:
IOException
- if constructing the manifest from the backup directory fails
-
BackupManifest
public BackupManifest(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path backupPath) throws BackupException Construct manifest from a backup directory.- Parameters:
fs
- the FileSystembackupPath
- backup path- Throws:
BackupException
- exception
-
-
Method Details
-
getType
-
getTableList
Get the table set of this image.- Returns:
- The table set list
-
store
Persist the manifest file.- Throws:
BackupException
- if an error occurred while storing the manifest file.
-
getBackupImage
Get this backup image.- Returns:
- the backup image.
-
addDependentImage
Add dependent backup image for this backup.- Parameters:
image
- The direct dependent backup image
-
setIncrTimestampMap
Set the incremental timestamp map directly.- Parameters:
incrTimestampMap
- timestamp map
-
getIncrTimestampMap
-
getRestoreDependentList
Get the image list of this backup for restore in time order.- Parameters:
reverse
- If true, then output in reverse order, otherwise in time order from old to new- Returns:
- the backup image list for restore in time order
-
getDependentListByTable
Get the dependent image list for a specific table of this backup in time order from old to new if want to restore to this backup image level.- Parameters:
table
- table- Returns:
- the backup image list for a table in time order
-
toBackupInfo
-