Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-11110

Ability to load FilterList class is dependent on context classloader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.94.19
    • 0.94.20
    • None
    • None
    • Reviewed

    Description

      In the 0.94 branch, the FilterList class contains a static call to HBaseConfiguration.create(). This create call in turn adds the needed hbase resources to the Configuration object, and sets the classloader of the Configuration object to be the context classloader of the current thread (if it isn't null).

      This approach causes issues if the FilterList class is loaded from a thread that has a custom context classloader that doesn't run back up to the main application classloader. In this case, HBaseConfiguration.checkDefaultsVersion fails because the hbase.defaults.for.version configuration value can't be found (because hbase-default.xml can't be found by the custom context classloader).

      This is a concrete issue that was discovered via Apache Phoenix within a commercial tool, when a (JDBC) connection is opened via a pool, and then passed off to a UI thread that has a custom context classloader. The UI thread is then the first thing to load FilterList, leading to this issue.

      Attachments

        1. HBASE-11110.patch
          3 kB
          Gabriel Reid

        Activity

          People

            gabriel.reid Gabriel Reid
            gabriel.reid Gabriel Reid
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: