A key to start the cluster shell script

Source: Internet
Author: User
Tags zookeeper ssh


A key to start the cluster shell script, including HDFs HA + yarn related to all the programs, fbi00x is the host name for your reference:


#!/bin/bash
echo "-------------------------Step1----------------------------"
    
echo "Now,starting Zookeeper."
ssh FBI001 $ZOOKEEPER_HOME/bin/zkServer.sh start
ssh FBI002 $ZOOKEEPER_HOME/bin/zkServer.sh start
ssh FBI003 $ZOOKEEPER_HOME/bin/zkServer.sh start
    
ssh FBI001 $ZOOKEEPER_HOME/bin/zkServer.sh status
ssh FBI002 $ZOOKEEPER_HOME/bin/zkServer.sh status
ssh FBI003 $ZOOKEEPER_HOME/bin/zkServer.sh status
echo "Now,Zookeeper is started."
    
echo "-------------------------Step2----------------------------"
    
echo "Now,starting ZKFC."
ssh FBI001 $HADOOP_HOME/sbin/hadoop-daemon.sh start zkfc
ssh FBI002 $HADOOP_HOME/sbin/hadoop-daemon.sh start zkfc
echo "Now,ZKFC started."
    
echo "-------------------------Step3----------------------------"
    
echo "Now,starting JN."
ssh FBI001 $HADOOP_HOME/sbin/hadoop-daemon.sh start journalnode
ssh FBI002 $HADOOP_HOME/sbin/hadoop-daemon.sh start journalnode
ssh FBI003 $HADOOP_HOME/sbin/hadoop-daemon.sh start journalnode
echo "Now,JN started."
    
echo "-------------------------Step4----------------------------"
    
echo "Now,starting Active,Standby NN."
ssh FBI001 $HADOOP_HOME/sbin/hadoop-daemon.sh start namenode
ssh FBI002 $HADOOP_HOME/sbin/hadoop-daemon.sh start namenode
echo "Now,Active,Standby NN started."
    
echo "-------------------------Step5----------------------------"
    
echo "Now,starting DataNodes."
ssh FBI001 $HADOOP_HOME/sbin/hadoop-daemons.sh start datanode
echo "Now,DataNodes started."
    
echo "-------------------------Step6----------------------------"
    
echo "Now,starting YARN."
ssh FBI003 $HADOOP_HOME/sbin/start-yarn.sh
echo "Now,YARN started."
    
echo "-------------------------Step7----------------------------"
    
echo "Now,starting MR JobHistory Server."
ssh FBI004 $HADOOP_HOME/sbin/mr-jobhistory-daemon.sh start historyserver
echo "Now,MR JobHistory Server started."


This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/tools/


Related Article

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.