[
https://issues.apache.org/jira/browse/HDFS-2484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14528895#comment-14528895
]
Konstantin Shvachko commented on HDFS-2484:
-------------------------------------------
Hey Rakesh, your change looks good to me.
- One improvement would be to move your test case under one of the existing
tests rather than adding a new {{testLeaseWhenFileDoesntExists()}}. E.g., add
the {{hflush()}} check at the end of {{testLease()}} after the directory is
deleted. This will avoid re-spinning mini-cluster yet another time.
> 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
> Assignee: Rakesh R
> Labels: BB2015-05-RFC
> Attachments: HDFS-2484.00.patch, HDFS-2484.01.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)