其他分享
首页 > 其他分享> > azkaban群起/群停脚本

azkaban群起/群停脚本

作者:互联网

群起包括:

脚本代码(注意修改自己的主机名和安装路径

#!/bin/bash

start-web(){
	for i in hadoop102;
	do
		ssh $i "cd /opt/module/azkaban/azkaban-web;bin/start-web.sh"
	done
}

stop-web(){
	for i in hadoop102;
	do
		ssh $i "cd /opt/module/azkaban/azkaban-web;bin/shutdown-web.sh"
	done
}

start-exec(){
	for i in hadoop102 hadoop103 hadoop104;
	do
		ssh $i "cd /opt/module/azkaban/azkaban-exec;bin/start-exec.sh"
	done
}

activate-exec(){
	for i in hadoop102 hadoop103 hadoop104;
	do
		ssh $i "curl -G "$i:12321/executor?action=activate" && echo"
	done
}

stop-exec(){
	for i in hadoop102 hadoop103 hadoop104;
	do
		ssh $i "/opt/module/azkaban/azkaban-exec/bin/shutdown-exec.sh"
	done
}

case $1 in
	start-exec)
		start-exec;;
	activate-exec)
		activate-exec;;
	stop-exec)
		stop-exec;;
	start-web)
		start-web;;
	stop-web)
		stop-web;;
esac

标签:web,exec,stop,azkaban,start,群停,done,群起
来源: https://www.cnblogs.com/sunbr/p/14405763.html