Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Detailed exceptions declared in FileContext and AbstractFileSystem
Description
Currently the APIs in FileContext throw only IOException. Going forward these APIs will throw more specific exceptions.
This jira proposes following hierarchy of exceptions to be thrown by FileContext and AFS (Abstract File System) classes.
InterruptedException (java.lang.InterruptedException)
IOException
/* Following exceptions extend IOException */
FileNotFoundException
FileAlreadyExistsException
DirectoryNotEmptyException
NotDirectoryException
AccessDeniedException
IsDirectoryException
InvalidPathNameException
FileSystemException
/* Following exceptions extend FileSystemException */
FileSystemNotReadyException
ReadOnlyFileSystemException
QuotaExceededException
OutOfSpaceException
RemoteException (java.rmi.RemoteException)
Most of the IOExceptions above are caused by invalid user input, while FileSystemException is thrown when FS is in such a state that the requested operation cannot proceed.
Please note that the proposed RemoteException is from standard java rmi package, which also extends IOException.
HDFS throws many exceptions which are not in the above list. The DFSClient will unwrap the exceptions thrown by HDFS, and any exception not in the above list will be thrown as IOException or FileSystemException.
Attachments
Attachments
Issue Links
- blocks
-
HADOOP-6595 Add FileContext API tests for checking exceptions
- Open
- is duplicated by
-
HADOOP-6361 Specific Exceptions thrown by FileContext and AbstractFileSystem
- Resolved
- is related to
-
HDFS-1079 HDFS implementation should throw exceptions defined in AbstractFileSystem
- Closed
- relates to
-
HDFS-1151 HDFS should throw HadoopIllegalArgumentException instead of IllegalArgumentException
- Open