azkaban群起/群停脚本

群起包括:

  • 第一步启动exec
    此时这列的值为0,下一步激活后变成1
    azkaban群起/群停脚本

  • 第二步激活exec

  • 第三步打开web页面

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

#!/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
上一篇:大数据学习_azkaban启动及报错解决


下一篇:数据调度组件:基于Azkaban协调时序任务执行