Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: change comment from HIVE-6468 to a warning; misc. edits

...

The Beeline shell works in both embedded mode as well as remote mode. In the embedded mode, it runs an embedded Hive (similar to Hive CLI) whereas remote mode is for connecting to a separate HiveServer2 process over Thrift.

Warning

In remote mode HiveServer2 only accepts valid Thrift calls

...

– do not attempt to call it via http or telnet (HIVE-6468).

Beeline Example

...

No Format
% bin/beeline
Hive version 0.11.0-SNAPSHOT by Apache
beeline> !connect jdbc:hive2://localhost:10000 scott tiger org.apache.hive.jdbc.HiveDriver
!connect jdbc:hive2://localhost:10000 scott tiger org.apache.hive.jdbc.HiveDriver
Connecting to jdbc:hive2://localhost:10000
Connected to: Hive (version 0.10.0)
Driver: Hive (version 0.10.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://localhost:10000> show tables;
show tables;
+-------------------+
|     tab_name      |
+-------------------+
| primitives        |
| src               |
| src1              |
| src_json          |
| src_sequencefile  |
| src_thrift        |
| srcbucket         |
| srcbucket2        |
| srcpart           |
+-------------------+
9 rows selected (1.079 seconds)
Info
titleBeeline with NoSASL connection
NOTE:

If

you'd

like

to

connect

via

NOSASL

mode,

you

must

specify

authentication

mode

explicitly:

% bin/beeline
beeline> !
connect jdbc
connect jdbc:hive2://<host>:<port>/<db>;auth=noSasl hiveuser pass org.apache.hive.jdbc.HiveDriver

Beeline Command Options

The Beeline CLI supports these command line options:

...