Oozie工作报告 [英] Report of oozie jobs
问题描述
我们如何获取每天运行的Oozie作业的状态?我们在Oozie协调器中运行着许多工作,目前正在通过Hue/Oozie浏览器进行监视.
How can we get status of Oozie jobs running daily? We have many jobs running in Oozie coordinator and currently we are monitoring through Hue/Oozie browser.
有什么方法可以获取包含协调器名称/工作流程名称以及日期和状态的单个日志文件?我们可以编写任何程序或脚本来实现这一目标吗?
Is there any way we can get a single log file which contains coordinator name/workflow name with date and status? Can we write any program or script to achieve this?
推荐答案
您使用以下命令并将其放入脚本中以每天/定时运行.
You use the below command and put it into a script to run it daily/cron.
oozie jobs -oozie http://localhost:11000/oozie -filter status=RUNNING -len 2
oozie jobs -oozie http://localhost:11000/oozie -filter startCreatedTime=2016-06-28T00:00Z\;endcreatedtime=2016-06-28T10:00Z -len 2
基本上,您正在使用oozie的jobs
api和-filter
命令来获取有关工作流/协调器/捆绑包的信息. -filter
命令支持几个选项,用于基于status
/startCreatedTime
/name
获取数据.
Basically you are using oozie's jobs
api and -filter
command to get the information about workflow/coordinator/bundle. The -filter
command supports couple of options to get the data based on status
/startCreatedTime
/name
.
默认情况下,如果要获取协调器/绑定信息,它将带上工作流程记录信息.您可以将-jobtype
参数和值用作coord/bundle
.
By default, it will bring the workflow record information, if you want to get the coordinator/bindle information. You can use the -jobtype
parameter and value as coord/bundle
.
让我知道您是否特别需要任何东西. oozie文档在此功能上已经过时了.
Let me know if you need anything specifically. The oozie doc is little outdated for this feature.
这篇关于Oozie工作报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!