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

CliDriver loads different hive-site.xml into HiveConf and MetastoreConf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • Standalone Metastore, Test
    • None
    • n/a

    Description

      Various forms of CliDriver use CliConfigs to set the 'confDir' below (e.g. CliConfigs.SparkOnYarnCliConfig() used by TestMiniSparkOnYarnCliDriver.

      QTestUtil.QTestUtil() has

          if (confDir != null && !confDir.isEmpty()) {
            HiveConf.setHiveSiteLocation(new URL("file://"+ new File(confDir).toURI().getPath() + "/hive-site.xml"));
            MetastoreConf.setHiveSiteLocation(HiveConf.getHiveSiteLocation());
            System.out.println("Setting hive-site: "+HiveConf.getHiveSiteLocation());
          }
      

      This causes HiveConf.initialize() to load hvie-site.xml from that location.

      MetastoreConf only loads hive-site.xml from the classpath which in the test environment picks up data/conf/hive-site.xml

      So different parts of the system may end up disagreeing about property values.

      Attachments

        1. HIVE-18419.02.patch
          4 kB
          Eugene Koifman
        2. HIVE-18419.01.patch
          3 kB
          Eugene Koifman

        Issue Links

          Activity

            People

              ekoifman Eugene Koifman
              ekoifman Eugene Koifman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: