Presto是否支持带有快速压缩的RC文件?

时间:2013-11-15 20:43:12

标签: presto

尝试在CDH4群集上使用Presto读取snappy压缩表。 Hive可以读取该表,但Presto抱怨缺少本机库。

从CDH添加java.library.path似乎没有帮助。 (添加到jvm.config)

-Djava.library.path=/opt/cloudera/parcels/CDH-4.4.0-1.cdh4.4.0.p0.39/lib/hadoop/lib/native

这是堆栈跟踪

Caused by: java.lang.RuntimeException: native snappy library not available: SnappyCompressor has not been loaded.
at org.apache.hadoop.io.compress.SnappyCodec.checkNativeCodeLoaded(SnappyCodec.java:68) ~[na:na]
at org.apache.hadoop.io.compress.SnappyCodec.createDecompressor(SnappyCodec.java:196) ~[na:na]
at org.apache.hadoop.hive.ql.io.CodecPool.getDecompressor(CodecPool.java:35) ~[na:na]
at org.apache.hadoop.hive.ql.io.RCFile$Reader.init(RCFile.java:1314) ~[na:na]
at org.apache.hadoop.hive.ql.io.RCFile$Reader.<init>(RCFile.java:1154) ~[na:na]
at org.apache.hadoop.hive.ql.io.RCFile$Reader.<init>(RCFile.java:1133) ~[na:na]
at org.apache.hadoop.hive.ql.io.RCFileRecordReader.<init>(RCFileRecordReader.java:102) ~[na:na]
at org.apache.hadoop.hive.ql.io.RCFileInputFormat.getRecordReader(RCFileInputFormat.java:57) ~[na:na]
at com.facebook.presto.hive.HiveRecordSet$1.call(HiveRecordSet.java:185) ~[na:na]
  ...

图书馆目录

ls -l /opt/cloudera/parcels/CDH-4.4.0-1.cdh4.4.0.p0.39/lib/hadoop/lib/native
total 564
-rwxr-xr-x 1 root root 133184 Sep  6 00:12 libhadoop.a
-rwxr-xr-x 1 root root 193020 Sep  6 00:12 libhadooppipes.a
lrwxrwxrwx 1 root root     18 Sep  6 08:26 libhadoop.so -> libhadoop.so.1.0.0
-rwxr-xr-x 1 root root  81680 Sep  6 00:12 libhadoop.so.1.0.0
-rwxr-xr-x 1 root root  58600 Sep  6 00:12 libhadooputils.a
-rwxr-xr-x 1 root root  77476 Sep  6 00:12 libhdfs.a
lrwxrwxrwx 1 root root     18 Sep  6 08:26 libsnappy.so -> libsnappy.so.1.1.3
lrwxrwxrwx 1 root root     18 Sep  6 08:26 libsnappy.so.1 -> libsnappy.so.1.1.3
-rwxr-xr-x 1 root root  23904 Sep  6 00:12 libsnappy.so.1.1.3

1 个答案:

答案 0 :(得分:2)

Presto 0.54支持Snappy压缩。