HBASE-20547 Restore from backup will fail if done from a different file system
Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
parent
438af9bf74
commit
6d656b7e71
|
@ -361,6 +361,7 @@ public class IncrementalTableBackupClient extends TableBackupClient {
|
|||
protected void deleteBulkLoadDirectory() throws IOException {
|
||||
// delete original bulk load directory on method exit
|
||||
Path path = getBulkOutputDir();
|
||||
FileSystem fs = FileSystem.get(path.toUri(), conf);
|
||||
boolean result = fs.delete(path, true);
|
||||
if (!result) {
|
||||
LOG.warn("Could not delete " + path);
|
||||
|
|
|
@ -563,7 +563,8 @@ public final class BackupUtils {
|
|||
private static List<BackupInfo> getHistory(Configuration conf, Path backupRootPath)
|
||||
throws IOException {
|
||||
// Get all (n) history from backup root destination
|
||||
FileSystem fs = FileSystem.get(conf);
|
||||
|
||||
FileSystem fs = FileSystem.get(backupRootPath.toUri(), conf);
|
||||
RemoteIterator<LocatedFileStatus> it = fs.listLocatedStatus(backupRootPath);
|
||||
|
||||
List<BackupInfo> infos = new ArrayList<>();
|
||||
|
|
Loading…
Reference in New Issue