This is an automated email from the ASF dual-hosted git repository.
psomogyi pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1 by this push:
new 3aa64b1 HBASE-22070 Checking restoreDir in RestoreSnapshotHelper
3aa64b1 is described below
commit 3aa64b12da34df563ef5cb4f6c1e1048febc09f0
Author: chaiwentao <[email protected]>
AuthorDate: Fri Apr 5 23:56:00 2019 +0800
HBASE-22070 Checking restoreDir in RestoreSnapshotHelper
Signed-off-by: Peter Somogyi <[email protected]>
---
.../java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java
index 4ff8985..17dd8c2 100644
---
a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java
+++
b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java
@@ -729,7 +729,7 @@ public class RestoreSnapshotHelper {
throw new IllegalArgumentException("Filesystems for restore directory
and HBase root directory " +
"should be the same");
}
- if (restoreDir.toUri().getPath().startsWith(rootDir.toUri().getPath())) {
+ if (restoreDir.toUri().getPath().startsWith(rootDir.toUri().getPath()
+"/")) {
throw new IllegalArgumentException("Restore directory cannot be a sub
directory of HBase " +
"root directory. RootDir: " + rootDir + ", restoreDir: " +
restoreDir);
}