-
-
Save peterlee0127/413392ee5ba229676ae2e0f4c7ea6701 to your computer and use it in GitHub Desktop.
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 [ "$1" = "namenode" ] | |
then | |
start-dfs.sh | |
elif [ "$1" = "datanode" ] | |
then | |
netstat -na | grep 50010 -q ; | |
if [ $? -eq 1 ] | |
then | |
echo "next" | |
wget http://hdfs/hadoop.tar.gz | |
tar xvf hadoop* | |
cd hadoop* | |
./bin/hdfs datanode | |
else | |
exit | |
fi | |
elif [ "$1" = "clearHDFS" ] | |
then | |
sudo rm -rf /app/hadoop/tmp | |
sudo mkdir -p /app/hadoop/tmp | |
sudo chown node /app/hadoop/tmp | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment