[
https://issues.apache.org/jira/browse/HADOOP-13172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15289646#comment-15289646
]
Steve Loughran commented on HADOOP-13172:
-----------------------------------------
Right. In HADOOP-13130 I Was throwing {{UnsupportedOperationException}}; Chris
flagged up that that would have been a different error than an IOE, which
things often expect to catch, and which all the current impls throw. I'd
forgotten about HADOOP-12726, though I had picked up the same pattern
# we should have an explicit way to distinguish unsupported-ness from any other
IOE.
# In HADOOP-12726, [~templedf] has a patch to move all of the IOEs to
{{UnsupportedOperationException}}
I think it comes down to: what do callers expect the method to throw if its not
there. Most seem to be throwing generic IOEs, which is fundamentally not that
useful in distinguishing "unimplemented" to "not there".
Maybe lets return to that discussion, as it would be where the fs spec would
need clarification too.
> And an UnsupportedFeatureException for Filesystems to throw on unsupported
> operations
> -------------------------------------------------------------------------------------
>
> Key: HADOOP-13172
> URL: https://issues.apache.org/jira/browse/HADOOP-13172
> Project: Hadoop Common
> Issue Type: Improvement
> Components: fs
> Affects Versions: 2.8.0
> Reporter: Steve Loughran
> Priority: Minor
>
> Filesystems which don't support things like append() tend to throw a simple
> IOE, which makes it hard to distinguish "append didn't work for some IO
> problem" and "append isn't implemented".
> If we add a new exception, {{UnsupportedFeatureException}}, make it the
> strict failure mode of such operations if not supported and patch all our
> filesystems to raise it, then at least code has a straightforward check. Same
> for any other unimplemented feature
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]