Setting up Apache Hive Connector with Kerberos Authentication
Learn how to configure the Apache Hive connector in Cloudera Octopai Client using Kerberos authentication.
Before configuring the Apache Hive connector in Cloudera Octopai, ensure the following components are available and properly configured:
- MIT Kerberos for Windows: Download and install
from the official MIT Kerberos download page. The default installation path is
C:\Program Files\MIT\Kerberos\. To verify the
installation, ensure that the following executable file exists in your
environment: C:\Program Files\MIT\Kerberos\bin\kinit.exe.
This path is configured by default in the
kerberos.settings.jsonfile used by the Cloudera Octopai Client. - Kerberos Configuration File
(krb5.ini): Obtain
this file from the Hadoop or Hive cluster administrator and place it under
C:\ProgramData\MIT\Kerberos5\krb5.ini. The
configuration must include the following sections and values adjusted to the
actual cluster environment:
[libdefaults] default_realm = ROOT.COMOPS.SITE dns_lookup_realm = false dns_lookup_kdc = false ticket_lifetime = 24h renew_lifetime = 7d forwardable = true [realms] ROOT.COMOPS.SITE = { kdc = ccycloud-1.cdp.root.comops.site admin_server = ccycloud-1.cdp.root.comops.site } [domain_realm] .root.comops.site = ROOT.COMOPS.SITE root.comops.site = ROOT.COMOPS.SITE - Kerberos Keytab File: Obtain the keytab file
from the Hadoop or Hive cluster administrator. The keytab contains encrypted
credentials used for Kerberos authentication and enables non-interactive
authentication. The file format is binary with
.keytabextension. Securely store the keytab file in a location accessible to the Cloudera Octopai Client, for example, at C:\Octopai\keytabs\hive.keytab. - Hive ODBC Driver: Download and install a Hive ODBC driver that supports Kerberos authentication. Driver options include the Cloudera or Hortonworks Hive ODBC driver, or a vendor-specific equivalent. Ensure the driver architecture (32-bit or 64-bit) matches the Cloudera Octopai Client installation.
If the test fails, check the error message and verify the following:
- Kerberos configuration
- DSN settings
- Service availability
- File permissions
