Unable to view Snappy-compressed files
You must install the python-snappy library on your cluster to view Snappy-compressed files through the Hue File Browser and the HBase Browser. Hue, then, automatically detects and displays the Snappy-compressed files.
Before you begin
The python-snappy library is incompatible with the python library called snappy. You must uninstall snappy if it is present on your cluster.
/usr/bin/pip show snappy
/usr/bin/pip uninstall snappy
/usr/bin/pip show python-snappy
Name: python-snappy Version: 0.5.4 Location: /usr/lib64/python2.7/site-packages
To resolve this issue:
- Sign in to Cloudera Manager as an Administrator.
- Stop the Hue service by going to Stop. and click
- Change to the following directory depending on whether you have used parcels or packages to set up your CDH cluster.
cd /opt/cloudera/parcels/CDH/lib/hueFor package:
- Install the python-snappy package by running the following commands:
yum install gcc gcc-c++ python-devel snappy-devel ./build/env/bin/pip install -U setuptools ./build/env/bin/pip install python-snappy
- Verify that the python-snappy library is readable by all users by running the following commands:
ls -lart `locate snappy.py`The output should be similar to the following:
-rw-r--r-- 1 root root 11900 Sep 1 12:25 /usr/lib64/python2.7/site-packages/snappy.py -rw-r--r-- 1 root root 10344 Sep 1 12:26 /usr/lib64/python2.7/site-packages/snappy.pyc
- Start the Hue service by going to Start. and click
- Verify that the python-snappy library is working for Hue by running the following command:
sudo -u hue /bin/bash -c "echo 'import snappy' | python"
If the python-snappy library is working as expected, then no output is displayed for this command.
You should now be able to view Snappy-compressed files on the Hue File Browser and the HBase Browser through the Hue web interface.