Skip to content

Instantly share code, notes, and snippets.

@aajisaka
Last active May 23, 2016 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aajisaka/3bdf5650d6bb02023901 to your computer and use it in GitHub Desktop.
Save aajisaka/3bdf5650d6bb02023901 to your computer and use it in GitHub Desktop.
Shell script used for updating hadoop (trunk) in my development VM
#!/bin/sh
if [ $# -ne 1 ]; then
echo "Usage ./updateHadoop.sh <NAME>"
echo "New hadoop package will be installed into /usr/hadoop/NAME"
echo "We recommend to use <YYYYMMDD-ISSUEID> for NAME."
exit 1
fi
# New hadoop package is installed to /usr/local/NAME
NAME=$1
VERSION=3.0.0-alpha1-SNAPSHOT
TARBALL=hadoop-${VERSION}.tar.gz
if [ ! -f $TARBALL ]; then
echo "${TARBALL} not found."
exit 1
fi
tar xf $TARBALL
/bin/mv hadoop-${VERSION} /usr/local/$NAME
# copy the previous configuration
/bin/cp -f /etc/hadoop/conf/*.xml /usr/local/$NAME/etc/hadoop/
/bin/rm /usr/local/hadoop
ln -s /usr/local/$NAME /usr/local/hadoop
/bin/rm $TARBALL
@aajisaka
Copy link
Author

Updated from 3.0.0-SNAPSHOT to 3.0.0-alpha1-SNAPSHOT

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