[
https://issues.apache.org/jira/browse/HADOOP-11527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15552428#comment-15552428
]
Chris Nauroth commented on HADOOP-11527:
----------------------------------------
In a comment on HADOOP-13323, [[email protected]] suggested that we introduce
a layer of indirection in our service loading, so that reporting of certain
kinds of errors (e.g. classpath problems) can be delayed to the time of actual
usage of the file system. I'd like us to consider that within the scope of
this JIRA.
Here is a copy-paste of Steve's comment, with a minor renaming change on one of
the methods:
There's also one other thing to consider: could we somehow isolate things so
that we'd know the schema of a failing FS, even before instantiating teh
class. I doubt we could do it with an FS, but I could imagine having a
different service of a FS declaration class, which would be much simpler
{code}
class FsDeclaration {
String getSchema()
String getFileSystemClassName()
String getFileContextClassName()
}
{code}
it'd only give the names of the classes, so not needing any transitive
classloader problems. Any issues with loading a class become postponed until
needed, at which point they fail with a meaningful error, rather than just
"unknown schema"
> Support ServiceLoader mechanism for finding subclasses of AbstractFileSystem.
> -----------------------------------------------------------------------------
>
> Key: HADOOP-11527
> URL: https://issues.apache.org/jira/browse/HADOOP-11527
> Project: Hadoop Common
> Issue Type: Improvement
> Components: fs
> Reporter: Chris Nauroth
> Assignee: Anu Engineer
>
> Currently, Hadoop code can discover custom implementations of {{FileSystem}}
> via either configuration mapping the scheme to the class name or the Java
> {{ServiceLoader}} mechanism. However, for implementations of
> {{AbstractFileSystem}}, only configuration is supported and not the
> {{ServiceLoader}} mechanism. Because of this, we must either specify the
> classes in core-default.xml (which is somewhat unusual because the class is
> likely to be in a hadoop-tools module instead of hadoop-common) or ask users
> to set it in core-site.xml at deployment time. This issue proposes to
> implement the {{ServiceLoader}} mechanism for {{AbstractFileSystem}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]