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

MetastoreConf - String casting of default values breaks Hive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Minor
    • Resolution: Unresolved
    • All Versions
    • None
    • Configuration

    Description

      When using the getVar(Configuration conf, ConfVars var) method of the MetastoreConf class, Apache breaks when e.g. trying to retrieve the environment variable "USE_SSL" and it isn't set in the system. The method then tries to cast the default value, which is the boolean false for USE_SSL, to a String which can't work.

       

      return val == null ? conf.get(var.hiveName, (String)var.defaultVal) : val;

       

      Also in the getStringCollection(Configuration conf, ConfVars var) method it tries to cast any default values to a String.

       

      Strangely, e.g. in the method get(Configuration conf, String key) the default value isn't casted but the .toString() method is called, which should be also done for the 2 methods I mentioned above.

       

      If nobody has time for that fix, I could open a PR for that.

      Attachments

        Issue Links

          Activity

            People

              tanishqchugh tanishqchugh
              dom93dddd Dominik Diedrich
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: