The Impala Service

  Note: Impala 1.0 is supported with CDH4.1 or later, and requires Cloudera Manager 4.5.2 or later. Earlier Impala beta releases are not supported as of Cloudera Manager 4.5.2.

You can install Cloudera Impala through the Cloudera Manager installation wizard, using either parcels or packages, and have the service started as part of the First Run process. All configuration settings, including the Hive metastore setup, are handled by Cloudera Manager as part of the installation wizard. See Installation Path A - Automated Installation by Cloudera Manager for more information.

If you elect not to include the Impala service using the Installation Wizard, you can you the Add Service wizard to perform the installation.

Impala depends on ZooKeeper, HDFS, HBase, and Hive. All these services must be present in order to run the Impala service.

Simply follow the steps in the Add Service wizard. It will automatically configure and start the dependent services and the Impala service. See Adding Services for instructions.

Installing Impala after Upgrading Cloudera Manager

If you have just upgraded Cloudera Manager from a version that did not support Impala, the Impala software is not installed automatically. (Upgrading Cloudera Manager does not automatically upgrade CDH or other Cloudera products).

You can add Impala using Parcels; go to the Hosts tab, and select the Parcels tab. You should see at least one Impala parcel available for download. See Using Parcels for detailed instructions on using parcels to install or upgrade Impala.

If you do not see any Impala parcels available, verify that the Impala parcel repo URL (http://archive.cloudera.com/impala/parcels/latest/) has been configured in the Parcels configuration page. Click the Edit Settings button on the Parcels page to go to the Parcel configuration settings. See Parcel Configuration Settings for more details.

Configuring the Impala Service

There are several types of configuration settings you may need to apply, depending on your situation.

Managing Resources for Impala

Once you have installed Impala, you can coordinate its use of cluster resources in relation to MapReduce needs for the same resources. See Setting up a Multi-tenant Cluster for Impala and MapReduce below, as well as Resource Management in the Cloudera Manager User Guide.

Running Impala with CDH 4.1

  Note: If you are running CDH 4.1, and the Bypass Hive Metastore Server option is enabled, you must add the following to the Impala Safety Valve for hive-site.xml, replacing <hive_metastore_server_host> with the name of your Hive metastore server host:
<property>
  <name> hive.metastore.local</name>
  <value>false</value> 
</property> 
<property>
  <name> hive.metastore.uris</name>
  <value>thrift://<hive_metastore_server_host>:9083</value> 
</property>
Otherwise, Impala queries will fail.

Configuring Hive Table Statistics

Configuring Hive Table Stats is highly recommended when using Impala. It allows Impala to make optimizations that can result in significant (over 10x) performance improvements for some joins. If these are not available, Impala will still function, but at lower performance.

To configure Hive Table Stats:

  1. Set up a MySQL server for transient Stats data.

    Note that there is no PostgreSQL or Oracle option. This database will be heavily loaded, so it should not be installed on the same host as anything critical such as the Hive Metastore Server, the database hosting the Hive Metastore, or Cloudera Manager Server. When collecting stats on a large table and/or in a large cluster, this host may become slow or unresponsive.

    For instructions on setting up MySQL, see Installing and Configuring a MySQL Database

  2. Add the following into the HiveServer2 Safety Valve for hive-site.xml:
    <property>
      <name>hive.stats.dbclass</name>
      <value>jdbc:mysql</value>
    </property>
    <property>
      <name>hive.stats.jdbcdriver</name>
      <value>com.mysql.jdbc.Driver</value>
    </property>
    <property>
      <name>hive.stats.dbconnectionstring</name>
      <value>jdbc:mysql://<stats_mysql_host>:3306/<stats_db_name>?useUnicode=true&amp;
    characterEncoding=UTF-8&amp;user=<stats_user>&amp;password=<stats_password></value>
    </property>
    <property> 
      <name>hive.aux.jars.path</name> 
      <value>file:///usr/share/java/mysql-connector-java.jar</value>
    </property>  
  3. Restart HiveServer2

Collect stats on a particular table by running the following from a BeeLine client connected to your HiveServer2:

analyze table <table name> compute statistics;
analyze table <table name> compute statistics for columns <all columns of a table>;

Configuring Secure Access for the Impala Web Server

Cloudera Manager supports two methods of authentication for secure access to the Impala web server interfaces: password-based authentication and SSL certificate support. Both of these can be configured through properties of the Impala and Impala StateStore daemons. Authentication for the two types of daemons can be configured independently.

The Impala StateStore Daemon Web UI can be accessed from a link on the menu bar of the Impala Service. To access the Web UI for an Impala Daemon, you must go to the Instances tab and select the Impala Daemon instance you want to contact. The Impala Daemon Web UI link is found on the menu bar for the specific daemon instance.

Note that you can disable/enable access to both the Impala StateStore web server and the Impala daemon web server via configuration properties.

Configuring Password Authentication

To configure password-based authentication:

  1. Go to the Impala service page (from the Services menu, select Impala)
  2. Under the Configuration menu, select View and Edit.
  3. Search for "password" using the Search box within the Configuration page.

    This should display the password-related properties (Username and Password properties) for the Impala daemon and the Impala StateStore daemon. Note that if there are multiple role groups configured for Impala daemon instances, the search should display all of them.

  4. Enter a username and password into these fields, and Save Changes.
  5. Restart the Impala service in order to have these configuration changes take effect. (You can do this from the Actions menu at the top of the page.)

Now when you access the Web UI for the Impala daemon or StateStore daemon, you are asked to log in before access is granted.

Configuring SSL Certificate Support

To configure certificate-based authentication:

  1. Create or obtain an SSL certificate.
  2. Place the certificate, in .pem format, on the host where the Impala StateStore daemon is running, and on each host where an Impala daemon is running. It can be placed in any location (path) you choose. (Note that if all your Impala daemons are members of the same role group, then the .pem file must have the same path on each host).
  3. Go to the Impala service page (from the Services menu, select Impala).
  4. Under the Configuration menu, select View and Edit.
  5. Search for "certificate" using the Search box within the Configuration page.

    This should display the certificate file location properties for the Impala daemon and the Impala StateStore daemon. Note that if there are multiple role groups configured for Impala daemon instances, the search should display all of them.

  6. In the property fields, enter the full path name to your certificate file, and Save Changes.
  7. Restart the Impala service in order to have these configuration changes take effect. (You can do this from the Actions menu at the top of the page.) Note that if Cloudera Manager cannot find the .pem file on the host for a specific role instance, that role will fail to start.

Now when you access the Web UI for the Impala daemon or StateStore daemon, https will be used.