Project

General

Profile

1
<workflow-app xmlns="uri:oozie:workflow:0.2" name="test-transformers_export_documenttodataset_without_imported_data_sampledataproducer">
2
    <start to="producer"/>
3
    <action name="producer">
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}/producer" />
10
				<mkdir path="${nameNode}${workingDir}/producer" />
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.java.jsonworkflownodes.Producer</arg>
22
			<!-- Specification of the output ports -->
23
            <arg>-C{document_to_dataset,
24
				eu.dnetlib.iis.referenceextraction.dataset.schemas.DocumentToDataSet,
25
				eu/dnetlib/iis/transformers/export/documenttodataset_without_imported_data/sampledataproducer/data/document_to_dataset.json}</arg>
26
            <arg>-C{document_relation,
27
				eu.dnetlib.iis.importer.schemas.DocumentRelation,
28
				eu/dnetlib/iis/transformers/export/documenttodataset_without_imported_data/sampledataproducer/data/document_relation.json}</arg>
29
                             
30
			<!-- All input and output ports have to be bound to paths in HDFS, working 
31
				directory has to be specified as well -->
32
            <arg>-SworkingDir=${workingDir}/producer/working_dir</arg>
33
            <arg>-Odocument_to_dataset=${workingDir}/producer/document_to_dataset</arg>
34
            <arg>-Odocument_relation=${workingDir}/producer/document_relation</arg>
35
        </java>
36
        <ok to="transformer_export_docdataset_without_imported"/>
37
        <error to="fail"/>
38
    </action>
39
    <action name="transformer_export_docdataset_without_imported">
40
        <sub-workflow>
41
            <app-path>${wf:appPath()}/transformer_export_documenttodataset_without_imported_data</app-path>
42
            <configuration>
43
                <property>
44
                    <name>jobTracker</name>
45
                    <value>${jobTracker}</value>
46
                </property>
47
                <property>
48
                    <name>nameNode</name>
49
                    <value>${nameNode}</value>
50
                </property>
51
                <property>
52
                    <name>queueName</name>
53
                    <value>${queueName}</value>
54
                </property>
55
                <!-- Working directory of the subworkflow -->
56
                <property>
57
                    <name>workingDir</name>
58
                    <value>${workingDir}/transformer_export_documenttodataset_without_imported_data/working_dir</value>
59
                </property>
60
                <!-- Input ports. -->
61
                <property>
62
                    <name>input_document_to_dataset</name>
63
                    <value>${workingDir}/producer/document_to_dataset</value>
64
                </property>
65
                <property>
66
                    <name>input_document_relation</name>
67
                    <value>${workingDir}/producer/document_relation</value>
68
                </property>
69
                <!-- Output port bound to given path -->
70
                <property>
71
                    <name>output_document_to_dataset</name>
72
                    <value>${workingDir}/transformer_export_documenttodataset_without_imported_data/document_to_dataset</value>
73
                </property>
74
            </configuration>
75
        </sub-workflow>
76
        <ok to="consumer"/>
77
        <error to="fail"/>
78
    </action>
79
    <action name="consumer">
80
		<java>
81
			<job-tracker>${jobTracker}</job-tracker>
82
			<name-node>${nameNode}</name-node>
83
			<configuration>
84
				<property>
85
					<name>mapred.job.queue.name</name>
86
					<value>${queueName}</value>
87
				</property>
88
			</configuration>
89
			<!-- This is simple wrapper for the Java code -->
90
			<main-class>eu.dnetlib.iis.core.java.ProcessWrapper</main-class>
91
			<!-- The business Java code that gets to be executed -->
92
			<arg>eu.dnetlib.iis.core.java.jsonworkflownodes.TestingConsumer</arg>
93
			<!-- Specification of the input ports -->
94
			<arg>-C{document_to_dataset,
95
				eu.dnetlib.iis.referenceextraction.dataset.schemas.DocumentToDataSet,
96
				eu/dnetlib/iis/transformers/export/documenttodataset_without_imported_data/sampledataproducer/data/output_document_to_dataset.json}</arg>
97
			<!-- All input and output ports have to be bound to paths in HDFS, working 
98
				directory has to be specified as well -->
99
			<arg>-SworkingDir=${workingDir}/consumer/working_dir</arg>
100
			<arg>-Idocument_to_dataset=${workingDir}/transformer_export_documenttodataset_without_imported_data/document_to_dataset</arg>
101
		</java>
102
		<ok to="end" />
103
		<error to="fail" />
104
	</action>    
105
    <kill name="fail">
106
		<message>Unfortunately, the workflow failed -- error message:
107
			[${wf:errorMessage(wf:lastErrorNode())}]</message>
108
    </kill>
109
    <end name="end"/>
110
</workflow-app>
(2-2/2)