Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-6537

Proposal for exceptions thrown by FileContext and Abstract File System

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: None
    • Labels:
      None
    • Release Note:
      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

        1. hdfs-717.patch
          74 kB
          Suresh Srinivas
        2. hdfs-717.patch
          77 kB
          Suresh Srinivas
        3. hdfs-717.1.patch
          64 kB
          Suresh Srinivas
        4. hdfs-717.2.patch
          7 kB
          Suresh Srinivas
        5. hdfs-717.3.patch
          99 kB
          Suresh Srinivas
        6. hdfs-717.4.patch
          104 kB
          Suresh Srinivas

          Issue Links

            Activity

              People

              • Assignee:
                sureshms Suresh Srinivas
                Reporter:
                jnp Jitendra Nath Pandey
              • Votes:
                0 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: