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

Ayush Saxena commented on HDFS-14741:
-------------------------------------

Thanx [~xuzq_zander] for the patch, fix LGTM.
I guess for the test you can use the existing mount entries only, add a file 
and delete it in the finnally, there are two mount entries / pointing to ns0-/ 
and ns1-/ and /same pointing to ns0-/ and /target-ns0-/


{code:java}
247         RouterContext rc = getRouterContext();
248         DistributedFileSystem routerFs =
249             (DistributedFileSystem) rc.getFileSystem();
{code}

Can use {{DistributedFileSystem routerFs = (DistributedFileSystem) 
getRouterFileSystem();}}

For FsDataOutputStream we can use try with resources rather than handling this 
much.

> RBF: RecoverLease should be return false when the file is open in multiple 
> destination
> --------------------------------------------------------------------------------------
>
>                 Key: HDFS-14741
>                 URL: https://issues.apache.org/jira/browse/HDFS-14741
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: rbf
>            Reporter: xuzq
>            Assignee: xuzq
>            Priority: Major
>         Attachments: HDFS-14741-trunk-001.patch
>
>
> RecoverLease should be return false when the file is open or be writing in 
> multiple destinations.
> Liks this:
> Mount point has multiple destination(ns0 and ns1).
> And the file is in ns0 but it is be writing, ns1 doesn't has this file.
> In this case *recoverLease* should return false instead of throw 
> FileNotFoundException.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to