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

Unsupported FS operations should throw UnsupportedOperationException

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.1
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      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.003.patch
          8 kB
          Chris Douglas
        2. HADOOP-12726.002.patch
          6 kB
          Daniel Templeton
        3. HADOOP-12726.001.patch
          7 kB
          Daniel Templeton

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: