Affects Version/s: None
Fix Version/s: 0.21.0
Release Note:Detailed exceptions declared in FileContext and AbstractFileSystem
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.
/* Following exceptions extend IOException */
/* Following exceptions extend FileSystemException */
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.