hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jitendra Nath Pandey (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-717) Proposal for exceptions thrown by FileContext and Abstract File System
Date Tue, 03 Nov 2009 00:50:59 GMT

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

Jitendra Nath Pandey commented on HDFS-717:
-------------------------------------------

> Is FileSystemException a subclass of IOException?
   Yes FileSystemException is a subclass of IOException.

> Add UnsupportedOperationException as a subclass of FileSystemException.
   I agree to add this one.

> Throw java.io.InterruptedIOException instead of InterruptedException.
   We thought of InterruptedException to capture interrupts to any thread and not just threads
busy with IO.
     
> why we have two different sub-types of exceptions?

FileSystemException is thrown when FS is in such a state that the requested operation cannot
proceed for example if filesystem is in safemode, we can throw FileSystemNotReadyException
which is a subtype of FileSystemException. The other IOExceptions are thrown when there are
inconsistencies in the user inputs and operation cannot succees for example creating a file
that already exists.

> If it is java.nio.file.FileSystemException then it will appear only in java 7.
  FileSystemException is inspired by java.nio.file.FileSystemException but we will implement
it because it is not in java 6.


> What is IsDirectoryException? Sounds more like a method name.
  IsDirectoryException is inspired by Unix error code EISDIR, which means that expected input
was a file but a directory is being passed. We can rename it to DirectoryNotAllowedException.

> Should QuotaExceededException be a subclass of IOException, same as AccessDeniedException?
  All the exceptions except Interrupted exceptions are subclasses of IOException.

> Do you plan to unwrap ALL RemoteExceptions in DFSClient?
  Yes all these exceptions will be unwrapped. But that implementation is not part of this
jira.
  

  
  


> 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