#!/bin/bash
SERVERS="hadoop102 hadoop103 hadoop104"
MASTER="hadoop102"
if [ $# -lt 1 ]
then
echo "No Args Input..."
exit ;
fi
case $1 in
"start")
echo "------正在启动Doris集群------"
start_fe() {
for SERVER in $SERVERS
do
if [ "$SERVER" = "$MASTER" ]; then
ssh $SERVER "/opt/module/doris/fe/bin/start_fe.sh --daemon;jps -m"
else ssh $SERVER "/opt/module/doris/fe/bin/start_fe.sh --helper $MASTER:9010 --daemon;jps -m"
fi
done
}
start_be() {
for SERVER in $SERVERS
do
ssh $SERVER "/opt/module/doris/be/bin/start_be.sh --daemon;ps -aux |grep _be"
done
}
start_broker() {
for SERVER in $SERVERS

这是一个用于启动和停止Doris集群的自动化脚本,包括FE、BE和BROKER节点。脚本通过SSH连接到hadoop102、hadoop103和hadoop104节点,执行相应的启动或停止命令。根据传入的参数(start或stop),脚本将执行对应的操作。
最低0.47元/天 解锁文章
1642

被折叠的 条评论
为什么被折叠?



