cloudera / hue

Open source SQL Query Assistant service for Databases/Warehouses
https://cloudera.com
Apache License 2.0
1.16k stars 364 forks source link

hive sequenceFile table with hdfs lzo #204

Closed yuanxiaolong closed 9 years ago

yuanxiaolong commented 9 years ago

I have a sequenceFile hive table (lzo compress hdfs) , hive cli select rows from table is fine。 when I run the same hive sql In HUE , I got this

java.io.IOException: java.lang.RuntimeException: native-lzo library not available

after google the message , found the error is https://github.com/cloudera/hue/blob/master/apps/beeswax/src/beeswax/locale/zh_CN/LC_MESSAGES/django.po

#: src/beeswax/templates/execute.mako:393
msgid "Fetching results ran into the following error(s):"
msgstr "正在提取遇到以下错误的结果:"

How can I set the hue env , like spark ? thanks ! thanks !

export SPARK_LIBRARY_PATH=:/usr/lib/hadoop/lib/native/
export SPARK_SUBMIT_LIBRARY_PATH=:/usr/lib/hadoop/lib/native/
export SPARK_CLASSPATH=:/usr/lib/hadoop/hadoop-lzo-0.4.20-SNAPSHOT.jar
romainr commented 9 years ago

By Hive CLI, do you mean with 'beeline'? Do you run 'beeline' from the same machine as Hue?

yuanxiaolong commented 9 years ago

Thanks for reply, Hive CLI just hive command $HIVE_HOME/bin/hive I run hive command and query hive sql On "Hive Metastore Server" or "Hive gateway" (different machine) all fine. "HUE" and "Hive Metastore Server" (same machine) ,but run hive sql with HUE UI , it doesn't work。

romainr commented 9 years ago

Hue uses the same as 'beeline' which uses HiveServer2 (so misconfiguration there, probably need to add the libs to HiveServer2 path)

yuanxiaolong commented 9 years ago

Romainr, appreciate for your help, I set the env for HiveServer2, It works . thanks again! :+1:

LD_LIBRARY_PATH=/usr/local/hadoop/lzo/lib
romainr commented 9 years ago

:)