-
Notifications
You must be signed in to change notification settings - Fork 76
/
org.jberet.test.chunkPartitionFailComplete.xml
82 lines (76 loc) · 4.06 KB
/
org.jberet.test.chunkPartitionFailComplete.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2013-2016 Red Hat, Inc. and/or its affiliates.
This program and the accompanying materials are made
available under the terms of the Eclipse Public License 2.0
which is available at https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
-->
<job id="org.jberet.test.chunkPartitionFailComplete" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd"
version="1.0">
<step id="org.jberet.test.chunkPartition.step0" abstract="true">
<chunk item-count="3">
<reader ref="integerArrayReader">
<properties>
<property name="data.count" value="#{jobProperties['data.count']}?:30;"/>
<property name="fail.on.values" value="#{partitionPlan['reader.fail.on.values']}?:-1;"/>
<property name="partition.start" value="#{partitionPlan['partition.start']}"/>
<property name="partition.end" value="#{partitionPlan['partition.end']}"/>
</properties>
</reader>
<writer ref="integerArrayWriter">
<properties>
<property name="fail.on.values" value="#{partitionPlan['writer.fail.on.values']}?:-1"/>
<property name="writer.sleep.time" value="#{jobParameters['writer.sleep.time']}"/>
<property name="partition.start" value="#{partitionPlan['partition.start']}"/>
<property name="partition.end" value="#{partitionPlan['partition.end']}"/>
</properties>
</writer>
</chunk>
</step>
<step id="org.jberet.test.chunkPartitionFailComplete.step1"
parent="org.jberet.test.chunkPartition.step0" next="org.jberet.test.chunkPartitionFailComplete.step2">
<partition>
<plan partitions="3">
<properties partition="0">
<property name="partition.start" value="0"/>
<property name="partition.end" value="9"/>
<property name="reader.fail.on.values" value="#{jobParameters['reader.fail.on.values']}"/>
<property name="writer.fail.on.values" value="#{jobParameters['writer.fail.on.values']}"/>
</properties>
<properties partition="1">
<property name="partition.start" value="10"/>
<property name="partition.end" value="19"/>
<property name="reader.fail.on.values" value="#{jobParameters['reader.fail.on.values']}"/>
<property name="writer.fail.on.values" value="#{jobParameters['writer.fail.on.values']}"/>
</properties>
<properties partition="2">
<property name="partition.start" value="20"/>
<property name="partition.end" value="29"/>
</properties>
</plan>
</partition>
</step>
<!-- If step1 fails, this step (step2) will not get to run; during the subsequent restart, if step1 re-executes
successfully, this step (step2) should also complete successfully -->
<step id="org.jberet.test.chunkPartitionFailComplete.step2" parent="org.jberet.test.chunkPartition.step0">
<partition>
<plan partitions="3">
<properties partition="0">
<property name="partition.start" value="0"/>
<property name="partition.end" value="9"/>
</properties>
<properties partition="1">
<property name="partition.start" value="10"/>
<property name="partition.end" value="19"/>
</properties>
<properties partition="2">
<property name="partition.start" value="20"/>
<property name="partition.end" value="29"/>
</properties>
</plan>
</partition>
</step>
</job>