forked from hadoop-deployer/hadoop-deployer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d995c8
commit ed6d7b6
Showing
12 changed files
with
56 additions
and
70 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +0,0 @@ | ||
http://localhost/c/jdk-7u3-linux-x64.tar.gz | ||
http://localhost/c/hadoop-2.0.0-cdh4.0.0.tar.gz | ||
http://localhost/c/hbase-0.92.1-cdh4.0.0.tar.gz | ||
http://localhost/c/hive-0.8.1-cdh4.0.0.tar.gz | ||
http://localhost/c/mysql-connector-java-5.1.16-bin.jar | ||
http://localhost/c/zookeeper-3.4.3-cdh4.0.0.tar.gz | ||
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,39 @@ | ||
#!/usr/bin/env bash | ||
# coding=utf-8 | ||
# Author: [email protected] | ||
# Data: 2012-09 | ||
# Data: 2012-11 | ||
|
||
BAPF="$HOME/.bash_profile" | ||
HIPF="$HOME/.hive_profile" | ||
|
||
if [ ! -e $BAPF ]; then | ||
touch $BAPF; | ||
fi | ||
|
||
if ! grep -q "hive profile" $BAPF; then | ||
echo "" >> $BAPF; | ||
echo "#" >> $BAPF; | ||
echo "# hive profile" >> $BAPF; | ||
echo "#" >> $BAPF; | ||
echo "if [ -f $HIPF ]; then" >> $BAPF; | ||
echo " . $HIPF" >> $BAPF; | ||
echo "fi" >> $BAPF; | ||
echo "#END#" >> $BAPF; | ||
fi | ||
|
||
echo "# Hive profile | ||
export HIVE_HOME=\$HOME/hive | ||
export HIVE_BIN=\$HIVE_HOME/bin | ||
export HIVE_CONF_DIR=\$HIVE_HOME/conf | ||
export PATH=\$HIVE_BIN:\$PATH | ||
alias cch='cd \$HIVE_HOME' | ||
alias cchf='cd \$HIVE_CONF' | ||
" > $HIPF | ||
|
||
. $HIPF | ||
HIFLAG="# hive profile - uc.cn" | ||
|
||
profile() | ||
{ | ||
if ! grep -q "$HIFLAG" $BAPF; then | ||
echo "" >> $BAPF; | ||
echo "$HIFLAG" >> $BAPF; | ||
echo "if [ -f $HIPF ]; then" >> $BAPF; | ||
echo " . $HIPF;" >> $BAPF; | ||
echo "fi" >> $BAPF; | ||
echo "#END#" >> $BAPF; | ||
fi | ||
|
||
echo "$HIFLAG | ||
export HIVE_HOME=\$HOME/hive | ||
export HIVE_BIN=\$HIVE_HOME/bin | ||
export HIVE_CONF_DIR=\$HIVE_HOME/conf | ||
export PATH=\$HIVE_BIN:\$PATH | ||
alias cchi='cd \$HIVE_HOME' | ||
alias cchif='cd \$HIVE_CONF_DIR' | ||
" > $HIPF | ||
} | ||
|
||
unprofile() | ||
{ | ||
rm -f $HIPF | ||
cp $BAPF "$BAPF.$NOW8_6" | ||
sed -i "/$HIFLAG/,/#END#/d" $BAPF | ||
} |
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
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