Hadoop2.2.0 cluster Start and Stop Shell script

Source: Internet
Author: User

Hadoop2.2.0 cluster Start and Stop Shell script

Note: The Hadoop2.2.0 cluster starts and stops the Shell script. The master, slave1, slave2, and slave3 scripts in the following script are all configured with the 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 8 s security mode"

Sleep 8 s

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"

Build a Hadoop environment on Ubuntu 13.04

Cluster configuration for Ubuntu 12.10 + Hadoop 1.2.1

Build a Hadoop environment on Ubuntu (standalone mode + pseudo Distribution Mode)

Configuration of Hadoop environment in Ubuntu

Detailed tutorial on creating a Hadoop environment for standalone Edition

Build a Hadoop environment (using virtual machines to build two Ubuntu systems in a Winodws environment)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.