Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.20.1, 0.20.2
-
None
-
None
-
Incompatible change, Reviewed
-
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.
Description
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.
Attachments
Attachments
Issue Links
- is blocked by
-
HADOOP-6201 FileSystem::ListStatus should throw FileNotFoundException
- Closed
- is depended upon by
-
MAPREDUCE-895 FileSystem::ListStatus will now throw FileNotFoundException, MapRed needs updated
- Closed
- is part of
-
HDFS-303 Make contracts of LocalFileSystem and DistributedFileSystem consistent
- Resolved
- is related to
-
HDFS-568 TestServiceLevelAuthorization fails on latest build in Hudson
- Closed
-
HADOOP-7352 FileSystem#listStatus should throw IOE upon access error
- Resolved
- relates to
-
HIVE-1893 ConditionalResolverSkewJoin.getTasks may throw NullPointerException
- Open
-
HADOOP-3716 KFS listStatus() returns NULL on empty directories
- Closed