oozie-Custom Implementation Workflow Shell action

Source: Internet
Author: User

    1. Copy the default shell directory for modification
      $ cp -r ./examples/apps/shell/ my-apps/
    2. Define Job.properties
      nameNode=hdfs://bigdata-00:8020jobTracker=bigdata-00:8032queueName=defaultexamplesRoot=user/wulei/my-apps/shell#定义workflow.xml路劲oozie.wf.application.path=${nameNode}/${examplesRoot}/workflow.xml#定义一个变量名存储shell文件名EXEC=oozie.sh
    3. Define Workflow.properties
      <Workflow-appxmlns="uri:oozie:workflow:0.4"Name="SHELL-WF" ><Startto="Shell-node"/><ActionName="Shell-node" ><Shellxmlns="uri:oozie:shell-action:0.2" ><job-tracker>${Jobtracker}</Job-tracker><name-node>${NameNode}</Name-node><Configuration><Property><Name>mapred.job.queue.name</Name><value>${QueueName}</Value></Property></Configuration><exec>${EXEC}</Exec><!--define shell script Road---<file>${NameNode}/${Examplesroot}/${EXEC}#${EXEC}</File><!--Copy the executable to compute node's current working directory--</Shell><Okto="End"/><error to= " Fail "/> </action> <kill name= "fail" > << Span class= "Hljs-name" >message>shell action failed, error Message[${WF: ErrorMessage (Wf:lasterrornode ())}]</ message> </kill> <end name=" end "/></< Span class= "Hljs-name" >WORKFLOW-APP>           
    4. Define the script to be implemented

      19.png
    5. Run after uploading to HDFs

      20.png
    6. View Run Results

      21.png

      22.png

oozie-Custom Implementation Workflow Shell action

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.