Details
-
Bug
-
Status: In Progress
-
Minor
-
Resolution: Unresolved
-
All Versions
-
None
-
Ubuntu 22.04
VSCode with Extension Pack for Java
CommitHash: bee33d2018 on Apache Hive master branch (https://github.com/apache/hive)
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
- links to