线程“主”中的异常
java.lang.RuntimeException: native snappy library not available: this version of libhadoop was built without snappy support.
at org.apache.hadoop.io.compress.SnappyCodec.checkNativeCodeLoaded(SnappyCodec.java:65)
at org.apache.hadoop.io.compress.SnappyCodec.getDecompressorType(SnappyCodec.java:193)
at org.apache.hadoop.io.compress.CodecPool.getDecompressor(CodecPool.java:178)
at org.apache.hadoop.io.compress.CompressionCodec$Util.createInputStreamWithCodecPool(CompressionCodec.java:157)
at org.apache.hadoop.io.compress.SnappyCodec.createInputStream(SnappyCodec.java:164)
我可以看到snappy库已正确安装。我已经使用-Djava.library.path提到了lib路径,仍然会导致相同的错误。
有什么建议吗?
hadoop checknative -a
本机库检查:
hadoop: true /opt/cloudera/parcels/CDH-5.7.1-1.cdh5.7.1.p0.11/lib/hadoop/lib/native/libhadoop.so.1.0.0
zlib: true /lib64/libz.so.1
snappy: true /opt/cloudera/parcels/CDH-5.7.1-1.cdh5.7.1.p0.11/lib/hadoop/lib/native/libsnappy.so.1
lz4: true revision:10301
bzip2: true /lib64/libbz2.so.1
openssl: true /usr/lib64/libcrypto.so
最佳答案
您好像遇到了:
如果未找到libhadoop,Snappy可能会抱怨Hadoop是在没有Snappy的情况下构建的。
https://issues.apache.org/jira/browse/HADOOP-13684
您应该调试libhadoop.so并查看LD_LIBRARY_PATH以了解启动器。
关于java - 即使指定了-Djava.library.path =/*/*/,也无法解压缩快照文件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41815667/