1
|
<workflow-app xmlns="uri:oozie:workflow:0.4" name="transformers_ingest_citations">
|
2
|
|
3
|
<parameters>
|
4
|
<property>
|
5
|
<name>input</name>
|
6
|
<description>input containing document metadata records</description>
|
7
|
</property>
|
8
|
<property>
|
9
|
<name>output</name>
|
10
|
<description>extracted citations</description>
|
11
|
</property>
|
12
|
</parameters>
|
13
|
|
14
|
<start to="generate-schema"/>
|
15
|
|
16
|
<action name="generate-schema">
|
17
|
<java>
|
18
|
<job-tracker>${jobTracker}</job-tracker>
|
19
|
<name-node>${nameNode}</name-node>
|
20
|
<main-class>eu.dnetlib.iis.core.javamapreduce.hack.AvroSchemaGenerator</main-class>
|
21
|
<arg>eu.dnetlib.iis.citationmatching.direct.schemas.DocumentMetadata</arg>
|
22
|
<arg>eu.dnetlib.iis.citationmatching.direct.schemas.Citation</arg>
|
23
|
<capture-output />
|
24
|
</java>
|
25
|
<ok to="transformer" />
|
26
|
<error to="fail" />
|
27
|
</action>
|
28
|
|
29
|
<action name="transformer">
|
30
|
<pig>
|
31
|
<job-tracker>${jobTracker}</job-tracker>
|
32
|
<name-node>${nameNode}</name-node>
|
33
|
<!-- The data generated by this node is deleted in this section -->
|
34
|
<prepare>
|
35
|
<delete path="${nameNode}${output}" />
|
36
|
</prepare>
|
37
|
<configuration>
|
38
|
<property>
|
39
|
<name>mapred.job.queue.name</name>
|
40
|
<value>${queueName}</value>
|
41
|
</property>
|
42
|
</configuration>
|
43
|
<!-- Path to PIG script the workflow executes. -->
|
44
|
<script>lib/scripts/transformer/transformer.pig</script>
|
45
|
|
46
|
<param>input=${input}</param>
|
47
|
<param>schema_input=${wf:actionData('generate-schema')['eu.dnetlib.iis.citationmatching.direct.schemas.DocumentMetadata']}</param>
|
48
|
|
49
|
<param>output=${output}</param>
|
50
|
<param>schema_output=${wf:actionData('generate-schema')['eu.dnetlib.iis.citationmatching.direct.schemas.Citation']}</param>
|
51
|
</pig>
|
52
|
<ok to="end"/>
|
53
|
<error to="fail"/>
|
54
|
</action>
|
55
|
<kill name="fail">
|
56
|
<message>Unfortunately, the workflow failed -- error message:
|
57
|
[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
58
|
</kill>
|
59
|
<end name="end"/>
|
60
|
</workflow-app>
|