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 its way of dividing text into sections). -->
4
<workflow-app xmlns="uri:oozie:workflow:0.3" name="test-referenceextraction_researchinitiative_main_sampletest">
5
	<start to="producer" />
6

    
7
	<action name="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}/producer" />
14
				<mkdir path="${nameNode}${workingDir}/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.core.java.jsonworkflownodes.Producer</arg>
26
			<!-- Specification of the output ports -->
27
			<arg>-C{document_text, 
28
				eu.dnetlib.iis.metadataextraction.schemas.DocumentText,
29
				eu/dnetlib/iis/referenceextraction/researchinitiative/data/empty.json}</arg>
30
			<!-- All input and output ports have to be bound to paths in HDFS -->
31
			<arg>-Odocument_text=${workingDir}/producer/document_text</arg>
32
		</java>
33
		<ok to="referenceextraction_researchinitiative" />
34
		<error to="fail" />
35
	</action>
36

    
37
    <action name="referenceextraction_researchinitiative">
38
        <sub-workflow>
39
            <app-path>${wf:appPath()}/referenceextraction_researchinitiative</app-path>
40
            <configuration>
41
                <property>
42
                    <name>jobTracker</name>
43
                    <value>${jobTracker}</value>
44
                </property>
45
                <property>
46
                    <name>nameNode</name>
47
                    <value>${nameNode}</value>
48
                </property>
49
                <property>
50
                    <name>queueName</name>
51
                    <value>${queueName}</value>
52
                </property>
53
                <!-- Working directory of the subworkflow -->
54
                <property>
55
                    <name>workingDir</name>
56
                    <value>${workingDir}/referenceextraction_researchinitiative/working_dir</value>
57
                </property>
58
                <property>
59
                    <name>input_document_text</name>
60
                    <value>${workingDir}/producer/document_text</value>
61
                </property>
62
                <property>
63
                    <name>output_document_to_research_initiative</name>
64
                    <value>${workingDir}/referenceextraction_researchinitiative/document_to_research_initiative</value>
65
                </property>
66
            </configuration>
67
        </sub-workflow>
68
        <ok to="consumer"/>
69
        <error to="fail"/>
70
    </action>
71

    
72
	<action name="consumer">
73
		<java>
74
			<job-tracker>${jobTracker}</job-tracker>
75
			<name-node>${nameNode}</name-node>
76
			<configuration>
77
				<property>
78
					<name>mapred.job.queue.name</name>
79
					<value>${queueName}</value>
80
				</property>
81
			</configuration>
82
			<!-- This is simple wrapper for the Java code -->
83
			<main-class>eu.dnetlib.iis.core.java.ProcessWrapper</main-class>
84
			<!-- The business Java code that gets to be executed -->
85
			<arg>eu.dnetlib.iis.core.java.jsonworkflownodes.TestingConsumer</arg>
86
			<!-- All input and output ports have to be bound to paths in HDFS -->
87
			<arg>-C{document_to_dataset,
88
				eu.dnetlib.iis.referenceextraction.researchinitiative.schemas.DocumentToConceptId,
89
				eu/dnetlib/iis/referenceextraction/researchinitiative/data/empty.json}</arg>
90
			<!-- All input and output ports have to be bound to paths in HDFS -->
91
			<arg>-Idocument_to_dataset=${workingDir}/referenceextraction_researchinitiative/document_to_research_initiative</arg>
92
		</java>
93
		<ok to="end" />
94
		<error to="fail" />
95
	</action>
96

    
97
    <kill name="fail">
98
        <message>Unfortunately, the process failed -- error message:
99
        			[${wf:errorMessage(wf:lastErrorNode())}]
100
        		</message>
101
    </kill>
102

    
103
    <end name="end"/>
104
</workflow-app>
(2-2/2)