document.write('<link rel="stylesheet" href="http://gist.github.com/stylesheets/gist/embed.css"/>')





document.write('<div id=\"gist-169730\" class=\"gist\">\n  \n  \n    \n            \n\n      <div class=\"gist-file\">\n        <div class=\"gist-data gist-syntax\">\n          \n          \n          \n            <div class=\"gist-highlight\"><pre><div class=\"line\" id=\"LC1\"><span class=\"c\"># checkout the LZO-related code from Google Code<\/span><\/div><div class=\"line\" id=\"LC2\">svn checkout http://hadoop-gpl-compression.googlecode.com/svn/trunk/ hadoop-gpl-compression<\/div><div class=\"line\" id=\"LC3\">&nbsp;<\/div><div class=\"line\" id=\"LC4\"><span class=\"c\"># build the Java code<\/span><\/div><div class=\"line\" id=\"LC5\"><span class=\"nb\">cd <\/span>hadoop-gpl-compression<\/div><div class=\"line\" id=\"LC6\">ant<\/div><div class=\"line\" id=\"LC7\">&nbsp;<\/div><div class=\"line\" id=\"LC8\"><span class=\"c\"># move the jar file to $HADOOP_HOME/lib<\/span><\/div><div class=\"line\" id=\"LC9\">mv build/hadoop-gpl-compression-0.1.0-dev.jar <span class=\"nv\">$HADOOP_HOME<\/span>/lib/<\/div><div class=\"line\" id=\"LC10\">&nbsp;<\/div><div class=\"line\" id=\"LC11\"><span class=\"c\"># build the LZO native C code<\/span><\/div><div class=\"line\" id=\"LC12\"><span class=\"nb\">cd <\/span>src/native<\/div><div class=\"line\" id=\"LC13\">sudo apt-get install liblzo2-dev<\/div><div class=\"line\" id=\"LC14\"><span class=\"c\"># indicate if your JVM is 32-bit or 64-bit<\/span><\/div><div class=\"line\" id=\"LC15\"><span class=\"nb\">export <\/span><span class=\"nv\">JVM_DATA_MODEL<\/span><span class=\"o\">=<\/span>32<\/div><div class=\"line\" id=\"LC16\">./configure<\/div><div class=\"line\" id=\"LC17\">make<\/div><div class=\"line\" id=\"LC18\">cp -rf .libs/libgplcompression.* <span class=\"nv\">$HADOOP_HOME<\/span>/lib/Linux-i386-32/<\/div><div class=\"line\" id=\"LC19\">&nbsp;<\/div><div class=\"line\" id=\"LC20\"><span class=\"c\"># now you&#39;re good to go. launch a test job to verify if LZO compression is working fine.<\/span><\/div><div class=\"line\" id=\"LC21\"><span class=\"nv\">$HADOOP_HOME<\/span>/bin/hadoop jar <span class=\"nv\">$HADOOP_HOME<\/span>/hadoop-0.20.0-examples.jar randomtextwriter -Dtest.randomtextwrite.bytes_per_map<span class=\"o\">=<\/span>104857600 -Dtest.randomtextwrite.maps_per_host<span class=\"o\">=<\/span>3 -Dmapred.output.compress<span class=\"o\">=<\/span><span class=\"nb\">true<\/span> -Dmapred.output.compression.type<span class=\"o\">=<\/span>BLOCK -Dmapred.output.compression.codec<span class=\"o\">=<\/span>com.hadoop.compression.lzo.LzopCodec randomtext_BLOCK_LzopCodec<\/div><\/pre><\/div>\n          \n        <\/div>\n\n        <div class=\"gist-meta\">\n          <a href=\"http://gist.github.com/raw/169730/13ba3267fcea51f54271bced42cdb72fa2632f67/LZO-Hadoop-0.20.sh\" style=\"float:right;\">view raw<\/a>\n          <a href=\"http://gist.github.com/169730#file_lzo_hadoop_0.20.sh\" style=\"float:right;margin-right:10px;color:#666\">LZO-Hadoop-0.20.sh<\/a>\n          <a href=\"http://gist.github.com/169730\">This Gist<\/a> brought to you by <a href=\"http://github.com\">GitHub<\/a>.\n        <\/div>\n      <\/div>\n    \n  \n<\/div>\n')
