Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

QAT Codec Deployment Guide (CDH)

Yi Yao edited this page Aug 6, 2019 · 9 revisions

Note that the installation guide does not favour any platforms. It is mostly based on IntelQATCodec 1.0.0, CentOS 7.5 and CDH 5.14.2.

Prerequisites for Each Host

Installing Cloudera Manager and CDH

To install Cloudera software, see Cloudera Installation Guide. You can manage CDH installation using Cloudera Manager Parcels.

Installing QAT Required Software

It is recommended the platform be updated to the latest available packages sudo yum update

Kernel-devel version must be the same with the version of your kernel. If the package update installed a new kernel, then the platform must be restarted. sudo shutdown -r now

Install systemd-devel by running:
sudo yum install systemd-devel

Installing and Configuring QAT driver and QATzip

The following steps should be performed on all hosts. Make sure YUM works.
Create a file named intel-qat.repo in /etc/yum.repos.d with the following contents.

[intel-qat]
name=Intel QAT  
baseurl=https://download.01.org/QAT/repo
gpgcheck=0

Clean Yum cache by running:
sudo yum clean all

Install QATzip by running:
sudo yum install QATzip

Configure huge page related setting by running:
sudo cat /etc/sysctl.conf ensure the line vm.nr_hugepages=512 exists in the file

sudo sysctl -p

sudo cat /proc/meminfo | grep -i hugepages_total

HugePages_Total:     512

Ensure QAT services by running the following commands on all hosts:

sudo service qat_service start

Run the following command to check if the QATzip is setup correctly for compressing or decompressing files.
qzip -k $your_input_file

Installing QAT Parcel

  1. Download QAT Codec release from Releases and extract qatcodec-<version>-cdh<cdh-version>.tar.gz for QAT Codec in Cloudera parcel format.
  2. In a web browser, enter http://server_host:7180, where server_host is the FQDN or IP address of the host where the Cloudera Manager Server is running.
  3. Log into Cloudera Manager Admin Console. The default credentials are: Username admin Password: admin.
  4. After you log in, access the Parcels page by clicking the parcel indicator in the top navigation bar.
  5. Click the Configuration button.
  6. In the Remote Parcel Repository URLs list, click the addition symbol to open an additional row. Then, enter the path to the QAT parcel repository.
  7. Click Save Changes button.
  8. If QAT parcel is added successfully, you can see QAT parcel in the parcel page. See Cloudera Parcels Guide for more details.
  9. Click the Download button of the parcel named QATCODEC. The status changes to Downloading.
  10. Click the Distribute button for the parcel named QATCODEC. The status changes to Distributing. When the distribution completes, the button changes to Activate.
  11. Click the Activate button for the parcel named QATCODEC. A pop-up indicates the services must be restarted to use QATCODEC. Choose Restart, then click ok.

Configuring QAT Parcel

Make sure the following users are in qat user group in operating system.
hdfs, mapred, yarn, spark

Use the following commands to add these users into qat user group on all hosts.

sudo usermod -a -G qat hdfs 
sudo usermod -a -G qat mapred 
sudo usermod -a -G qat yarn 
sudo usermod -a -G qat spark

If you want to use QAT Codec in Hive, use the following commands to enable it on all hosts.
CDH 5.14.2:

cd /opt/cloudera/parcels/CDH/lib/hive/lib/
ln -sf ../../../../QATCODEC-1.0.0/lib/hive/lib/hive-exec-1.1.0-cdh5.14.2-qat-codec-1.0.0.jar /opt/cloudera/parcels/CDH/lib/hive/lib/hive-exec.jar 
ln -sf ../../../../QATCODEC-1.0.0/lib/hive/lib/hive-shims-0.23-1.1.0-cdh5.14.2-qat-codec-1.0.0.jar /opt/cloudera/parcels/CDH/lib/hive/lib/hive-shims.jar
ln -sf ../../../../QATCODEC-1.0.0/lib/hive/lib/hive-shims-common-1.1.0-cdh5.14.2-qat-codec-1.0.0.jar /opt/cloudera/parcels/CDH/lib/hive/lib/hive-shims-common.jar

CDH 6.0.0:

ln -sf ../../../../QATCODEC/lib/hive/lib/hive-exec-2.1.1-cdh6.0.0.jar /opt/cloudera/parcels/CDH/lib/hive/lib/hive-exec.jar 
ln -sf ../../../../QATCODEC/lib/hive/lib/hive-orc-2.1.1-cdh6.0.0.jar /opt/cloudera/parcels/CDH/lib/hive/lib/hive-orc.jar 

FAQ

Failed to open uio dev /dev/uio0

[std_err]
[error] SalCtrl_ServiceInit() - : Failed to initialise all service instances
[error] SalCtrl_ServiceEventStart() - : Private data is NULL
[error] SalCtrl_AdfServicesStartedCheck() - : Sal Ctrl failed to start in given time 

[std_out]
ADF_UIO_PROXY err: get_bundle_from_dev_cached: failed to open uio dev /dev/uio0
ADF_UIO_PROXY err: adf_user_subsystemInit: Failed to initialise Subservice SAL
ADF_UIO_PROXY err: adf_user_subsystemStart: Failed to start Subservice SAL
ADF_UIO_PROXY err: icp_adf_subsystemUnregister: Failed to shutdown subservice SAL.
ADF_UIO_PROXY err: icp_adf_userProcessToStart: File /dev/qat_dev_processes already opened

Perform the commands below on all hosts:

sudo chmod 666 /dev/uio*
sudo chmod 666 /dev/usdm_drv

Error reading /dev/qat_dev_processes file

[std_out]
ADF_UIO_PROXY err: icp_adf_userProcessToStart: Error reading /dev/qat_dev_processes file

Perform the commands below on all hosts:

sudo chmod 666 /dev/qat_dev_processes

Error no hardware, switch to SW if permitted

[std_err]
Error no hardware, switch to SW if permitted
g_process.qz_init_status = QZ_NO_HW

Perform the commands below on all hosts:

sudo chmod 777 /dev/qat_adf_ctl
sudo chmod 777 /dev/hugepages

Known Issues

UnsatisfiedLinkError

If you're using Spark in CDH6, you may encounter UnsatisfiedLinkError. The workaround is to create a symbolic link in /lib64 for /opt/cloudera/parcels/QATCODEC/lib/hadoop/lib/native/libqatcodec.so.