hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Zhong (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-2887) Var Substitution not working when connecting to a remote hive
Date Wed, 21 Mar 2012 13:17:39 GMT

     [ https://issues.apache.org/jira/browse/HIVE-2887?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Albert Zhong updated HIVE-2887:
-------------------------------

    Description: 
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 with -d/--define and/or
--hivevar 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:K=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} 
The same will happen if you use --hivevar to pass variables.

  was:
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 with -d/--define and/or
--hivevar 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} 
The same will happen if you use --hivevar to pass variables.

    
> 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 with -d/--define
and/or --hivevar 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:K=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} 
> The same will happen if you use --hivevar to pass variables.

--
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

        

Mime
View raw message