hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Srinivas (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-5045) Remove deprecated FileSystem.isDirectory()
Date Tue, 27 Jan 2009 23:26:59 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-5045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Suresh Srinivas updated HADOOP-5045:
------------------------------------

    Attachment: 5045.patch

I have attached new patch to incorporate Doug's comments. I have made use of {{FileStatus}}
returned by {{listStatus()}} and removed white space changes.

My comments on suggestions from Nicholas:
*  We should use fs.getFileStatus(src).isDir(), instead of fs.isDirectory(src) , in the cases
that src must exist or the operation must abort. Found these cases in
      o ChecksumFileSystem line 402 and line 499
      o FsShell line 1034 and line 1087

> This cannot be done without further changes. Today all these method return false when
a file does not exist. The methods will throw FileNotFoundException instead of returning false
with this change.

* FsShell.copyFromStdin(..) should use getFileStatus for checking exist and isDir in one shot.
> Again in this case the exception thrown would be different which results in unit testcase
failure.

* In FsShell line 835, srcFs.isDirectory(dst) looks like a bug since it uses srcFs with dst
path.
> Looks like becase the operation is rename the expectation is that both the source and
the destination file systems are of the same type. The code could have been better orgainized
if we had only one filesystem variable in the method instead of two. I have made that change.


> Remove deprecated FileSystem.isDirectory()
> ------------------------------------------
>
>                 Key: HADOOP-5045
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5045
>             Project: Hadoop Core
>          Issue Type: Sub-task
>          Components: fs
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Suresh Srinivas
>         Attachments: 5045.patch, 5045.patch
>
>
> We should remove FileSystem.isDirectory().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message