hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4525) Provide an API for knowing that whether file is closed or not.
Date Tue, 05 Mar 2013 06:35:13 GMT

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

Uma Maheswara Rao G commented on HDFS-4525:

SreeHari, Thanks a lot for the patch!

- How about some thing like below?
      try {  
      return !INodeFile.valueOf(dir.getINode(src), src).isUnderConstruction();
      } finally {
 I think this is the one Jing also pointing out. Thanks Jing for taking a look at it.

- I think your test code has to be formatted. There are long lines.

- Please follow Hadoop formatting guidelines
 if (!DFSUtil.isValidName(src)) 
   +      throw new IOException("Invalid file name: " + src);
 missing braces.

- All our APIs takes path obj. I think we can take path and use getPathName? SO, you can also
remove the validPath check as getPathName already doing at client side itself.
 if (!DFSUtil.isValidName(src)) 
 +      throw new IOException("Invalid file name: " + src);

> Provide an API for knowing that whether file is closed or not.
> --------------------------------------------------------------
>                 Key: HDFS-4525
>                 URL: https://issues.apache.org/jira/browse/HDFS-4525
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: 3.0.0, 2.0.3-alpha
>            Reporter: Uma Maheswara Rao G
>            Assignee: SreeHari
>         Attachments: HDFS-4525.patch, HDFS-4525.patch
> Currently recoverLease API will return true if file is already closed. Otherwise it will
trigger internalLease recovery and return false. It may take some time to really complete
this recovery and file to be closed completely. So, there is noway for the users to wait correctly
until file is closed completely. 
> It would good if we have one API which says whether that file is closed or not. So, that
users can relay on that proceed further if and only if file is closed completely.
> See the discussion in HBASE-7878

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message