Skip to main content
Pentaho Documentation

HBase Setup for Spark

The HBase Input and HBase Output steps can run on Spark with the Adaptive Execution Layer (AEL). These steps can be used with the supported versions of Cloudera Distribution for Hadoop (CDH) and Hortonworks Data Platform (HDP). To read or write data to HBase, you must have an HBase target table on the cluster. If one does not exist, you can create one using HBase shell commands. This article explains how you can set up the Pentaho Server to run these steps. 

Setup Overview

Perform the following tasks to use the HBase steps with Spark:

  1. Set Up the Application Properties File
  2. Set Up the Vendor-Specific JARs

Set Up the Application Properties File

You must set up the application.properties file to permit Spark jobs on AEL to access the hbase-site.xml file from the HDFS cluster. This setup enables Spark jobs to connect to HBase from the Spark Executors. You must also specify the location of the vendor-specific jars described below so they can be loaded on the classpath.

Perform the following steps to set up the application.properties file:

  1. Navigate to the design-tools/data-integration/adaptive-execution/config folder and open the application.properties file with any text editor.
  2. Set the value of the hbaseConfDir property to the location of your hbase-site.xml file.
  3. Set the value of the extraLib property to the location of the vendor-specific jars. The default value is './extra'
  4. Save and close the file.

Set Up the Vendor-Specific JARs

Each vendor has differences in their byte conversion for HBase, so you must use the JAR files for the Hadoop distribution you are using.

Vendor-specific JARS for HBase are not shipped with Spark or HDFS.

Perform the following steps to set up the vendor-specific JARs:

  1. Navigate to the design-tools/data-integration/adaptive-execution/extra directory and delete the three hbase JAR files.
  2. Navigate to the design-tools/data-integration/plugins/pentaho-big-data-plugin/hadoop-configurations directory and locate your CDH or HDP distribution folder. 
  3. Locate the lib/pmr directory in your distribution folder.
  4. Copy the six hbase files, along with the metrics-core file to the design-tools/data-integration/adaptive-execution/extra folder.
  5. To complete your setup, you must Restart the AEL daemon.