#!/bin/bash
#启动zookeeper
for node in node01 node02 node03
do
ssh $node "source ~/.bash_profile; zkServer.sh start"
done
#等待2秒
sleep 2
start-dfs.sh
sleep 2
#启动yarn
ssh node03 "source ~/.bash_profile; start-yarn.sh"
ssh node01 "source ~/.bash_profile; yarn-daemon.sh start resourcemanager "
ssh node02 "source ~/.bash_profile; yarn-daemon.sh start resourcemanager "
echo "==============node1-jps===================="
jps
for node in node02 node03 node04
do
echo "===============$node-jps================="
ssh $node "source /etc/profile; jps"
done
启动HDFS集群脚本
最新推荐文章于 2023-05-05 17:41:28 发布