Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12596

FIleSystem does not honor Configuration.getClassLoader() while loading FileSystem implementations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • fs
    • None

    Description

      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.

      Attachments

        1. HDFS-8750.004.patch
          2 kB
          Himanshu Gupta
        2. HDFS-8750.003.patch
          2 kB
          Himanshu Gupta
        3. HDFS-8750.002.patch
          2 kB
          Himanshu Gupta
        4. HDFS-8750.001.patch
          2 kB
          Himanshu Gupta

        Activity

          People

            himanshug Himanshu Gupta
            himanshug Himanshu Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: