Using Beeline

DataStax Enterprise supports the Beeline client for use with Spark SQL Thrift Server.

DataStax Enterprise supports the Beeline client for use with the Spark SQL Thrift Server:
  • Hive 0.13 Beeline (dse spark-beeline) is for Spark SQL Thrift Server, supported in DataStax Enterprise 4.8.0 and later releases
  • Hive 0.12 Beeline (dse beeline) is for HiveServer2, supported in DataStax Enterprise 4.7.x and earlier releases
Note: To show the command line help for dse spark-beeline:
$ dse spark-beeline --help

Beeline with Spark SQL Thrift Server 

  1. In a terminal window, start Beeline for Spark SQL Thrift Server.
    $ dse spark-beeline
    On Linux, for example:
    $ install_directory/bin/dse [-u username -p password] spark-beeline

    The beeline prompt appears.

    2015-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>
  2. Connect to the server. On a single-node, development cluster for example:
    beeline> !connect jdbc:hive2://localhost:10000
    The HiveServer2 prompt appears.
    scan complete in 24ms
    Connecting to jdbc:hive2://localhost
    Enter username for jdbc:hive2://localhost:
  3. 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:10000>
  4. Run Hive queries.