hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-717) Proposal for exceptions thrown by FileContext and Abstract File System
Date Wed, 04 Nov 2009 02:56:32 GMT

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

Tsz Wo (Nicholas), SZE commented on HDFS-717:

- The term FileSystemException is not clear whether it is a system problem or a file system
operation problem.  A better name may be SystemException.  It also allow other systems like
JobTracker to use it.

- It may be better to group FileNotFoundException, FileAlreadyExistsException, etc.  How about
extending FileSystemOperationException?

- I propose to have the following hierarchy:
-* java.io.IOException
-** *java.rmi.RemoteException* --- network/ipc related exception
-** *java.io.InterruptedIOException* --- the client thread is interrupted when it is waiting
for a blocking IO (e.g. waiting for server reply).
-** *SystemException* --- capture system problems, usually, server side problems.
-*** UnsupportedOperationException --- e.g. calling setReplication(..) on LocalFileSystem
-**** ReadOnlyFileSystemException --- e.g. calling create(..) on HftpFileSystem
-*** SystemNotReadyException --- e.g. NameNode/JobTracker is starting up
-*** QuotaExceededException
-*** OutOfSpaceException
-*** UncaughtRuntimeException --- server side uncaught RuntimeException
-** *FileSystemOperationException*
-*** AccessControlException
-*** InvalidPathNameException
-*** FileNotFoundException
-*** FileAlreadyExistsException
-*** DirectoryNotEmptyException
-*** NotDirectoryException
-*** IsDirectoryException

> Proposal for exceptions thrown by FileContext and Abstract File System
> ----------------------------------------------------------------------
>                 Key: HDFS-717
>                 URL: https://issues.apache.org/jira/browse/HDFS-717
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Jitendra Nath Pandey
>            Assignee: Jitendra Nath Pandey
>             Fix For: 0.22.0
> 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.

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

View raw message