Details
Description
The restoreDir shouldn't be a sub directory of rootDir. The code check it with a prefix check "restoreDir.toUri().getPath().startsWith(rootDir.toUri().getPath())". But it goes error in some reasonable cases.
eg: rootDir = hdfs://user/hbase restoreDir = hdfs://user/hbase_restore. So I think it's more reasonable to chang the code to "restoreDir.toUri().getPath().startsWith(rootDir.toUri().getPath() + "/" )".