User Community Service Desk Downloads
If you can't find the product or version you're looking for, visit support.ataccama.com/downloads

Connect to Cloudera Hive and Impala

This article describes how to connect to Hive and Impala databases on Cloudera clusters from ONE Desktop.

The connection is established via a custom JDBC driver and lets you browse Hive and Impala tables from the IDE using the SQL interface.

Connection to Hive supports Kerberos authentication.

Direct connection to Hive

Configure Kerberos authentication (Kerberos only)

If Kerberos is enabled on the cluster, follow the steps in this section.

Make sure that your Windows machine is connected to the Kerberos server. Otherwise, copy the krb5.conf file from the /etc folder on the Hadoop cluster to <ATACCAMA_HOME>/jre/lib/security on your machine.

Create a Kerberos ticket

The Hive JDBC driver requires an open Kerberos ticket to be available at the credential store as it cannot work directly with the Kerberos keytab.

To create the Kerberos ticket using the kinit application, navigate to <ATACCAMA_HOME>/jre/bin and run the kinit command in Java:

  • If you have user and password authentication against Kerberos enabled, get the ticket directly from KDC:

    .\kinit.exe -f username@DOMAIN.COM
  • If you need to use the keytab:

    .\kinit.exe -f -k -t <path_to_keytab> username@DOMAIN.COM

Install Cloudera Hive driver

To install Cloudera Hive JDBC driver:

  1. Place the following libraries to the <ATACCAMA_HOME>/lib/jdbc/cloudera-hive folder on your local machine. The libraries should be provided by your Hadoop admin:

    • hive_metastore.jar

    • hive_service.jar

    • HiveJDBC41.jar

    • libfb303-<version>.jar

    • libthrift-<version>.jar

    • log4j-<version>.jar

    • ql.jar

    • slf4j-api-<version>.jar

    • slf4j-log4j12-<version>.jar

    • TCLIServiceClient.jar

    • zookeeper-<version>.jar

  2. Start ONE Desktop.

  3. Go to Window > Preferences > [your product] > Database.

  4. From the list of preconfigured drivers, double-click Cloudera Hive.

  5. Select Add to Classpath…​ and locate the libraries added in step 1.

  6. Select OK to finish.

    The driver now has a green dot and YES in the Configured column of the table.

For the general installation procedure and information about working with databases in ONE Desktop, see Databases.

Create a database connection to Hive

Create a new database connection according to the standard procedure (see xref:databases.adoc], section Connect to a database) with the following specifications:

  • Database type: Select Cloudera Hive.

  • Connection parameters > By URL > Connection string: Connection string should be provided by your Hadoop admin.

    Connection string example
    jdbc:hive2://myhost.example.com:10000/default

Direct connection to Impala

Install Cloudera Impala driver

To install Cloudera Impala JDBC driver:

  1. Place the following libraries to the <ATACCAMA_HOME>/lib/jdbc/impala folder on your local machine. The libraries should be provided by your Hadoop admin.

    • ` hive_metastore.jar`

    • hive_service.jar

    • ImpalaJDBC41.jar

    • libfb303-<version>.jar

    • libthrift-<version>.jar

    • log4j-<version>.jar

    • ql.jar

    • slf4j-api-<version>.jar

    • slf4j-log4j12-<version>.jar

    • TCLIServiceClient.jar

  2. Start ONE Desktop.

  3. Go to Window > Preferences > [your product] > Database.

  4. From the list of preconfigured drivers, double-click Cloudera Impala.

  5. Select Add to Classpath and locate the libraries added in step 1.

  6. Select OK to finish.

    The driver now has a green dot and YES in the Configured column of the table.

For the general installation procedure and information about working with databases in ONE Desktop, see Databases.

Create a database onnection to Impala

Create a new database connection according to the standard procedure (see Databases, section Connect to a database) with the following specifications:

  • Database type: Select Apache Hive Knox.

  • Connection parameters > By URL > Connection string : Connection string should be provided by your Hadoop admin.

    Connection string example
    jdbc:impala://myhost.example.com:21050;AuthMech=1;KrbRealm=EXAMPLE.COM;KrbHostFQDN=myhost.example.com;KrbServiceName=impala

Was this page useful?