...
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 | ||
---|---|---|
| ||
NOTE: If you'd like to connect via NOSASL mode, you must specify authentication mode explicitly: % bin/beelineconnect 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:
...