hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Homan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HDFS-538) DistributedFileSystem::listStatus incorrectly returns null for empty result sets
Date Fri, 21 May 2010 18:40:17 GMT

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

Jakob Homan updated HDFS-538:
-----------------------------

    Release Note: FileSystem.listStatus() previously returned null for empty or nonexistent
directories; will now return empty array for empty directories and throw FileNotFoundException
for non-existent directory. Client code should be updated for new semantics.  (was: FileSystem.listStatus()
previously returned null for empty or nonexistent directories. It has been changed to throw
FileNotFoundException if the directory does not exist and to return an empty array if the
directory is empty.)

> DistributedFileSystem::listStatus incorrectly returns null for empty result sets
> --------------------------------------------------------------------------------
>
>                 Key: HDFS-538
>                 URL: https://issues.apache.org/jira/browse/HDFS-538
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Jakob Homan
>            Assignee: Jakob Homan
>             Fix For: 0.21.0
>
>         Attachments: HDFS-538.patch
>
>
> Currently the listStatus method returns null if no files match the request.  This differs
from the Checksum/LocalFileSystem implementation, which returns an empty array, and the nontvery-explict
prescription of the FileSystem interface: "{{@return the statuses of the files/directories
in the given patch}}"  It's better to return an empty collection than have to add extra null
checks.  The method should return an empty array.

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