I used LZO to compress reduce output. I tried this: Hadoop-LZO project of Kevin Weil and then used LzoCodec
class with my job:
TextOutputFormat.setOutputCompressorClass(job, LzoCodec.class);
Now compression works just fine.
My problem is that compression result is a .lzo_deflate
file which I just can't decompress.
Lzop utility doesn't seem to support that type of file.
LzopCodec
is supposed to give a .lzo
file, but it did not work, however it's in th same package as LzoCodec
(org.apache.hadoop.io.compress
) which may refer to a compatibility issue, since I used the old API (0.19) to make compression works.
Answers to this question suggest Python solutions, however I need it in Java.
I'm using Hadoop 1.1.2 and Java 6.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/io/compress/LzopCodec
. I tried to fix the issue until I read somewhere that LzoCodec is more recommended. So that should be clear before. – CorinnecorinthJAVA_LIBRARY_PATH = ''
in the/path/to/hadoop/bin/hadoop
file. I checked the lzop library using/path/to/hadoop/bin/hadoop classpath
command, lzop lib is there the last one. It should work like LzoCodec worked. Have you any idea @CharlesMenguy ? – Corinnecorinthexport HADOOP_CLASSPATH=
andexport JAVA_LIBRARY_PATH=
) through the command line, but the same thing. – Corinnecorinth