You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Johndee Burks (JIRA)" <ji...@apache.org> on 2014/03/29 00:47:16 UTC

[jira] [Commented] (HIVE-6758) Beeline doesn't work with -e option when started in background

    [ https://issues.apache.org/jira/browse/HIVE-6758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13951599#comment-13951599 ] 

Johndee Burks commented on HIVE-6758:
-------------------------------------

Upon further investigation nothing happens at all when the process is sent to background it does not even connect to HS2. If you use beeline foreground there should be connection information similar to that below: 

{code}
scan complete in 61ms
Connecting to jdbc:hive2://jrepo1-2.ent.cloudera.com:10000
Connected to: Hive (version 0.10.0)
Driver: Hive (version 0.9.0-cdh4.1.2)
Transaction isolation: TRANSACTION_REPEATABLE_READ
{code}

However when you use the following command and cat the file that should contain stderr and stdout there is nothing. This means that beeline did not even try to connect yet. 

{code}
[root@jrepo1-1 hive]# beeline -u "jdbc:hive2://jrepo1-2.ent.cloudera.com:10000" -n johndee -e "show tables;" &> show.out &
[1] 15265
[root@jrepo1-1 hive]# jobs
[1]+  Stopped                 beeline -u "jdbc:hive2://jrepo1-2.ent.cloudera.com:10000" -n johndee -e "show tables;" &>show.out
[root@jrepo1-1 hive]# cat show.out
[root@jrepo1-1 hive]#
{code}

Upon inspection of the HS2 log there is nothing shown in regards to connection being made. Another test is to run a M/R based query such as the following: 

{code}
beeline -u "jdbc:hive2://jrepo1-2.ent.cloudera.com:10000" -n johndee -e "select count(*) from j1;" &
{code}

Check the JobTracker UI or MR2 WebUI and you will see no job launched. 


> Beeline doesn't work with -e option when started in background
> --------------------------------------------------------------
>
>                 Key: HIVE-6758
>                 URL: https://issues.apache.org/jira/browse/HIVE-6758
>             Project: Hive
>          Issue Type: Improvement
>          Components: CLI
>    Affects Versions: 0.11.0
>            Reporter: Johndee Burks
>            Assignee: Xuefu Zhang
>
> In hive CLI you could easily integrate its use into a script and back ground the process like this: 
> hive -e "some query" &
> Beeline does not run when you do the same even with the -f switch. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)