编程语言
首页 > 编程语言> > java – Hadoop-LZO奇怪的native-lzo库没有错误

java – Hadoop-LZO奇怪的native-lzo库没有错误

作者:互联网

我已经安装了Cloudera Hadoop-LZO软件包并将以下设置添加到我的客户端环境安全阀中:

HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/opt/cloudera/parcels/HADOOP_LZO/lib/hadoop/lib/*
JAVA_LIBRARY_PATH=$JAVA_LIBRARY_PATH:/opt/cloudera/parcels/HADOOP_LZO/lib/hadoop/lib/native

但是,我得到了最奇怪的native-lzo库不可用的错误:

13/08/05 23:59:06 INFO lzo.GPLNativeCodeLoader: Loaded native gpl library
13/08/05 23:59:06 INFO lzo.LzoCodec: Successfully loaded & initialized native-lzo library [hadoop-lzo rev 6298911ef75545c61859c08add6a74a83e0183ad]
13/08/05 23:59:07 INFO mapred.JobClient: Running job: job_201308052350_0003
13/08/05 23:59:08 INFO mapred.JobClient:  map 0% reduce 0%
13/08/05 23:59:18 INFO mapred.JobClient: Task Id : attempt_201308052350_0003_m_000000_0, Status : FAILED
java.lang.RuntimeException: native-lzo library not available
        at com.hadoop.compression.lzo.LzopCodec.getDecompressorType(LzopCodec.java:96)
        at org.apache.hadoop.io.compress.CodecPool.getDecompressor(CodecPool.java:131)
        at org.apache.hadoop.mapreduce.lib.input.LineRecordReader.initialize(LineRecordReader.java:86)
        at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:478)
        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:671)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:330)
        at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:396)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
        at org.apache.hadoop.mapred.Child.main(Child.java:262)

为什么会说native-lzo库成功加载,然后抱怨本机lzo库不可用?这些异常是否来自DataNodes?

解决方法:

问题是我们没有在数据节点上安装lzop!完成以下指示后,一切顺利:

sudo apt-get install lzop

希望有所帮助!

标签:java,hadoop,lzo
来源: https://codeday.me/bug/20190709/1408708.html