[root@node1 ~]# cat start-cluster.sh
#! /bin/bash
echo "------正在启动Doris集群------"
SERVERS="node1 node2 node3"
MASTER="node1"
start_fe() {
for SERVER in $SERVERS
do
if [ "$SERVER" = "$MASTER" ]; then
ssh $SERVER "/app/doris-0.14.13/fe/bin/start_fe.sh --daemon;jps -m"
else
ssh $SERVER "/app/doris-0.14.13/fe/bin/start_fe.sh --helper $MASTER:9010 --daemon;jps -m"
fi
done
}
start_be() {
for SERVER in $SERVERS
do
ssh $SERVER "/app/doris-0.14.13/be/bin/start_be.sh --daemon;ps -aux |grep _be"
done
}
echo "------启动FE集群------"
start_fe
echo "------启动BE集群------"
start_be
[root@node1 ~]#
[root@node1 ~]# chmod +x start-cluster.sh
[root@node1 ~]# ll
总用量 12
-rw-------. 1 root root 1260 8月 28 12:34 anaconda-ks.cfg
-rwxr-xr-x 1 root root 780 8月 28 10:52 ssh.sh
-rwxr-xr-x 1 root root 457 8月 30 10:24 start-cluster.sh
[root@node1 ~]# jps
[root@node1 ~]# sh start-cluster.sh
------正在启动Doris集群------
------启动FE集群------
18533 PaloFe
18534 Jps -m
18666 PaloFe -helper node1:9010
18667 Jps -m
17596 PaloFe -helper node1:9010
17597 Jps -m
------启动BE集群------
root 18644 1.0 0.2 178824 4652 pts/0 S+ 11:06 0:00 ssh node1 /app/doris-0.14.13/be/bin/start_be.sh --daemon;ps -aux |grep _be
root 18658 0.0 0.0 113280 1560 ? Ss 11:06 0:00 bash -c /app/doris-0.14.13/be/bin/start_be.sh --daemon;ps -aux |grep _be
root 19066 0.0 0.1 84428 3168 ? R 11:06 0:00 /app/doris-0.14.13/be/lib/palo_be
root 19068 0.0 0.0 112824 956 ? S 11:06 0:00 grep _be
root 18798 0.0 0.0 113280 1560 ? Ss 11:06 0:00 bash -c /app/doris-0.14.13/be/bin/start_be.sh --daemon;ps -aux |grep _be
root 19213 0.0 0.4 92620 7760 ? R 11:06 0:00 /app/doris-0.14.13/be/lib/palo_be
root 19215 0.0 0.0 112824 956 ? S 11:06 0:00 grep _be
root 17735 0.0 0.0 113280 1556 ? Ss 11:06 0:00 bash -c /app/doris-0.14.13/be/bin/start_be.sh --daemon;ps -aux |grep _be
root 18160 4.0 0.4 92620 7760 ? R 11:07 0:00 /app/doris-0.14.13/be/lib/palo_be
root 18162 0.0 0.0 112824 956 ? R 11:07 0:00 grep _be
[root@node1 ~]#
[root@node2 app]# jps
62740 Jps
61414 PaloFe
[root@node2 app]# ps -aux |grep _be
root 13764 0.0 0.0 112824 972 pts/0 S+ 11:03 0:00 grep --color=auto _be
root 61932 0.4 5.1 2873388 96696 ? Sl 10:48 0:04 /app/doris-0.14.13/be/lib/palo_be
[root@node2 app]#
[root@node1 ~]# cat stop-cluster.sh
#! /bin/bash
echo "------正在停止Doris集群------"
SERVERS="node1 node2 node3"
MASTER="node3"
stop_fe() {
for SERVER in $SERVERS
do
ssh $SERVER "/app/doris-0.14.13/fe/bin/stop_fe.sh;jps -m"
done
}
stop_be() {
for SERVER in $SERVERS
do
ssh $SERVER "/app/doris-0.14.13/be/bin/stop_be.sh;ps -aux |grep _be"
done
}
echo "------停止BE集群------"
stop_be
echo "------停止FE集群------"
stop_fe
[root@node1 ~]#
[root@node1 ~]# sh stop-cluster.sh
------正在停止Doris集群------
------停止BE集群------
stop palo_be, and remove pid file.
root 19698 4.0 0.2 178824 4652 pts/0 S+ 11:07 0:00 ssh node1 /app/doris-0.14.13/be/bin/stop_be.sh;ps -aux |grep _be
root 19702 0.0 0.0 113280 1560 ? Ss 11:07 0:00 bash -c /app/doris-0.14.13/be/bin/stop_be.sh;ps -aux |grep _be
root 20097 0.0 0.0 112824 952 ? S 11:07 0:00 grep _be
stop palo_be, and remove pid file.
root 19893 0.0 0.0 113280 1564 ? Ss 11:07 0:00 bash -c /app/doris-0.14.13/be/bin/stop_be.sh;ps -aux |grep _be
root 20314 0.0 0.0 112824 956 ? S 11:07 0:00 grep _be
stop palo_be, and remove pid file.
root 18766 1.0 0.0 113280 1560 ? Ss 11:07 0:00 bash -c /app/doris-0.14.13/be/bin/stop_be.sh;ps -aux |grep _be
root 19142 0.0 0.0 112824 956 ? S 11:07 0:00 grep _be
------停止FE集群------
20649 Jps -m
stop java, and remove pid file.
20824 Jps -m
18666 -- process information unavailable
stop java, and remove pid file.
19682 Jps -m
17596 -- process information unavailable
[root@node1 ~]#
[root@node2 app]# jps
15570 Jps
[root@node2 app]# ps -aux |grep _be
root 15614 0.0 0.0 112824 976 pts/0 S+ 11:04 0:00 grep --color=auto _be
[root@node2 app]#
|