title: LZO compression with ORC format
body: <p>I am trying to move from text format to ORC format for some very large Hive tables with the hope that it would take less storage and querying would be faster. Since we use LZO as the compression across our estate I was trying to use that for the ORC format as well. </p>
  
  <p>I would be grateful for any help you guys can provide.</p>
  
  <p>I am using Hadoop 2.4.0 and Hive 0.13.1</p>
  
  <p>As per the links below, it seems that it should be possible to use LZO compression with ORC format:</p>
  
  <p><a href="http://2013.berlinbuzzwords.de/sessions/orc-file-improving-hive-data-storage" rel="nofollow">http://2013.berlinbuzzwords.de/sessions/orc-file-improving-hive-data-storage</a>
  <a href="https://hive.apache.org/javadocs/r1.1.0/api/ql/org/apache/hadoop/hive/ql/io/orc/package-summary.html" rel="nofollow">https://hive.apache.org/javadocs/r1.1.0/api/ql/org/apache/hadoop/hive/ql/io/orc/package-summary.html</a></p>
  
  <p>But when I do something like</p>
  
  <pre><code>create table sa_orc_lzo 
  stored as orc  tblproperties ("orc.compress"="LZO")  
  as select * from sa;
  </code></pre>
  
  <p>I get the error below:</p>
  
  <pre><code>Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row {"data".......}
  at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:550)
  at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(ExecMapper.java:177)
  
  **Caused by: java.lang.IllegalArgumentException: LZO is not available.
  at org.apache.hadoop.hive.ql.io.orc.WriterImpl.createCodec**(WriterImpl.java:200)
  at org.apache.hadoop.hive.ql.io.orc.WriterImpl.&lt;init&gt;(WriterImpl.java:175)
  at org.apache.hadoop.hive.ql.io.orc.OrcFile.createWriter(OrcFile.java:369)
  at org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat$OrcRecordWriter.write(OrcOutputFormat.java:83)
  at org.apache.hadoop.hive.ql.exec.FileSinkOperator.processOp(FileSinkOperator.java:649)
  at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:793)
  at org.apache.hadoop.hive.ql.exec.SelectOperator.processOp(SelectOperator.java:87)
  at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:793)
  at org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp(TableScanOperator.java:92)
  at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:793)
  at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:540)
  ... 9 more
  **Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.ql.io.orc.LzoCodec**
  </code></pre>