hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Owen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-16102) FilterFileSystem does not implement getScheme
Date Sat, 16 Feb 2019 15:00:00 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-16102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16770125#comment-16770125

Todd Owen commented on HADOOP-16102:

Alright I see your point. The issue, I think, is that it's difficult to provide a default
implementation of {{getScheme}}, because the correct behavior depends on how subclasses of
FilterFileSystem are implemented. For example, is {{fs}} set when the class is constructed,
or when it is initialized? Is the intention of the subclass to act as a _transparent_ filter
(in which case it makes sense to return the scheme of the underlying FS), or is it meant to
_hide_ the details of the underlying FS? FilterFileSystem itself is not opinionated about
these questions.

Throwing {{UnsupportedOperationException}} may indeed be the only reasonable implementation
for the base class to provide.

So the solution is that subclasses of FilterFileSystem should override {{getScheme}} with
an appropriate implementation.

It might have been useful to make {{getScheme}} an abstract method instead, but it's too late
to change it at this point.

> FilterFileSystem does not implement getScheme
> ---------------------------------------------
>                 Key: HADOOP-16102
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16102
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>            Reporter: Todd Owen
>            Priority: Minor
> Calling {{getScheme}} on a {{FilterFileSystem}} throws {{UnsupportedOperationException}},
which is the default provided by the base class. Instead, it should return the scheme of the
underlying ("filtered") filesystem.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org

View raw message