Skip to content

Instantly share code, notes, and snippets.

@dain
Forked from electrum/gist:1109934
Created July 27, 2011 18:01
Show Gist options
  • Save dain/1109992 to your computer and use it in GitHub Desktop.
Save dain/1109992 to your computer and use it in GitHub Desktop.
cd src/hadoop-lzo
tar xzvf ~/Downloads/lzo-2.05.tar.gz
cd lzo-2.05
CFLAGS="-arch x86_64" ./configure --build=x86_64-darwin --enable-shared --disable-asm --prefix=$HOME/hadoop-0.20.2/lzo
make -j4
make install
cd ..
env \
JAVA_HOME=/Library/Java/Home \
C_INCLUDE_PATH=$HOME/hadoop-0.20.2/lzo/include \
LIBRARY_PATH=$HOME/hadoop-0.20.2/lzo/lib \
CFLAGS="-arch x86_64" \
ant clean compile-native test tar
mkdir ~/hadoop-0.20.2/lib/native/Mac_OS_X-x86_64-64
cp build/native/Mac_OS_X-x86_64-64/lib/* ~/hadoop-0.20.2/lib/native/Mac_OS_X-x86_64-64/
cp build/hadoop-lzo-0.4.12.jar ~/hadoop-0.20.2/lib/
Edit ~/hadoop-0.20.2/conf/core-site.xml and add:
<property>
<name>io.compression.codecs</name>
<value>org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,com.hadoop.compression.lzo.LzoCodec,com.hadoop.compression.lzo.LzopCodec,org.apache.hadoop.io.compress.BZip2Codec</value>
</property>
<property>
<name>io.compression.codec.lzo.class</name>
<value>com.hadoop.compression.lzo.LzoCodec</value>
</property>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment