博客园 首页 私信博主 显示目录 隐藏目录 管理 动画

shells/hadoop

 1 #!/bin/bash
 2 case $1 in
 3 ""){
 4 /root/shells/stopfirewalld.sh
 5 /root/shells/wait-time.sh 3
 6 /root/shells/hadoop.sh start
 7 /root/shells/wait-time.sh 3
 8 /root/shells/zkServer.sh start
 9 /root/shells/wait-time.sh 3
10 /root/shells/zkServer.sh status
11 /root/shells/kafka.sh start
12 /root/shells/wait-time.sh 3
13 echo "==== jps 106 ==="
14 jps
15 echo "==== jps 107 ==="
16 ssh hadoop107 "jps"
17 echo "==== jps 108 ==="
18 ssh hadoop108 "jps"
19 };;
20 "stop"){
21 /root/shells/kafka.sh $1
22 /root/shells/wait-time.sh 2
23 /root/shells/zkServer.sh $1
24 /root/shells/wait-time.sh 2 
25 /root/shells/zkServer.sh status
26 /root/shells/wait-time.sh 2 
27 /root/shells/hadoop.sh $1
28 /root/shells/wait-time.sh 2 
29 echo "==== jps 106 ==="
30 jps
31 echo "==== jps 107 ==="
32 ssh hadoop107 "jps"
33 echo "==== jps 108 ==="
34 ssh hadoop108 "jps"
35 };;
36 esac

 

#!/bin/bash
case $1 in
""){
/root/shells/stopfirewalld.sh
/root/shells/wait-time.sh 3
/root/shells/hadoop.sh start
/root/shells/wait-time.sh 3
/root/shells/zkServer.sh start
/root/shells/wait-time.sh 3
/root/shells/zkServer.sh status
/root/shells/kafka.sh start
/root/shells/wait-time.sh 3
echo "==== jps 106 ==="
jps
echo "==== jps 107 ==="
ssh hadoop107 "jps"
echo "==== jps 108 ==="
ssh hadoop108 "jps"
};;
"stop"){
/root/shells/kafka.sh $1
/root/shells/wait-time.sh 2
/root/shells/zkServer.sh $1
/root/shells/wait-time.sh 2 
/root/shells/zkServer.sh status
/root/shells/wait-time.sh 2 
/root/shells/hadoop.sh $1
/root/shells/wait-time.sh 2 
echo "==== jps 106 ==="
jps
echo "==== jps 107 ==="
ssh hadoop107 "jps"
echo "==== jps 108 ==="
ssh hadoop108 "jps"
};;
esac

 

posted @ 2022-04-13 09:47  CHANG_09  阅读(30)  评论(0)    收藏  举报