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

xuzq commented on HDFS-14741:
-----------------------------

Thanks [~ayushtkn] for the comment. Please review [^HDFS-14741-trunk-004.patch].
{quote} __ For FsDataOutputStream we can use try with resources rather than 
handling this much.
{quote}
Because it will be throw IOException("_Commit or complete block 
blk_1073741825_1001, whereas it is under recovery_") when close, and it will be 
throw FileNotFoundException() in the trunk code.

I don't have good idea to identify the two exceptions when use try with 
resources, so i use try with finally and close the FsDataOutputStream and only 
ignore the _complete exception._

> 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, HDFS-14741-trunk-002.patch, 
> HDFS-14741-trunk-003.patch, HDFS-14741-trunk-004.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
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to