How to quit beeline?
Asked Answered
M

6

18

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?

Monjan answered 12/3, 2016 at 19:17 Comment(2)
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.Exsect
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 nowExsect
S
37

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

Shiflett answered 12/3, 2016 at 19:23 Comment(0)
C
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
Caravaggio answered 30/6, 2017 at 18:40 Comment(1)
This was such a lifesaver, I actually went into <panic> when the command didn't work for the first time :)Whoredom
C
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)

Curtsy answered 3/5, 2017 at 17:51 Comment(0)
E
4

Using Clouder 5.5.1,

used Ctrl+C to exit

Emiliaemiliaromagna answered 20/10, 2016 at 20:9 Comment(1)
That's not the proper way to terminate an application.Shiflett
N
2

Quitting beeline client:

!quit
Nerve answered 21/5, 2016 at 1:44 Comment(0)
M
0

beeline>!quit

This really helpful to quit the beeline

Muniments answered 30/6, 2016 at 13:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.