oozie客户端常用命令

来源:互联网 发布:未识别的网络不能上网 编辑:程序博客网 时间:2024/05/16 12:53
http://zhangrenhua.com博客已搬家

1.提交作业,作业进入PREP状态 
oozie job -oozie 
http://localhost:11000/oozie
 -config job.properties -submit 
job: 14-20090525161321-oozie-joe


2.
执行已提交的作业

oozie job -oozie

http://localhost:11000/oozie -start 14-20090525161321-oozie-joe 

 

3.直接运行作业 
oozie job -oozie 
http://localhost:11000/oozie -config job.properties -run 

 

4.挂起作业,挂起前状态(RUNNING , RUNNIINGWITHERROR or PREP状态) 
workflow job will be in SUSPENDED status. 

 

5.杀死作业 
oozie job -oozie 
http://localhost:11000/oozie -kill 14-20090525161321-oozie-joe 

 

6.改变作业参数,不能修改killed状态的作业 
oozie job -oozie 
http://localhost:11000/oozie -change 14-20090525161321-oozie-joe -valueendtime=2011-12-01T05:00Z;concurrency=100;2011-10-01T05:00Z 

7.重新运行作业 
oozie job -oozie 
http://localhost:11000/oozie
 -config job.properties -rerun 14-20090525161321-oozie-joe 
000000-130817230824019-oozie-ceny-W 
Rerunning a Coordinator Action or Multiple Actions 
$oozie job -rerun <coord_Job_id> [-nocleanup] [-refresh] 
[-action 1, 3-4, 7-40] (-action or -date is required to rerun.) 
[-date 2009-01-01T01:00Z::2009-05-31T23:59Z, 2009-11-10T01:00Z,2009-12-31T22:00Z] 
Rerunning a Bundle Job 
oozie job -rerun <bundle_Job_id> [-nocleanup] [-refresh] 
[-coordinator c1, c3, c4] (-coordinator or -date is required to rerun.) 
[-date 2009-01-01T01:00Z::2009-05-31T23:59Z, 2009-11-10T01:00Z,2009-12-31T22:00Z] 
(if neither -coordinator nor -date is given, the exception will be thrown.)

 

8.检查作业状态 
oozie job -oozie 
http://localhost:11000/oozie -info 14-20090525161321-oozie-joe

oozie job-oozie http://localhost:11000/oozie -info 0000001-111219170928042-oozie-para-W@mr-node -verbose 

 

9.查看日志 
oozie job -oozie 
http://localhost:11000/oozie
 -log 14-20090525161321-oozie-joe 
oozie job -log <coord_job_id> [-action 1, 3-4, 7-40] (-action isoptional.)

 

10.检查xml文件是否合规 
oozie validate myApp/workflow.xml

 

11.提交pig作业 
oozie pig -oozie 
http://localhost:11000/oozie -file pigScriptFile -config job.properties -X -param_file params

 

12.提交MR作业 
oozie mapreduce -oozie 
http://localhost:11000/oozie -config job.properties

 

 

usage: 
      the env variable 'OOZIE_URL' is used as defaultvalue for the '-oozie' option 
      the env variable 'OOZIE_TIMEZONE' is used asdefault value for the '-timezone' option 
      custom headers for Oozie web services can bespecified using '-Dheader:NAME=VALUE'      oozie help: display usage 

      oozie version : show client version 

      oozie job <OPTIONS> : job operations 
               -action <arg>         coordinatorrerun on action ids (requires -rerun); coordinator log retrieval on action ids(requires -log) 
               -auth <arg>          select authentication type [SIMPLE|KERBEROS] 
               -change <arg>         change acoordinator/bundle job 
               -config <arg>         jobconfiguration file '.xml' or '.properties' 
               -D <property=value>   set/override value for given property 
               -date <arg>          coordinator/bundle rerun on action dates (requires -rerun) 
               -definition <arg>     job definition 
               -doas <arg>          doAs user, impersonates as the specified user 
               -dryrun              Dryrun a workflow (since 3.3.2) or coordinator (since 2.0) job without actuallyexecuting it 
               -info <arg>          info of a job 
               -kill <arg>          kill a job 
               -len <arg>           number of actions (default TOTAL ACTIONS, requires -info) 
               -localtime           use local time (same as passing your time zone to -timezone). 
                                     Overrides -timezone option 
               -log <arg>           job log 
               -nocleanup            donot clean up output-events of the coordinator rerun actions 
                                     (requires -rerun) 
               -offset <arg>         job infooffset of actions (default '1', requires -info) 
               -oozie <arg>          OozieURL 
               -refresh             re-materialize the coordinator rerun actions (requires -rerun) 
               -rerun <arg>          reruna job  (coordinator requires -action or -date; bundle requires-coordinator or -date) 
               -resume <arg>         resume ajob 
               -run                 run a job 
               -start <arg>          starta job 
               -submit              submit a job 
               -suspend <arg>        suspend ajob 
               -timezone <arg>       use time zone withthe specified ID (default GMT). 
                                     See 'oozie info -timezones' for a list 
               -value <arg>          new endtime/concurrency/pausetimevalue for changing a 
                                     coordinator job; new pausetime value for changing a bundle job 
               -verbose             verbose mode 

      oozie jobs <OPTIONS> : jobs status 
                -auth <arg>          selectauthentication type [SIMPLE|KERBEROS] 
                -doas <arg>          doAsuser, impersonates as the specified user. 
                -filter <arg>       user=<U>;name=<N>;group=<G>;status=<S>;... 
                -jobtype <arg>       job type ('Supportedin Oozie-2.0 or later versions ONLY - coordinator' or 'wf' (default)) 
                -len <arg>          number of jobs (default '100') 
                -localtime           uselocal time (same as passing your time zone to -timezone). Overrides -timezoneoption 
                -offset <arg>        jobs offset(default '1') 
                -oozie <arg>         OozieURL 
                -timezone <arg>      use time zone with thespecified ID (default GMT). See 'oozie info -timezones' for a list 
                -verbose            verbose mode 

      oozie admin <OPTIONS> : adminoperations 
                 -auth <arg>         selectauthentication type [SIMPLE|KERBEROS] 
                 -doas <arg>         doAs user,impersonates as the specified user. 
                 -oozie <arg>        Oozie URL 
                 -queuedump          show Oozieserver queue elements 
                 -status            show the current system status 
                 -systemmode <arg>   Supported in Oozie-2.0 or later versionsONLY. Change oozie 
                                     system mode [NORMAL|NOWEBSERVICE|SAFEMODE] 
                 -version            showOozie server build version 

      oozie validate <ARGS> : validate aworkflow XML file 

      oozie sla <OPTIONS> : sla operations(Supported in Oozie-2.0 or later) 
               -auth <arg>          select authentication type [SIMPLE|KERBEROS] 
               -len <arg>           number of results (default '100', max limited by oozie server setting whichdefaults to '1000') 
               -offset <arg>         startoffset (default '0') 
               -oozie <arg>          OozieURL 
               -filter <arg>        jobid=<JobID/ActionID>\;appname=<Application Name> 

      oozie pig <OPTIONS> -X <ARGS> :submit a pig job, everything after '-X' are pass-through parameters topig 
               -auth <arg>          select authentication type [SIMPLE|KERBEROS] 
               -doas <arg>          doAs user, impersonates as the specified user. 
               -config <arg>         jobconfiguration file '.properties' 
               -D <property=value>   set/override value for givenproperty 
               -file <arg>          Pig script 
               -oozie <arg>          OozieURL 

      oozie info <OPTIONS> : get more detailedinfo about specific topics 
               -timezones   display a list of available time zones

0 0