Unable to view Snappy-compressed files
You must install the
python-snappy library on your cluster to view
files compressed with Snappy using the Hue File Browser and the HBase Browser.
Post-installation, Hue automatically detects and displays the Snappy-compressed
python-snappy library is incompatible with the python library
snappy. You must uninstall
snappy if it is
present on your cluster.
snappylibrary is installed on your cluster:
/usr/bin/pip show snappy
snappylibrary is not installed on your cluster. If you get any results for
snappy, then uninstall it by running the following command:
/usr/bin/pip uninstall snappy
python-snappylibrary is installed on your cluster by running the following command:
/usr/bin/pip show python-snappy
Name: python-snappy Version: 0.5.4 Location: /usr/lib64/python2.7/site-packages
- Sign in to Cloudera Manager as an Administrator.
- Stop the Hue service by going to .
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:
python-snappypackage 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-snappylibrary 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 .
Verify that the
python-snappylibrary is working for Hue by running the following command:
sudo -u hue /bin/bash -c "echo 'import snappy' | python"If the
python-snappylibrary is working as expected, then no output is displayed for this command.