Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to exit Hive

I've just installed Hive on my Ubuntu machine (14.04). When I run hive in the terminal, it comes up with

 Logging initialized using configuration in jar:file:/home/nkhl/Documents/apachehive/lib/hive-common-1.2.1.jar!/hive-log4j.properties 
which is fine, I guess. Then the Hive shell opens. I haven't learnt Hive (yet) so when i run quit to quit the shell, it does nothing.

Here's the version of Hive i am on now:


Hive 1.2.1
Subversion git://localhost.localdomain/home/sush/dev/hive.git -r 243e7c1ac39cb7ac8b65c5bc6988f5cc3162f558
Compiled by sush on Fri Jun 19 02:03:48 PDT 2015
From source with checksum ab480aca41b24a9c3751b8c023338231

I close the terminal off, to quit the shell. Please help!

Thanks in advance.

like image 618
Anonymous Person Avatar asked Oct 18 '15 18:10

Anonymous Person


People also ask

How do I stop the hive terminal?

To cancel a Hive request To cancel the request at any time in the process, use the Kill Command from the server response. Enter Ctrl+C to exit the command line client. At the shell prompt, enter the Kill Command from the initial server response to your request.

How do I get out of Beeline prompt?

However, if there is no query currently running, the first CTRL+C will exit the Beeline shell.


2 Answers

I guess you must have forgotten to write semi-colon at the end of quit.

Use quit or exit to leave the interactive shell as shown below. Notice semi-colon (i.e. ; )

hive> quit;

OR

hive> exit;
like image 86
Vinkal Avatar answered Sep 21 '22 13:09

Vinkal


Here we can exit from hive shell by the following 3 commands

1.hive>exit; 2.hive>quit; As we all know that we can connect to hiveserver2 from beeline,jdbc-odbc,trift api.So when you are using beeline shell then the first two commands will not work so its better to use the following command to exit from beeline.

!exit

no semicolon should be used

like image 22
Ajay Kumar Raj Avatar answered Sep 22 '22 13:09

Ajay Kumar Raj