[
https://issues.apache.org/jira/browse/HADOOP-12726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Douglas updated HADOOP-12726:
-----------------------------------
Attachment: HADOOP-12726.003.patch
[[email protected]] I checked filesystem.md and it says that
{{FileSystem::append}} MAY throw {{UnsupportedOperationException}}. Assuming
these are RFC2119 defs, should we update {{append}}, {{truncate}}, {{open}} and
{{concat}} to SHOULD throw {{UnsupportedOperationException}} when the
FileSystem does not provide a compliant implementation? Attaching proposed
edits to Daniel's patch.
TestGangliaMetrics passed on my machine, as did the TestRollingFileSystemSink\*
tests, so the failure does seem unrelated.
> Unsupported FS operations should throw UnsupportedOperationException
> --------------------------------------------------------------------
>
> Key: HADOOP-12726
> URL: https://issues.apache.org/jira/browse/HADOOP-12726
> Project: Hadoop Common
> Issue Type: Improvement
> Components: fs
> Affects Versions: 2.7.1
> Reporter: Daniel Templeton
> Assignee: Daniel Templeton
> Attachments: HADOOP-12726.001.patch, HADOOP-12726.002.patch,
> HADOOP-12726.003.patch
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]