Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

The formatting on the Manual Instruction page for LZO Configuration results in Errors [ New ]

The formatting on the Manual Instruction page for LZO Configuration results in Errors [ New ]

New Contributor

I successfully installed LZO as described at the bottom of the cloudera instructions here.

 

I configured the core-site.xml file as described here which copy and pasted, is:

 

  <property>
    <name>io.compression.codecs</name>
  <value>
org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.GzipCodec,
org.apache.hadoop.io.compress.BZip2Codec,com.hadoop.compression.lzo.LzoCodec,com.hadoop.compression.lzo.LzopCodec,
org.apache.hadoop.io.compress.SnappyCodec
  </value>
  </property>

This results in:

 

java.lang.RuntimeException: Error in configuring object

at ...

Caused by: java.lang.IllegalArgumentException: Compression codec
org.apache.hadoop.io.compress.DefaultCodec not found.
        at org.apache.hadoop.io.compress.CompressionCodecFactory.getCodecClasses(CompressionCodecFactory.java:134)
        at org.apache.hadoop.io.compress.CompressionCodecFactory.<init>(CompressionCodecFactory.java:174)
        at org.apache.hadoop.mapred.TextInputFormat.configure(TextInputFormat.java:38)
        ... 34 more
Caused by: java.lang.ClassNotFoundException: Class
org.apache.hadoop.io.compress.DefaultCodec not found
        at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1680)
        at org.apache.hadoop.io.compress.CompressionCodecFactory.getCodecClasses(CompressionCodecFactory.java:127)


Searching Google told me to modify the core-site.xml file by removing line breaks and white spaces, which I have copied and pasted here:

 

  <property>
    <name>io.compression.codecs</name>
 <value>org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.BZip2Codec,com.hadoop.compression.lzo.LzoCodec,com.hadoop.compression.lzo.LzopCodec,org.apache.hadoop.io.compress.SnappyCodec</value>
  </property>

This solves the problem.

 

Interestingly, even if you do:

 

  <property>
    <name>io.compression.codecs</name>
 <value>org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.BZip2Codec,com.hadoop.compression.lzo.LzoCodec,com.hadoop.compression.lzo.LzopCodec,org.apache.hadoop.io.compress.SnappyCodec

</value>
  </property>

It will result in a Class Not Found error for the SnappyCodec.