Connecting DBeaver to Apache Spark in a Kerberos Enabled Cluster
-
Copy
/etc/krb5.conf
from the master node (mn0
) and paste it to the local machine. -
Copy
/etc/security/keytabs/spark.service.keytab
from the master node (mn0
) and paste it to the local machine. -
Set up a DNS server and ensure to register the host name/IP mapping with DNS or add IP mappings to the
/etc/hosts
file.<public-mn0-ip> <mn0-hostname>Example:
130.35.229.154 haclustun0.sub07200950530.agoelvcn.oraclevcn.com
-
Run the following command.
kinit -kt <keytab path> <principal>
Example:
kinit -kt spark.service.keytab spark/haclustmn0.sub07200950530.agoelvcn.oraclevcn.com@BDSCLOUDSERVICE.ORACLE.COM
- Open DBeaver.
- Click Spark.
- Click Edit Driver.
- Click Libraries.
-
Download and add the Simba Spark JDBC driver jar (
sparkJDBC42.jar
). -
Click Settings, and then enter the following.
- Class Name: Enter com.simba.spark.jdbc.Driver
- URL Template: Enter jdbc:spark://<mn0-ip>:<port>[/database];AuthMech=1;KrbRealm=<realm>;KrbHostFQDN=<mn0-ip>;KrbServiceName=spark
- Click OK.