Class RestoreTablesClient
java.lang.Object
org.apache.hadoop.hbase.backup.impl.RestoreTablesClient
Restore table implementation
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate org.apache.hadoop.conf.Configurationprivate Connectionprivate booleanprivate static final org.slf4j.Loggerprivate org.apache.hadoop.fs.Pathprivate TableName[]private TableName[]
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate voidcheckTargetTables(TableName[] tTableArray, boolean isOverwrite) Validate target tables.voidexecute()private List<org.apache.hadoop.fs.Path>getFilesRecursively(String fileBackupDir) (package private) static longgetTsFromBackupId(String backupId) private voidrestore(HashMap<TableName, BackupManifest> backupManifestMap, TableName[] sTableArray, TableName[] tTableArray, boolean isOverwrite) Restore operation.private voidrestoreImages(BackupManifest.BackupImage[] images, TableName sTable, TableName tTable, boolean truncateIfExists) Restore operation handle each backupImage in array.(package private) static booleanwithinRange(long a, long lower, long upper) 
- 
Field Details- 
LOG
- 
conf
- 
conn
- 
backupId
- 
sTableArray
- 
tTableArray
- 
backupRootDir
- 
restoreRootDir
- 
isOverwrite
 
- 
- 
Constructor Details- 
RestoreTablesClient- Throws:
- IOException
 
 
- 
- 
Method Details- 
checkTargetTablesValidate target tables.- Parameters:
- tTableArray- target tables
- isOverwrite- overwrite existing table
- Throws:
- IOException- exception
 
- 
restoreImagesprivate void restoreImages(BackupManifest.BackupImage[] images, TableName sTable, TableName tTable, boolean truncateIfExists) throws IOException Restore operation handle each backupImage in array.- Parameters:
- images- array BackupImage
- sTable- table to be restored
- tTable- table to be restored to
- truncateIfExists- truncate table
- Throws:
- IOException- exception
 
- 
getFilesRecursivelyprivate List<org.apache.hadoop.fs.Path> getFilesRecursively(String fileBackupDir) throws IllegalArgumentException, IOException - Throws:
- IllegalArgumentException
- IOException
 
- 
restoreprivate void restore(HashMap<TableName, BackupManifest> backupManifestMap, TableName[] sTableArray, TableName[] tTableArray, boolean isOverwrite) throws IOExceptionRestore operation. Stage 2: resolved Backup Image dependency- Parameters:
- backupManifestMap- : tableName, Manifest
- sTableArray- The array of tables to be restored
- tTableArray- The array of mapping tables to restore to
- Throws:
- IOException- exception
 
- 
getTsFromBackupId
- 
withinRange
- 
execute- Throws:
- IOException
 
 
-