This is an automated email from the ASF dual-hosted git repository.
psomogyi pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 3cd835f HBASE-22070 Checking restoreDir in RestoreSnapshotHelper
3cd835f is described below
commit 3cd835fd23a5b6f3a023355addf86381d708ae48
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 0b29b8a..574416e 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
@@ -827,7 +827,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);
}