0集群运营和小憩Shell脚本

Hadoop2.2.0集群启动和停止Shell脚本

说明:Hadoop2.2.0集群启动和停止Shell脚本,以下脚本中出现的master,slave1,slave2,slave3均已配host。

startupall.sh

#!/bin/bash

hadoophome=”/home/yarn/Hadoop/hadoop-2.2.0/”

ssh slave1 “/bin/bash ${hadoophome}sbin/hadoop-daemon.sh start
journalnode”

ssh slave2 “/bin/bash ${hadoophome}sbin/hadoop-daemon.sh start
journalnode”

ssh slave3 “/bin/bash ${hadoophome}sbin/hadoop-daemon.sh start
journalnode”

ssh master “/bin/bash ${hadoophome}sbin/hadoop-daemon.sh start namenode”

echo “now waiting for 8s security mode “

sleep 8s

ssh slave1 “/bin/bash ${hadoophome}bin/hdfs namenode -bootstrapStandby”

ssh slave1 “/bin/bash ${hadoophome}sbin/hadoop-daemon.sh start namenode”

ssh master “/bin/bash ${hadoophome}bin/hdfs haadmin -transitionToActive
nn1”

ssh master “/bin/bash ${hadoophome}sbin/hadoop-daemons.sh start
datanode”

ssh master “/bin/bash ${hadoophome}sbin/start-yarn.sh”

ssh slave1 “/bin/bash ${hadoophome}sbin/mr-jobhistory-daemon.sh start
historyserver”

shutdownall.sh

#!/bin/bash

hadoophome=”/home/yarn/Hadoop/hadoop-2.2.0/”

ssh master “/bin/bash ${hadoophome}sbin/stop-yarn.sh”

ssh master “/bin/bash ${hadoophome}sbin/stop-dfs.sh”

ssh slave1 “/bin/bash ${hadoophome}sbin/mr-jobhistory-daemon.sh stop
historyserver”

Ubuntu 13.04上搭建Hadoop环境

Ubuntu 12.10 +Hadoop 1.2.1版本集群配置

Ubuntu上搭建Hadoop环境(单机模式+伪分布模式)

Ubuntu下Hadoop环境的配置

单机版搭建Hadoop环境图文教程详解

搭建Hadoop环境(在Winodws环境下用虚拟机虚拟两个Ubuntu系统进行搭建)

说明:Hadoop2.2.0集群启动和停止Shell脚本,以下脚本中出现的master,slave1,slave2,slave3均已配host。
startup…