Project

General

Profile

1
<?xml version="1.0"?>
2
<!-- Note that documentation placed in comments in this file uses the
3
"markdown" syntax (along with division into sections). -->
4
<workflow-app xmlns="uri:oozie:workflow:0.3" name="test-documentssimilarity_main_workflow">
5
    <start to="data_producer" />
6

    
7
    <action name="data_producer">
8
        <java>
9
            <job-tracker>${jobTracker}</job-tracker>
10
            <name-node>${nameNode}</name-node>
11
            <!-- The data generated by this node is deleted in this section -->
12
            <prepare>
13
                <delete path="${nameNode}${workingDir}/data_producer" />
14
                <mkdir path="${nameNode}${workingDir}/data_producer" />
15
            </prepare>
16
            <configuration>
17
                <property>
18
                    <name>mapred.job.queue.name</name>
19
                    <value>${queueName}</value>
20
                </property>
21
            </configuration>
22
            <!-- This is simple wrapper for the Java code -->
23
            <main-class>eu.dnetlib.iis.core.java.ProcessWrapper</main-class>
24
            <!-- The business Java code that gets to be executed -->
25
            <arg>eu.dnetlib.iis.documentssimilarity.producer.DocumentAvroDatastoreProducer</arg>
26
            <!-- All input and output ports have to be bound to paths in HDFS -->
27
            <arg>-Odocument=${workingDir}/data_producer/document</arg>
28
        </java>
29
        <ok to="chain" />
30
        <error to="fail" />
31
    </action>
32
    
33
    <action name="chain">
34
    	<sub-workflow>
35
            <app-path>${wf:appPath()}/chain</app-path>
36
            <propagate-configuration/>
37
            <configuration>
38
            	<property>
39
					<name>input_document</name>
40
					<value>${workingDir}/data_producer/document</value>
41
				</property>
42
				<property>
43
					<name>output_documents_similarity</name>
44
					<value>${workingDir}/documents_similarity</value>
45
				</property>
46
                <property>
47
                    <name>workingDir</name>
48
                    <value>${workingDir}/chain</value>
49
                </property>
50
			</configuration>
51
        </sub-workflow>
52
    	<ok to="end" />
53
        <error to="fail" />
54
    </action>
55
    
56
    <kill name="fail">
57
        <message>Unfortunately, the process failed -- error message:
58
            [${wf:errorMessage(wf:lastErrorNode())}]
59
        </message>
60
    </kill>
61
    <end name="end" />
62
</workflow-app>
(2-2/2)