Var Substitution not working when connecting to a remote hive -------------------------------------------------------------
Key: HIVE-2887 URL: https://issues.apache.org/jira/browse/HIVE-2887 Project: Hive Issue Type: Bug Components: CLI Affects Versions: 0.8.1 Environment: Ubuntu 10.10 Reporter: Albert Zhong When we use '-h' option to connect to a remove hive, var substitution will not work. More exactly, it seemed that the variables passed in the command line do not correctly set to hive cli's configuration variables. For example, we run hive without -h option, it works fine: {code} $ hive -S -d K=123 hive> SELECT * FROM foo; 123 abc; 456 def; hive> SELECT * FROM foo WHERE r1="${K}"; 123 abc; hive> SET -v; ... hive.zookeeper.session.timeout=600000 hivevar:K=123 io.bytes.per.checksum=512 ... {code} But when we run hive with -h option, it doesn't work: {code} $ hive -S -d K=123 -h localhost hive> SELECT * FROM foo; 123 abc; 456 def; hive> SELECT * FROM foo WHERE r1="${K}"; hive> SET -v; ... hive.zookeeper.session.timeout=600000 io.bytes.per.checksum=512 ... hive> SET hivevar:B=123; hive> SET -v; ... hive.zookeeper.session.timeout=600000 hivevar:K=123 io.bytes.per.checksum=512 ... hive> SELECT * FROM foo WHERE r1="${K}"; 123 abc; {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira