Last active
May 23, 2016 21:14
-
-
Save aajisaka/3bdf5650d6bb02023901 to your computer and use it in GitHub Desktop.
Shell script used for updating hadoop (trunk) in my development VM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated from 3.0.0-SNAPSHOT to 3.0.0-alpha1-SNAPSHOT