Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-23700

HiveConf static initialization fails when JAR URI is opaque

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.3.7
    • Fix Version/s: None
    • Component/s: Hive

      Description

      HiveConf static initialization fails when the jar URI is opaque, for example when it's embedded as a fat jar in a spring boot application. Then initialization of the HiveConf static block fails and the HiveConf class does not get classloaded. The opaque URI in my case looks like this _jar:file:/usr/local/server/some-service-jar.jar!/BOOT-INF/lib/hive-common-2.3.7.jar!/_

      HiveConf#findConfigFile should be able to handle `IllegalArgumentException` when the jar `URI` provided to `File` throws the exception.

      To surface this issue three conditions need to be met.
      1. hive-site.xml should not be on the classpath
      2. hive-site.xml should not be on "HIVE_CONF_DIR"
      3. hive-site.xml should not be on "HIVE_HOME"

        Attachments

        1. HIVE-23700.1.patch
          1.0 kB
          Francisco Guerrero

          Issue Links

            Activity

              People

              • Assignee:
                frankgh Francisco Guerrero
                Reporter:
                frankgh Francisco Guerrero
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 120h
                  120h
                  Remaining:
                  Remaining Estimate - 119h 20m
                  119h 20m
                  Logged:
                  Remaining Estimate - 119h 20m
                  40m