starrocks启动和停止和重启脚本

StarRocks启动和停止和重启脚本

编辑脚本:vim start_stop_starrocks.sh

备注:IP修改为自己的IP即可

复制代码
#!/bin/bash

case $1 in
"start"){
        for i in 12.3.7.147 12.3.7.148 12.3.7.149 12.3.7.150
        do
                echo " --------启动 $i be -------"
                ssh $i "/home/hadoop/StarRocks-2.4.1/be/bin/start_be.sh --daemon"
        done
};;
"stop"){
        for i in 12.3.7.147 12.3.7.148 12.3.7.149 12.3.7.150
        do
                echo " --------停止 $i be -------"
                ssh $i "/home/hadoop/StarRocks-2.4.1/be/bin/stop_be.sh --daemon"
        done
};;
"restart"){
        for i in 12.3.7.147 12.3.7.148 12.3.7.149 12.3.7.150
        do
                echo " --------停止 $i be -------"
                ssh $i "/home/hadoop/StarRocks-2.4.1/be/bin/stop_be.sh --daemon"
        done
        sleep 5
                for i in 12.3.7.147 12.3.7.148 12.3.7.149 12.3.7.150
        do
                echo " --------启动 $i be -------"
                ssh $i "/home/hadoop/StarRocks-2.4.1/be/bin/start_be.sh --daemon"
        done
};;
esac

执行命令

启动集群
复制代码
sh start_stop_starrocks.sh start
停止集群
复制代码
sh start_stop_starrocks.sh stop
重启集群
复制代码
sh start_stop_starrocks.sh restart
相关推荐
未济5 天前
linux 配置环境变量
linux
傲世仙尊5 天前
目录即文件-Ext文件系统收尾篇
linux·c语言
虎头金猫5 天前
4K 视频总卡在公网带宽?用 N1 + OpenList 把网盘播放链路重新理顺
运维·服务器·网络·python·容器·beautifulsoup·pandas
_艾伦 耶格尔.5 天前
进程间通信
linux
Liuqy-055 天前
Linux IO编程——静态库、动态库
linux
彧azz5 天前
Linux 环境下 Redis 学习总结:数据类型、持久化、锁、事务、主从与缓存问题
linux·redis·笔记·学习·面试
-梅5 天前
linux(8) 软硬链接
linux·运维·服务器
Wang's Blog5 天前
Java 项目实战: 外卖平台-文件下载与ServletOutputStream回写浏览器
服务器·项目开发
AIgorithmGEEK5 天前
[Linux]线程三部曲(上):一个执行流的诞生——从操作系统一路拆到 pthread_create
linux·线程·pid
琥珀色糖5 天前
SimlpeHttp
linux·服务器