Beeline is a JDBC client that is based on the SQLLine CLI
The Beeline shell works in both embedded mode as well as remote mode.
beeline -u jdbc:hive2://localhost:10000/default -n scott -w password_file
beeline> !connect jdbc:hive2://localhost:10001/default;transportMode=http scott tiger org.apache.hive.jdbc.HiveDriver
Connecting to jdbc:hive2://localhsot:10001/default;transportMode=http
Connected to: Apache Hive (version 1.2.1000.2.6.2.38-1)
Driver: Hive JDBC (version 1.2.1000.2.6.2.38-1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
beeline> !connect blue
!quit
!reconnect
SHOW DATABASES;
USE <database>;
SHOW TABLES;
DESC <table>;
DESC FORMATTED <table>;