Last active
December 25, 2015 18:19
-
-
Save tmusabbir/7019540 to your computer and use it in GitHub Desktop.
Oozie Example: Java Action / MapReduce Jobs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oozie Example: Java Action / MapReduce Jobs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ambari-qa@ip-10-0-0-51 ~]$ hadoop fs -lsr /user/ambari-qa/example/java-oozie | |
drwxrwx--- - ambari-qa hdfs 0 2013-03-03 01:53 /user/ambari-qa/example/java-oozie/lib | |
-rwxrwx--- 3 ambari-qa hdfs 473690 2013-03-03 01:53 /user/ambari-qa/example/java-oozie/lib/TestMR.jar | |
-rwxrwx--- 3 ambari-qa hdfs 1700 2013-03-03 01:47 /user/ambari-qa/example/java-oozie/workflow.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nameNode=hdfs://ip-10-0-0-52:8020 | |
jobTracker=ip-10-0-0-53:50300 | |
queueName=default | |
exampleRoot=example | |
oozie.use.system.libpath=true | |
oozie.libpath=/user/oozie/share/lib | |
oozie.wf.application.path=${nameNode}/user/${user.name}/${exampleRoot}/java-oozie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<workflow-app xmlns='uri:oozie:workflow:0.4' name='java-workflow'> | |
<start to='java-action' /> | |
<action name="java-action"> | |
<java> | |
<job-tracker>${jobTracker}</job-tracker> | |
<name-node>${nameNode}</name-node> | |
<prepare> | |
<delete path="${nameNode}/user/${wf:user()}/${exampleRoot}/output"/> | |
</prepare> | |
<configuration> | |
<property> | |
<name>mapred.job.queue.name</name> | |
<value>${queueName}</value> | |
</property> | |
</configuration> | |
<main-class>org.apache.example.TestMR</main-class> | |
<arg>-r</arg> | |
<arg>6</arg> | |
</java> | |
<ok to="end"/> | |
<error to="java-action-fail"/> | |
</action> | |
<kill name="java-action-fail"> | |
<message>Java action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> | |
</kill> | |
<end name='end' /> | |
</workflow-app> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment