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