Project

General

Profile

1
<workflow-app xmlns="uri:oozie:workflow:0.3" name="my_subsubworkflow">
2
    <start to="cloner1"/>
3
    <action name="cloner1">
4
        <java>
5
            <job-tracker>${jobTracker}</job-tracker>
6
            <name-node>${nameNode}</name-node>
7
 			<!-- The data generated by this node is deleted in this section -->
8
			<prepare>
9
				<delete path="${nameNode}${workingDir}/cloner1" />
10
				<mkdir path="${nameNode}${workingDir}/cloner1" />
11
			</prepare>
12
            <configuration>
13
                <property>
14
                    <name>mapred.job.queue.name</name>
15
                    <value>${queueName}</value>
16
                </property>
17
            </configuration>
18
            <!-- This is simple wrapper for the Java code -->
19
            <main-class>eu.dnetlib.iis.core.java.ProcessWrapper</main-class>
20
            <!-- The business Java code that gets to be executed -->
21
            <arg>eu.dnetlib.iis.core.examples.protobuf.java.PersonCloner</arg>
22
            <!-- All input and output ports have to be bound to paths in 
23
            HDFS, working directory has to be specified as well -->
24
            <arg>-Iperson=${input_person}</arg>
25
            <arg>-Operson=${workingDir}/cloner1/person</arg>
26
            <arg>-Pcopies=${param_copies_count}</arg>
27
        </java>
28
        <ok to="cloner2"/>
29
        <error to="fail"/>
30
    </action>
31
     <action name="cloner2">
32
        <java>
33
            <job-tracker>${jobTracker}</job-tracker>
34
            <name-node>${nameNode}</name-node>
35
 			<!-- The data generated by this node is deleted in this section -->
36
			<prepare>
37
				<delete path="${nameNode}${workingDir}/cloner2" />
38
				<mkdir path="${nameNode}${workingDir}/cloner2" />
39
			</prepare>
40
            <configuration>
41
                <property>
42
                    <name>mapred.job.queue.name</name>
43
                    <value>${queueName}</value>
44
                </property>
45
            </configuration>
46
            <!-- This is simple wrapper for the Java code -->
47
            <main-class>eu.dnetlib.iis.core.java.ProcessWrapper</main-class>
48
            <!-- The business Java code that gets to be executed -->
49
            <arg>eu.dnetlib.iis.core.examples.protobuf.java.PersonCloner</arg>
50
            <!-- All input and output ports have to be bound to paths in 
51
            HDFS, working directory has to be specified as well -->
52
            <arg>-Iperson=${workingDir}/cloner1/person</arg>
53
            <arg>-Operson=${output_person}</arg>
54
        </java>
55
        <ok to="end"/>
56
        <error to="fail"/>
57
    </action>
58
    <kill name="fail">
59
        <message>Unfortunately, the process failed -- error message: [${wf:errorMessage(wf:lastErrorNode())}]</message>
60
    </kill>
61
    <end name="end"/>
62
</workflow-app>
    (1-1/1)