[ 
https://issues.apache.org/jira/browse/HBASE-22070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16803783#comment-16803783
 ] 

Peter Somogyi commented on HBASE-22070:
---------------------------------------

I agree with you [~VincentChoiCN] that this could be a valid use case so this 
fix is needed.

The javac complains can be ignored, it is bug with error prone.
Could you attach a patch with {{git format-patch}} command to have your email 
address in it to give you credit? Could you also fix the whitespace issue from 
checkstyle?

> Checking restoreDir in RestoreSnapshotHelper 
> ---------------------------------------------
>
>                 Key: HBASE-22070
>                 URL: https://issues.apache.org/jira/browse/HBASE-22070
>             Project: HBase
>          Issue Type: Bug
>          Components: snapshots
>    Affects Versions: 2.0.0
>            Reporter: Vincent Choi
>            Assignee: Vincent Choi
>            Priority: Major
>         Attachments: HBASE-22070.patch
>
>
> 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() + "/" )".



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to