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

VersionInfo should load version-info.properties from its own classloader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.3, 3.0.0
    • 3.1.0
    • common
    • None

    Description

      org.apache.hadoop.util.VersionInfo loads the version-info.properties file via the current thread classloader.
      However, in case of applications that are using hadoop classes dynamically (eg jdbc based tools such as SQuirreL SQL) the current thread might not be the one that loaded the hadoop classes including VersionInfo, and it would fail to fine the properties file.
      The right place to look for the properties file is in the classloader of VersionInfo class, as right version is the one that is associated with rest of the loaded hadoop classes, and not necessarily the one in current thread classloader.

      Created a related jira - HADOOP-14066 to make methods to get version via VersionInfo a public api.

      Attachments

        1. HADOOP-14067.03.patch
          3 kB
          Thejas Nair
        2. HADOOP-14067.02.patch
          3 kB
          Thejas Nair
        3. HADOOP-14067.01.patch
          3 kB
          Thejas Nair
        4. HADOOP-14067.01.patch
          3 kB
          Thejas Nair

        Issue Links

          Activity

            People

              thejas Thejas Nair
              thejas Thejas Nair
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: