Hello Alex, Here's some simple mistakes I made yesterday, maybe the cause is the same? Worth a try.
Have you: - installed the native *C* library? i.e, not the files you download on the google page, but liblzo2. On Ubuntu this is: $> apt-get install lzop According the gplcompression faq: Note that you must have both 32-bit and 64-bit liblzo2 installed. This is how it looks like on my RedHat build machine: % ls -l /usr/lib*/liblzo2* -rw-r--r-- 1 root root 171056 Mar 20 2006 /usr/lib/liblzo2.a lrwxrwxrwx 1 root root 16 Feb 17 2007 /usr/lib/liblzo2.so -> liblzo2.so.2.0.0* lrwxrwxrwx 1 root root 16 Feb 17 2007 /usr/lib/liblzo2.so.2 -> liblzo2.so.2.0.0* -rwxr-xr-x 1 root root 129067 Mar 20 2006 /usr/lib/liblzo2.so.2.0.0* -rw-r--r-- 1 root root 208494 Mar 20 2006 /usr/lib64/liblzo2.a lrwxrwxrwx 1 root root 16 Feb 17 2007 /usr/lib64/liblzo2.so -> liblzo2.so.2.0.0* lrwxrwxrwx 1 root root 16 Feb 17 2007 /usr/lib64/liblzo2.so.2 -> liblzo2.so.2.0.0* -rwxr-xr-x 1 root root 126572 Mar 20 2006 /usr/lib64/liblzo2.so.2.0.0* This tripped me up a little yesterday - I was rushing to get some new nodes installed, and forgot. - Also you'll need to restart your regionservers after installing. At least I had to. Only on the nodes where you installed the lib, though, you don't have to restart everything. Take care, -stu --- On Sat, 7/31/10, Alex Luya <alexander.l...@gmail.com> wrote: > From: Alex Luya <alexander.l...@gmail.com> > Subject: How to get lzo compression library loaded? > To: common-u...@hadoop.apache.org, hdfs-user@hadoop.apache.org > Date: Saturday, July 31, 2010, 4:38 AM > Hello: > I have followed this link:http://code.google.com/p/hadoop-gpl- > compression/wiki/FAQ to install lzo compression library,and > copy > hadoop-lzo-0.4.4.jar to $HADOOP_HOME/lib,and all files > under > ..lib/native/Linux-amd64-64 to > $HADOOP_HOME/lib/native/Linux-amd64-64, > and run example,but got this errors: > ---------------------------------------------------------------------------------------------------------------- > Exception in thread "main" > java.lang.IllegalArgumentException: Compression > codec > > org.apache.hadoop.io.compress.GzipCodec not found. > at > org.apache.hadoop.io.compress.CompressionCodecFactory.getCodecClasses(CompressionCodecFactory.java:96) > at > org.apache.hadoop.io.compress.CompressionCodecFactory.<init>(CompressionCodecFactory.java:134) > at > com.hadoop.compression.lzo.LzoIndex.createIndex(LzoIndex.java:202) > at > com.hadoop.compression.lzo.LzoIndexer.indexSingleFile(LzoIndexer.java:117) > at > com.hadoop.compression.lzo.LzoIndexer.indexInternal(LzoIndexer.java:98) > at > com.hadoop.compression.lzo.LzoIndexer.index(LzoIndexer.java:52) > at > com.hadoop.compression.lzo.LzoIndexer.main(LzoIndexer.java:137) > at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at > java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.hadoop.util.RunJar.main(RunJar.java:156) > Caused by: java.lang.ClassNotFoundException: > > org.apache.hadoop.io.compress.GzipCodec > at > java.net.URLClassLoader$1.run(URLClassLoader.java:202) > at > java.security.AccessController.doPrivileged(Native Method) > at > java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at > java.lang.ClassLoader.loadClass(ClassLoader.java:307) > at > java.lang.ClassLoader.loadClass(ClassLoader.java:248) > at > java.lang.Class.forName0(Native Method) > at > java.lang.Class.forName(Class.java:247) > at > org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:762) > at > org.apache.hadoop.io.compress.CompressionCodecFactory.getCodecClasses(CompressionCodecFactory.java:89) > ... 11 more > > > ---------------------------------------------------------------------------------------------------------------- > > and then I try to add this to hadoop-env.sh: > > export > HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/usr/local/hadoop/hadoop-0.20.2/lib/ > > > Same problem as before,this problem is killing me,because > it has surrounded me > for one month. > > >