Created
December 27, 2010 21:53
-
-
Save oza/756603 to your computer and use it in GitHub Desktop.
hr
This file contains hidden or 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 | |
hadoop dfsadmin -safemode enter | |
/etc/init.d/hadoop-0.20-datanode stop | |
/etc/init.d/hadoop-0.20-secondarynamenode stop | |
/etc/init.d/hadoop-0.20-namenode restart | |
/etc/init.d/hadoop-0.20-secondarynamenode start | |
/etc/init.d/hadoop-0.20-jobtracker restart | |
/etc/init.d/hadoop-0.20-tasktracker restart | |
/etc/init.d/hadoop-0.20-datanode start | |
hadoop dfsadmin -safemode leave |
This file contains hidden or 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
alias hfs='hadoop fs' | |
alias dowc='hadoop fs -rmr out && hadoop jar /usr/lib/hadoop-0.20/hadoop-0.20.2+737-examples.jar wordcount in out' |
This file contains hidden or 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 | |
echo " | |
deb http://archive.cloudera.com/debian lenny-cdh3 contrib | |
deb-src http://archive.cloudera.com/debian lenny-cdh3 contrib | |
deb http://ftp.jp.debian.org/debian/ lenny main non-free | |
deb-src http://ftp.jp.debian.org/debian/ lenny main non-free | |
" >> /etc/apt/sources.list.d/cloudera.list | |
aptitude update | |
aptitude -y install sun-java6-jdk curl | |
curl -s http://archive.cloudera.com/debian/archive.key | sudo apt-key add - | |
aptitude -y install hadoop-0.20 hadoop-0.20-conf-pseudo | |
cp -r /etc/hadoop-0.20/conf.pseudo /etc/hadoop-0.20/conf.my_cluster | |
rm -rf /etc/hadoop-0.20/conf.my_cluster/conf.pseudo | |
update-alternatives --install /etc/hadoop-0.20/conf hadoop-0.20-conf /etc/hadoop-0.20/conf.my_cluster 50 | |
update-alternatives --display hadoop-0.20-conf | |
# | |
echo " | |
Please edit files: | |
/etc/hadoop-0.20/conf.my_cluster/core-sites.xml | |
/etc/hadoop-0.20/conf.my_cluster/hdfs-sites.xml | |
/etc/hadoop-0.20/conf.my_cluster/mapred-sites.xml | |
After doing this, please run 'run-all.sh' | |
" | |
# master | |
/etc/init.d/hadoop-0.20-namenode start | |
/etc/init.d/hadoop-0.20-secondarynamenode start | |
/etc/init.d/hadoop-0.20-jobtracker start | |
# slave | |
#/etc/init.d/hadoop-0.20-tasktracker start | |
#/etc/init.d/hadoop-0.20-datanode start | |
#jps | |
This file contains hidden or 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 | |
echo " | |
deb http://archive.cloudera.com/debian lenny-cdh3 contrib | |
deb-src http://archive.cloudera.com/debian lenny-cdh3 contrib | |
deb http://ftp.jp.debian.org/debian/ lenny main non-free | |
deb-src http://ftp.jp.debian.org/debian/ lenny main non-free | |
" >> /etc/apt/sources.list.d/cloudera.list | |
aptitude update | |
aptitude -y install sun-java6-jdk curl | |
curl -s http://archive.cloudera.com/debian/archive.key | sudo apt-key add - | |
aptitude -y install hadoop-0.20 hadoop-0.20-tasktracker hadoop-0.20-datanode | |
update-alternatives --install /etc/hadoop-0.20/conf hadoop-0.20-conf /etc/hadoop-0.20/conf.my_cluster 50 | |
update-alternatives --display hadoop-0.20-conf | |
# slave | |
/etc/init.d/hadoop-0.20-tasktracker start | |
/etc/init.d/hadoop-0.20-datanode start | |
jps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment