OOZIE 任务管理常用SQL
来源:互联网 发布:手机淘宝登录首页 编辑:程序博客网 时间:2024/06/16 08:34
OOZIE 任务管理常用SQL及命令
1、OOZIE任务执行时长统计
select tp.app_name ,ta.id ,(unix_timestamp(tb.end_time) - unix_timestamp(tb.created_time))/60 long_minutes ,date_format(adddate(date(ta.nominal_time),interval -1 day),'%Y%m%d') data_datefrom ( select * from COORD_JOBS where status='RUNNING') tp inner join ( SELECT * FROM COORD_ACTIONS ) ta on tp.id = ta.job_id AND tp.last_action_number=ta.action_number inner join ( select * from WF_ACTIONS where id like '%hive%') tb on ta.external_id = tb.wf_idorder by long_minutes desc LIMIT 100;
2、OOZIE任务每日执行情况查询
select ta.id, concat('oozie job -rerun ',tb.id,' -action ',ta.action_number) as cmd ,tb.app_name,ta.status from (select * from oozie.COORD_ACTIONS where status not in ('SUCCEEDED') ) ta inner join ( SELECT * FROM COORD_JOBS where (app_name like '%fact%' or app_name like '%rpt%' or app_name like 'ds%' or app_name like 'dim_%' or app_name like 'ods%' or app_name like 'dw%' ) and status = 'RUNNING' ) tb on ta.job_id = tb.id order by status ,app_name;
3、查询指定OOZIE任务
SELECT app_name ,concat('oozie job -rerun ',id,' -action ',last_action_number) as rerun FROM COORD_JOBS where (app_name like '%rpt_bi3_real_op_kpi_di%') and status = 'RUNNING'
4、修改oozie任务并发量
update coord_jobs set concurrency=3 where id in ( '0391230-161231131609747-oozie-bigd-C' ); commit ;
5、查询OOZIE重复提交的任务
SELECT app_name,count(1) cnt FROM COORD_JOBS where status = 'RUNNING' group by app_name having cnt >1
6、更新任务状态 [用时要慎重哦]
update oozie.COORD_ACTIONS set status='SUCCEEDED'where id in ( '0186948-161028184827360-oozie-bigd-C@51');commit ;
7、查任务启动时间
select start_time ,next_matd_time ,created_time ,end_time ,last_modified_time from COORD_JOBS where app_name in ( 'table_name' )and status='RUNNING';
8、更新任务启动时间 (时分秒一定要保持一样)
update COORD_JOBS set start_time='yyyy-MM-dd hh:mi:ss', next_matd_time='yyyy-MM-dd hh:mi:ss'where app_name in ( 'table_name' )and status='RUNNING';
9、常用命令
1、测试任务
oozie job -config job.properties -dryrun
2、正式提交运行一个任务
oozie job -config job.properties -run
3、杀死一个任务
oozie job -kill job_id
4、杀死一个action
oozie job -kill job_id -action action_number
5、重跑一个action
oozie job -rerun job_id -action action_number
6、更新一个oozie的配置文件或者脚本
hdfs dfs -put -f file_name dest_dir -- -f 如果存在则覆盖,不用再单独删除了
7、更新coordinator
oozie job -update job_id
8、挂起一个job
oozie job -suspend job_id
9、重新执行挂起任务
oozie job -resume job_id
0 0
- OOZIE 任务管理常用SQL
- 查询oozie的任务
- oozie常用语句
- Linux常用任务管理命令
- Oozie 定时任务 细节问题
- 管理常用SQL语句
- 管理常用SQL语句
- 管理常用SQL语句
- 管理常用SQL语句
- 管理常用SQL语句
- ORACLE常用管理SQL
- ORACLE管理常用sql
- oracle管理常用SQL
- 常用管理SQL
- JAVA端通过Oozie Client 启动Oozie任务
- oozie 常用标签 -- coordinator.xml
- 通过hue提交oozie定时任务
- SQLServer管理常用SQL语句
- linux下各种解包打包命令大全
- javascript之setTimeout和setInterval
- C/C++头文件
- seleniumIDE command命令
- eclipse 集成 tsf plug-in
- OOZIE 任务管理常用SQL
- Aho-Corasick 多模式匹配算法
- ffmpeg 编译安装
- CRC16算法的Java实现
- Django-Model操作数据库(增删改查、连表结构)
- Java 数组 异常 exception 及其练习
- 远程控制通讯——基于树莓派 Python gpiozero 远程控制LED灯并返回控制结果
- POJ
- 拯救OIBH总部