17

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.

Anonymous Person
  • 1,437
  • 8
  • 26
  • 47

7 Answers7

23

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;
Vinkal
  • 2,964
  • 1
  • 19
  • 19
12

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

Ajay Kumar Raj
  • 121
  • 1
  • 5
4

You should also be about to use ctrl+c to exit

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Aaron Faltesek
  • 319
  • 2
  • 11
3

This is the right way to quit or exit from hive session.

hive> quit;

or

hive> exit;

Not the ;

CAFEBABE
  • 3,983
  • 1
  • 19
  • 38
Ramineni Ravi Teja
  • 3,568
  • 26
  • 37
1

You can quit using Ctrl(key) + C(Key) or quit; at the hive shell prompt. That should work!!

Naveen Kumar R B
  • 6,248
  • 5
  • 32
  • 65
hduser
  • 7
  • 5
1

use ctr+c to exit the hive or hive > exit;

0

Once you type exit without ';' then ctrl+C won't work, in this case you shall directly quit the shell by closing terminal.

RG1nine
  • 11
  • 4