hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rakesh R (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2484) checkLease should throw FileNotFoundException when file does not exist
Date Sun, 03 May 2015 13:03:06 GMT

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

Rakesh R commented on HDFS-2484:
--------------------------------

Thanks [~shv] for the details and that makes sense to me. I've attached patch with unit test,
please have a look at it when you get a chance. 

{quote}if (isFileDeleted(file)) {
I don't think this code path is ever triggered except probably when src is deleted while in
a snapshot, which will be inconsistent with the regular case (deletion without a snapshot)
{quote}
Yes, I also feel the same. In my patch I haven't touch this validation part as I'm thinking
this may be written to handle any special case which is unknown to me right now.

> checkLease should throw FileNotFoundException when file does not exist
> ----------------------------------------------------------------------
>
>                 Key: HDFS-2484
>                 URL: https://issues.apache.org/jira/browse/HDFS-2484
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 0.22.0, 2.0.0-alpha
>            Reporter: Konstantin Shvachko
>         Attachments: HDFS-2484.00.patch
>
>
> When file is deleted during its creation {{FSNamesystem.checkLease(String src, String
holder)}} throws {{LeaseExpiredException}}. It would be more informative if it thrown {{FileNotFoundException}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message