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

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

Thanks [~shv] for reporting this. I could see {{FSNamesystem#checkLease}} has 
the following checks in branch-2 and trunk, does this validation satisfy your 
case?
.
[FSNamesystem#checkLease 
logic|https://github.com/apache/hadoop/blob/branch-2.7/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java#L3417]
{code}
    if (inode == null) {
      Lease lease = leaseManager.getLease(holder);
      throw new LeaseExpiredException(
          "No lease on " + ident + ": File does not exist. "
          + (lease != null ? lease.toString()
              : "Holder " + holder + " does not have any open files."));
    }
{code}

> 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
>
> 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)

Reply via email to