hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boris Shkolnik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-303) Make contracts of LocalFileSystem and DistributedFileSystem consistent
Date Wed, 02 Sep 2009 00:17:33 GMT

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

Boris Shkolnik commented on HDFS-303:

I think there are two different problems here. First - systems react differently to same error
(return value vs. Exception). I think we should fix that for sure and I prefer exceptions.
The other one is that the systems treat specific conditions differently (#4 and #5). This
(as Konstantin pointed out) depends a lot on the underlying systems.

Taking this into account and also because each of the fixes may have a lot of collateral changes
(one needs to test against all three projects and also manually verify that the new implementation
won't break anything), I suggest to keep this jira as a base one and create a separate one
for each of the points (same as  HDFS-538).

> Make contracts of LocalFileSystem and DistributedFileSystem consistent
> ----------------------------------------------------------------------
>                 Key: HDFS-303
>                 URL: https://issues.apache.org/jira/browse/HDFS-303
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Tom White
>         Attachments: hadoop-4114.patch, HDFS-303-common-test-case.patch
> There are a number of edge cases that the two file system implementations handle differently.
In particular:
> * When trying to make a directory under an existing file, HDFS throws an IOException
while LocalFileSystem doesn't.
> * The FileSytem#listStatus(Path) method returns null for a non-existent file on HDFS,
while LocalFileSytem returns an empty FileStatus array.
> * When trying to rename a non-existent path, LocalFileSystem throws an IOException, while
HDFS returns false.
> * When renaming a file or directory to a non-existent directory (e.g. /a/b to /c/d, where
/c doesn't exist) LocalFileSystem succeeds (returns true) while HDFS fails (false).
> * When renaming a file (or directory) as an existing file (or directory) LocalFileSystem
succeeds (returns true) while HDFS fails (false).
> We should document the expected behaviour for these cases in FileSystem's javadoc, and
make sure all implementations conform to it.

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

View raw message