Skip to content

Instantly share code, notes, and snippets.

@electrum
Created August 24, 2011 20:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save electrum/1169220 to your computer and use it in GitHub Desktop.
Save electrum/1169220 to your computer and use it in GitHub Desktop.
install hadoop-snappy
cd hadoop-snappy
# Mac OS X
tar xzvf ~/Downloads/snappy-1.0.3.tar.gz
cd snappy-1.0.3
./configure --prefix=$(greadlink -m $PWD/../snappy) && make install
cd ..
# Linux
wget http://snappy.googlecode.com/files/snappy-1.0.3.tar.gz
tar xzvf snappy-1.0.3.tar.gz
cd snappy-1.0.3
CFLAGS="-O2 -DNDEBUG" CXXFLAGS="-O2 -DNDEBUG" ./configure --prefix=$(readlink -m $PWD/../snappy)
make check install
cd ..
mvn clean package -Dsnappy.prefix=$PWD/snappy
tar -C ~/hadoop-0.20.2/lib -xzf target/hadoop-snappy-Mac_OS_X-x86_64-64.tar.gz
@lyndbacon
Copy link

Hi. Thanks for this! It's very informative. I've run into a glitch in using it, tho. I'm trying to install snappy 1.0.5 for use with Hadoop 1.0.3 on Ubuntu 12.04 LTS. I'm getting a build error from maven indicating that no pom.xml exists:

superuser@zdog:/usr/local# mvn clean package -Dsnappy.prefix=$PWD/snapply
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Jul 03 10:28:05 PDT 2012
[INFO] Final Memory: 3M/240M

I get the same missing pom.xml message when I don't use the clean option for mvn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment