Spark Thrift Server Clients

With Spark Thrift server, you can use JDBC and ODBC connection interfaces that enable a variety of external tools to access Spark and run SQL queries.
  • The ODBC interface is used by BI tools (often produced by HPE Ezmeral Data Fabric partners such as Tableau or Microstrategy).
  • The JDBC interface is used by clients such as SQuirrel SQL or the Beeline simple SQL shell.
MapR Hive JDBC clients that connect to HiveServer2 can also connect to Spark Thrift server without additional configuration. For details about clients, see HiveServer2 Clients and Connecting to HiveServer2.
IMPORTANT Starting in the EEP 4.0 release, if you start and stop the Spark Thrift server using Warden, the connection port number is 2304. If you start and stop by running the /opt/mapr/spark/<spark-version/sbin/{start,stop}-thriftserver.sh scripts, the port number is 10000. Beginning with EEP 6.3.0, the connection port number is 2304 for both start/stop methods (using Warden and using thriftserver.sh scripts).

MapR-SASL JDBC Connection String Format

If you start and stop the Spark Thrift server through Warden, starting in EEP 4.0, then the JDBC connection string format for MapR-SASL environments is:

jdbc:hive2://<hostname>:2304/default;auth=maprsasl;ssl=true
Otherwise, the port you use depends on the EEP version:
EEP 4.0 through 6.2.x
jdbc:hive2://<hostname>:10000/default;auth=maprsasl;ssl=true
EEP 6.3.0 and later
jdbc:hive2://<hostname>:2304/default;auth=maprsasl;ssl=true

Kerberos JDBC Connection String Format

If you start and stop the Spark Thrift server through Warden, starting in EEP 4.0, then the JDBC connection string format for clusters secured with Kerberos is:
jdbc:hive2://<hostname>:2304/default;principal=mapr/<FQDN@REALM>;ssl=true
Otherwise, the port you use depends on the EEP version:
EEP 4.0 through 6.2.x
jdbc:hive2://<hostname>:10000/default;principal=mapr/<FQDN@REALM>;ssl=true
EEP 6.3.0 and later
jdbc:hive2://<hostname>:2304/default;principal=mapr/<FQDN@REALM>;ssl=true

Starting the Thrift Server on a Custom Port

To start the Spark Thrift Server on a custom port, use the hive.server2.thrift.port option. For example, you can specify the following in the /opt/mapr/spark/spark-2.4.4/conf/hive-site.xml file:
<property>
<name>hive.server2.thrift.port</name>
<value>34512</value>
</property>

For more information, see the Apache HiveServer2 documentation.