hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhang...@apache.org
Subject [03/36] hbase git commit: HBASE-20547 Restore from backup will fail if done from a different file system
Date Thu, 17 May 2018 09:34:43 GMT
HBASE-20547 Restore from backup will fail if done from a different file system

Signed-off-by: tedyu <yuzhihong@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6d656b7e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6d656b7e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6d656b7e

Branch: refs/heads/HBASE-19064
Commit: 6d656b7e71e38c32a65026df6196108e6a60ca0a
Parents: 438af9b
Author: Vladimir Rodionov <vrodionov@hortonworks.com>
Authored: Tue May 15 12:10:40 2018 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Wed May 16 09:55:19 2018 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/backup/impl/IncrementalTableBackupClient.java    | 1 +
 .../java/org/apache/hadoop/hbase/backup/util/BackupUtils.java     | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6d656b7e/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java
----------------------------------------------------------------------
diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java
index 8fd6573..43824d7 100644
--- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java
+++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java
@@ -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);

http://git-wip-us.apache.org/repos/asf/hbase/blob/6d656b7e/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java
----------------------------------------------------------------------
diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java
index 96ecab9..e01849a 100644
--- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java
+++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java
@@ -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<>();


Mime
View raw message