hadoop-hdfs-issues mailing list archives

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

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

Sanjay Radia commented on HDFS-717:
-----------------------------------

>> I disagree here. We should unwrap only the ones that are declared in the method signature.
>> RPC/network exceptions should be thrown as RemoteException

>I also considered RemoteException as a container for passing exceptions through RPC. If
the name-node throws an IOException the >DFSClient should unwrap it and throw the original
directly rather than wrapped into the RemoteException. 

At this stage I don't have a  strong opinion on what exception is used as the container across
the wire. I also need to look into how avro is passing exceptions across the wire; will do
so shortly. The RPC layer can be smarter about passing only declared exceptions and converting
others into the remote exception in the RPC layer - I recall doing something like that in
previous lifetime.

If the RemoteException is the wrapper/container then yes client side should unwrap it, but
only unwrap what is declared since these are the only classes available on the client side.
The client side does not have all the Server-side exception classes.
So if the server side throws a internal FooException that extends IOException the client side
can only throw the IOException not the 
FooException.

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


Mime
View raw message