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 -->
31
            <arg>-Odocument_to_dataset=${workingDir}/producer/document_to_dataset</arg>
32
            <arg>-Odocument_relation=${workingDir}/producer/document_relation</arg>
33
        </java>
34
        <ok to="transformer_export_docdataset_without_imported"/>
35
        <error to="fail"/>
36
    </action>
37
    <action name="transformer_export_docdataset_without_imported">
38
        <sub-workflow>
39
            <app-path>${wf:appPath()}/transformer_export_documenttodataset_without_imported_data</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}/transformer_export_documenttodataset_without_imported_data/working_dir</value>
57
                </property>
58
                <!-- Input ports. -->
59
                <property>
60
                    <name>input_document_to_dataset</name>
61
                    <value>${workingDir}/producer/document_to_dataset</value>
62
                </property>
63
                <property>
64
                    <name>input_document_relation</name>
65
                    <value>${workingDir}/producer/document_relation</value>
66
                </property>
67
                <!-- Output port bound to given path -->
68
                <property>
69
                    <name>output_document_to_dataset</name>
70
                    <value>${workingDir}/transformer_export_documenttodataset_without_imported_data/document_to_dataset</value>
71
                </property>
72
            </configuration>
73
        </sub-workflow>
74
        <ok to="consumer"/>
75
        <error to="fail"/>
76
    </action>
77
    <action name="consumer">
78
		<java>
79
			<job-tracker>${jobTracker}</job-tracker>
80
			<name-node>${nameNode}</name-node>
81
			<configuration>
82
				<property>
83
					<name>mapred.job.queue.name</name>
84
					<value>${queueName}</value>
85
				</property>
86
			</configuration>
87
			<!-- This is simple wrapper for the Java code -->
88
			<main-class>eu.dnetlib.iis.core.java.ProcessWrapper</main-class>
89
			<!-- The business Java code that gets to be executed -->
90
			<arg>eu.dnetlib.iis.core.java.jsonworkflownodes.TestingConsumer</arg>
91
			<!-- Specification of the input ports -->
92
			<arg>-C{document_to_dataset,
93
				eu.dnetlib.iis.referenceextraction.dataset.schemas.DocumentToDataSet,
94
				eu/dnetlib/iis/transformers/export/documenttodataset_without_imported_data/sampledataproducer/data/output_document_to_dataset.json}</arg>
95
			<!-- All input and output ports have to be bound to paths in HDFS -->
96
			<arg>-Idocument_to_dataset=${workingDir}/transformer_export_documenttodataset_without_imported_data/document_to_dataset</arg>
97
		</java>
98
		<ok to="end" />
99
		<error to="fail" />
100
	</action>    
101
    <kill name="fail">
102
		<message>Unfortunately, the workflow failed -- error message:
103
			[${wf:errorMessage(wf:lastErrorNode())}]</message>
104
    </kill>
105
    <end name="end"/>
106
</workflow-app>
(2-2/2)