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

Unsupported FS operations should throw UnsupportedOperationException

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.1
    • 3.0.0-alpha1
    • fs
    • None
    • Incompatible change, Reviewed
    • Unsupported FileSystem operations now throw an UnsupportedOperationException rather than an IOException.

    Description

      In the FileSystem implementation classes, unsupported operations throw new IOException("Not supported"), which makes it needlessly difficult to distinguish an actual error from an unsupported operation. They should instead throw new UnsupportedOperationException().

      It's possible that this anti-idiom is used elsewhere in the code base. This JIRA should include finding and cleaning up those instances as well.

      Attachments

        1. HADOOP-12726.001.patch
          7 kB
          Daniel Templeton
        2. HADOOP-12726.002.patch
          6 kB
          Daniel Templeton
        3. HADOOP-12726.003.patch
          8 kB
          Christopher Douglas

        Issue Links

          Activity

            People

              templedf Daniel Templeton
              templedf Daniel Templeton
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: