Using Beeline
DataStax Enterprise supports the HiveServer2 Beeline command shell, a JDBC client. After starting HiveServer2, open another terminal window, start Beeline, connect to HiveServer2, and run Hive queries.
DataStax Enterprise supports the HiveServer2 Beeline command shell, a JDBC client. HiveServer2, an improved Hive
server, uses Beeline as the command-line interface. After starting HiveServer2, open another
terminal window, start Beeline, connect to HiveServer2, and run Hive queries.
- In a terminal window, start HiveServer2:
- Installer-Services and Package installations:
$ dse hive --service hiveserver2
- Installer-No Services and Tarball installations:
$ install_location/bin/dse hive --service hiveserver2
- Installer-Services and Package installations:
- In another terminal window, start Beeline. On Linux, for
example:
$ install_directory/bin/dse beeline
The beeline prompt appears.
2014-06-19 06:37:22.758 java[46121:1a03] Unable to load realm info from SCDynamicStore Beeline version 0.12.0.3-SNAPSHOT by Apache Hive beeline>
- Connect to the server. On a single-node, development cluster for
example:
The HiveServer2 prompt appears.beeline> !connect jdbc:hive2://localhost
scan complete in 24ms Connecting to jdbc:hive2://localhost Enter username for jdbc:hive2://localhost:
- Enter the DataStax Enterprise user name.The password prompt appears.
Enter password for jdbc:hive2://localhost:
- Enter the password.The hive2 prompt appears.
Connected to: Hive (version 0.12.0.3-SNAPSHOT) Driver: Hive (version 0.12.0.3-SNAPSHOT) Transaction isolation: TRANSACTION_REPEATABLE_READ 0: jdbc:hive2://localhost>
- Run Hive queries.