oozie hdfs demo

来源:互联网 发布:单片机乐谱 编辑:程序博客网 时间:2024/05/02 01:05

job.properties

nameNode=hdfs://nameservicejobTracker=yarnRMqueueName=defaultexamplesRoot=examples#oozie.libpath=${nameNode}/user/${user.name}/liboozie.wf.application.path=${nameNode}/user/${user.name}/oozie/fs#outputdir=output-${data.M}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

workflow.xml 删除hdfs文件

<workflow-app name='fs-wf' xmlns="uri:oozie:workflow:0.2">      <start to='fs1'/>      <action name="fs1">        <fs>            <delete path="${nameNode}/user/${wf:user()}/123/*" />        </fs>        <ok to="end" />        <error to="kill" />    </action>    <kill name='kill'>          <message>Something went wrong: ${wf:errorCode('fs1')}</message>      </kill>      <end name='end'/>  </workflow-app> 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

workflow.xml 移动Hdfs目录

<workflow-app name='fs-wf' xmlns="uri:oozie:workflow:0.5">      <start to='fs1'/>      <action name="fs1">        <fs>            <move source="appdatas"  target="business" />        </fs>        <ok to="end" />        <error to="kill" />    </action>    <kill name='kill'>          <message>Something went wrong: ${wf:errorCode('wordcount')}</message>      </kill>      <end name='end'/>  </workflow-app>
0 0