Accessing Spark Thrift Server Using Beeline

This topic describes how to access Spark Thrift Server using Beeline on HPE Ezmeral Runtime Enterprise.

About this task

You can use Spark Thrift Server to provide JDBC connectivity to Spark. Spark Thrift server allows JDBC or ODBC clients (for example: Beeline) to execute SQL queries over JDBC and ODBC protocols on Spark.

After setting up the tenant and HPE Ezmeral Data Fabric on Kubernetes, as described in Configuring Spark to Work with Hive Metastore, you can access the Spark Thrift Server:

Procedure

  1. Get the Spark Thrift Server external endpoint. The endpoint is exposed through the spark-ts NodePort service. The target port is 2304.
  2. Exec or ssh into the spark-client pod in the tenant namespace. Alternatively, you can use the tenantcli-0 pod.
  3. Use the following command to obtain a user ticket:
    maprlogin password
  4. Start Beeline:
    /opt/mapr/spark/spark-[spark-version]/bin/beeline
  5. Connect to the Thrift Server:
    !connect jdbc:hive2://[spark-thrift-host-and-port]/default;ssl=true;auth=maprsasl