How to schedule a sqoop action using oozie

£可爱£侵袭症+ 提交于 2019-12-01 20:12:45

You need to create coordinator.xml file with start, end and frequency. Here is an example

<coordinator-app name="example-coord" xmlns="uri:oozie:coordinator:0.2"

             frequency="${coord:days(7)}"
             start="${start}"
             end=  "${end}"

             timezone="America/New_York">

  <controls>
    <timeout>5</timeout>
  </controls>

  <action>
    <workflow>
        <app-path>${wf_application_path}</app-path>
    </workflow>
  </action>
</coordinator-app>

Then create coordinator.properties file like this one:

host=namenode01
nameNode=hdfs://${host}:8020

wf_application_path=${nameNode}/oozie/deployments/example
oozie.coord.application.path=${wf_application_path}

start=2013-07-13T07:00Z
end=2013-09-31T23:59Z

Upload your coordinator.xml file to hdfs and then submit your coordinator job with something like

oozie job -config coordinator.properties -run

Check the documentation http://oozie.apache.org/docs/3.3.2/CoordinatorFunctionalSpec.html it contains some examples.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!