17

I am using CDH 5.5 and need to use beeline. I am pretty new to it and learning it now. I can start beeline but cannot quit as we do in Hive. I need to use Ctrl+z to quit which is not the proper way. Can someone help?

vy32
  • 28,461
  • 37
  • 122
  • 246
  • 1
    Ahem - on Unix/Linux `CTRL-Z` means *STOP*, it does not terminate the program, it "freezes" it and returns control to the shell... without closing the connections nor de-allocating RAM & temp files. – Samson Scharfrichter Mar 12 '16 at 21:21
  • 1
    For the record, the usual way to close a command-line utility in interactive mode is `CTRL-D` which means *OK, no more input, Stdin channel is closed, you can exit now* – Samson Scharfrichter Mar 12 '16 at 21:25

6 Answers6

36

use !q or !quit

[cloudera@quickstart ~]$ beeline

Beeline version 1.1.0-cdh5.5.0 by Apache Hive

beeline> !q

[cloudera@quickstart ~]$

Thanks to Xuefu Zhang. Related Jira

Alex Raj Kaliamoorthy
  • 2,035
  • 3
  • 29
  • 46
16

Sometimes you may find yourself with some unterminated command that Hive still thinks that you are entering. If your "! quit" command isn't working, throw in a terminate character (;) and try to quit again.

---Example---

Beeline version 1.1.0-cdh5.7.1 by Apache Hive
beeline> some unterminated command
beeline> ! quit
beeline> <panic!>
beeline> <remember the need to terminate previous commands>
beeline> ;
No current connection
beeline> ! quit
7

I tried !q and also !quit it did not work in HDP 2.5./Beeline version 1.2.1000.2.5.3.

Finally

! quit or ! q (space required)

Kumar
  • 918
  • 9
  • 19
4

Using Clouder 5.5.1,

used Ctrl+C to exit

sld
  • 59
  • 2
2

Quitting beeline client:

!quit
Suman
  • 476
  • 5
  • 7
0

beeline>!quit

This really helpful to quit the beeline

Mister X
  • 3,406
  • 3
  • 31
  • 72