Connecting DBeaver to Apache Spark in a Kerberos Enabled Cluster

  1. Copy /etc/krb5.conf from the master node (mn0) and paste it to the local machine.
  2. Copy /etc/security/keytabs/spark.service.keytab from the master node (mn0) and paste it to the local machine.
  3. 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

  4. Run the following command.

    kinit -kt <keytab path> <principal>

    Example:

    kinit -kt spark.service.keytab spark/haclustmn0.sub07200950530.agoelvcn.oraclevcn.com@BDSCLOUDSERVICE.ORACLE.COM

  5. Open DBeaver.
  6. Click Spark.
  7. Click Edit Driver.
  8. Click Libraries.
  9. Download and add the Simba Spark JDBC driver jar (sparkJDBC42.jar).
  10. 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
  11. Click OK.