大数据全系列 教程
1869个小节阅读:467.9k
目录
408考研
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
Hadoop集群的启动脚本:startha.sh (3.x版本)
xxxxxxxxxx
[root@node1 bin]# vim startha.sh
#!/bin/bash
#启动zk集群
for node in node2 node3 node4
do
ssh $node "source /etc/profile;zkServer.sh start"
done
#休眠1s
sleep 1
#启动hdfs集群
start-dfs.sh
#启动yarn
ssh node3 "source /etc/profile;start-yarn.sh"
#查看四个节点上的java进程
allJps.sh
[root@node1 bin]# chmod +x startha.sh #添加执行权限
Hadoop集群的关闭脚本stopha.sh (3.x)
xxxxxxxxxx
[root@node1 bin]# vim stopha.sh
#!/bin/bash
#关闭yarn
ssh node3 "source /etc/profile;stop-yarn.sh"
#关闭hdfs
stop-dfs.sh
#关闭zk集群
for node in node2 node3 node4
do
ssh $node "source /etc/profile;zkServer.sh stop"
done
#查看java进程
allJps.sh
[root@node1 bin]# ll
总用量 20
-rwxr-xr-x 1 root root 220 10月 15 14:50 allJps.sh
-rwxr-xr-x 1 root root 272 10月 25 19:10 startha.sh
-rwxr-xr-x 1 root root 194 10月 15 14:56 starthdfs.sh
-rw-r--r-- 1 root root 227 10月 25 19:17 stopha.sh
-rwxr-xr-x 1 root root 210 10月 15 14:47 stophdfs.sh
[root@node1 bin]# chmod 755 stopha.sh #添加执行权限