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?
Asked
Active
Viewed 4.8k times
17
-
1Ahem - 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
-
1For 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 Answers
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

Jeremy Montgomery
- 161
- 1
- 4
-
This was such a lifesaver, I actually went into
when the command didn't work for the first time :) – Devender Goyal Nov 12 '19 at 11:12
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