You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Colin Patrick McCabe (JIRA)" <ji...@apache.org> on 2015/08/05 18:59:05 UTC

[jira] [Commented] (HDFS-8750) FIleSystem does not honor Configuration.getClassLoader() while loading FileSystem implementations

    [ https://issues.apache.org/jira/browse/HDFS-8750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14658513#comment-14658513 ] 

Colin Patrick McCabe commented on HDFS-8750:
--------------------------------------------

Is this a compatible change?  It seems like changing the classloader that is in use might break some people who were relying on the existing one being used.

> FIleSystem does not honor Configuration.getClassLoader() while loading FileSystem implementations
> -------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-8750
>                 URL: https://issues.apache.org/jira/browse/HDFS-8750
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: fs, HDFS
>            Reporter: Himanshu
>            Assignee: Himanshu
>         Attachments: HDFS-8750.001.patch, HDFS-8750.002.patch
>
>
> In FileSystem.loadFileSystems(), at 
> https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java#L2652
> a "scheme" -> "FileSystem implementation" map is created from the jars available on classpath. It uses Thread.currentThread().getClassLoader() via ServiceLoader.load(FileSystem.class)
> Instead, loadFileSystems() should take Configuration as an argument and should first check if a classloader is configured in configuration.getClassLoader(), if yes then ServiceLoader.load(FileSystem.class, configuration.getClassLoader()) should be used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)