BATCH-1712: revert changes in 2.1.7
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#Wed May 04 11:51:55 BST 2011
|
||||
#Wed May 04 14:36:34 BST 2011
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/ChunkElementLateBindingParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="886" endstart\="880" start\="510" startend\="524"/>\n<bounds height\="168" width\="77" x\="15" y\="17"/>\n</element>\n</graph>
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/JobExecutionListenerMethodAttributeParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element type\="job">\n<structure end\="995" endstart\="989" start\="511" startend\="586"/>\n<bounds height\="118" width\="77" x\="15" y\="17"/>\n</element>\n</graph>
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/JobRepositoryDefaultParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph/>
|
||||
@@ -6,7 +6,8 @@
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/ParentRetryableStepFactoryBeanParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element clazz\="StepModelElement" type\="step">\n<structure end\="700" endstart\="693" start\="439" startend\="529"/>\n<bounds height\="34" width\="95" x\="106" y\="19"/>\n</element>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="955" endstart\="949" start\="703" startend\="769"/>\n<bounds height\="128" width\="77" x\="15" y\="19"/>\n</element>\n</graph>
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/ParentSkippableLateBindingStepFactoryBeanParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element clazz\="StepModelElement" type\="step">\n<structure end\="771" endstart\="764" start\="510" startend\="600"/>\n<bounds height\="34" width\="95" x\="106" y\="19"/>\n</element>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="987" endstart\="981" start\="774" startend\="788"/>\n<bounds height\="128" width\="77" x\="15" y\="19"/>\n</element>\n</graph>
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/ParentSkippableStepFactoryBeanParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element clazz\="StepModelElement" type\="step">\n<structure end\="700" endstart\="693" start\="439" startend\="529"/>\n<bounds height\="34" width\="95" x\="106" y\="19"/>\n</element>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="953" endstart\="947" start\="703" startend\="769"/>\n<bounds height\="128" width\="77" x\="15" y\="19"/>\n</element>\n</graph>
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/PartitionStepParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="713" endstart\="707" start\="510" startend\="525"/>\n<bounds height\="128" width\="84" x\="15" y\="17"/>\n</element>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="884" endstart\="878" start\="716" startend\="731"/>\n<bounds height\="172" width\="84" x\="207" y\="17"/>\n</element>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="1042" endstart\="1036" start\="887" startend\="902"/>\n<bounds height\="128" width\="84" x\="111" y\="17"/>\n</element>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="1295" endstart\="1289" start\="1045" startend\="1060"/>\n<bounds height\="128" width\="84" x\="303" y\="17"/>\n</element>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="1412" endstart\="1406" start\="1298" startend\="1313"/>\n<bounds height\="128" width\="84" x\="399" y\="17"/>\n</element>\n</graph>
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/PartitionStepParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="713" endstart\="707" start\="510" startend\="525"/>\n<bounds height\="128" width\="84" x\="15" y\="17"/>\n</element>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="871" endstart\="865" start\="716" startend\="731"/>\n<bounds height\="172" width\="84" x\="207" y\="17"/>\n</element>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="1011" endstart\="1005" start\="874" startend\="889"/>\n<bounds height\="128" width\="84" x\="111" y\="17"/>\n</element>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="1246" endstart\="1240" start\="1014" startend\="1029"/>\n<bounds height\="128" width\="84" x\="303" y\="17"/>\n</element>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="1363" endstart\="1357" start\="1249" startend\="1264"/>\n<bounds height\="128" width\="84" x\="399" y\="17"/>\n</element>\n</graph>
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/PartitionStepWithLateBindingParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="620" endstart\="614" start\="510" startend\="525"/>\n<bounds height\="118" width\="84" x\="15" y\="17"/>\n</element>\n</graph>
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepListenerInStepParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="1832" endstart\="1826" start\="510" startend\="524"/>\n<bounds height\="268" width\="77" x\="15" y\="17"/>\n</element>\n</graph>
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepListenerMethodAttributeParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element type\="job">\n<structure end\="854" endstart\="848" start\="511" startend\="525"/>\n<bounds height\="118" width\="77" x\="15" y\="17"/>\n</element>\n</graph>
|
||||
//com.springsource.sts.config.flow.coordinates\:http\://www.springframework.org/schema/batch\:/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepListenerParserTests-context.xml=<?xml version\="1.0" encoding\="UTF-8"?>\n<graph>\n<element clazz\="JobModelElement" type\="job">\n<structure end\="1650" endstart\="1644" start\="510" startend\="524"/>\n<bounds height\="218" width\="77" x\="15" y\="17"/>\n</element>\n</graph>
|
||||
|
||||
@@ -63,7 +63,6 @@ import org.springframework.batch.retry.RetryPolicy;
|
||||
import org.springframework.batch.retry.backoff.BackOffPolicy;
|
||||
import org.springframework.batch.retry.policy.MapRetryContextCache;
|
||||
import org.springframework.batch.retry.policy.RetryContextCache;
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.core.task.SyncTaskExecutor;
|
||||
@@ -298,23 +297,6 @@ class StepParserStepFactoryBean<I, O> implements FactoryBean, BeanNameAware {
|
||||
ts.setPartitionHandler(partitionHandler);
|
||||
}
|
||||
|
||||
// BATCH-1659
|
||||
if (partitionHandler instanceof TaskExecutorPartitionHandler) {
|
||||
TaskExecutorPartitionHandler taskExecutorPartitionHandler = (TaskExecutorPartitionHandler) partitionHandler;
|
||||
if (taskExecutorPartitionHandler.getStep() == null) {
|
||||
// Only for a local partition handler is the step required
|
||||
Assert.state(step != null,
|
||||
"A Step must be provided for a partition step with a TaskExecutorPartitionHandler");
|
||||
try {
|
||||
taskExecutorPartitionHandler.setStep(step);
|
||||
taskExecutorPartitionHandler.afterPropertiesSet();
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new BeanCreationException("Could not configure TaskExecutorPartitionHandler", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean allowStartIfComplete = this.allowStartIfComplete != null ? this.allowStartIfComplete : false;
|
||||
String name = this.name;
|
||||
if (step != null) {
|
||||
|
||||
@@ -130,10 +130,10 @@ public class PartitionStepParserTests implements ApplicationContextAware {
|
||||
job2.execute(jobExecution);
|
||||
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
|
||||
Collections.sort(savedStepNames);
|
||||
assertEquals("[s3, step1:partition0, step1:partition1, step1:partition2]", savedStepNames.toString());
|
||||
assertEquals("[s2:partition0, s2:partition1, s2:partition2, s3]", savedStepNames.toString());
|
||||
List<String> stepNames = getStepNames(jobExecution);
|
||||
assertEquals(5, stepNames.size());
|
||||
assertEquals("[s2, s3, step1:partition0, step1:partition1, step1:partition2]", stepNames.toString());
|
||||
assertEquals("[s2, s2:partition0, s2:partition1, s2:partition2, s3]", stepNames.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -150,10 +150,9 @@ public class PartitionStepParserTests implements ApplicationContextAware {
|
||||
|
||||
for (StepExecution se : jobExecution.getStepExecutions()) {
|
||||
String stepExecutionName = se.getStepName();
|
||||
if (stepExecutionName.equalsIgnoreCase("j3s1")) { // the partitioned
|
||||
// step
|
||||
// the partitioned step
|
||||
if (stepExecutionName.equalsIgnoreCase("j3s1")) {
|
||||
PartitionStep partitionStep = (PartitionStep) this.applicationContext.getBean(stepExecutionName);
|
||||
|
||||
// prove that the reference in the {@link
|
||||
// TaskExecutorPartitionHandler} is the step configured inline
|
||||
TaskExecutorPartitionHandler taskExecutorPartitionHandler = accessPrivateField(partitionStep,
|
||||
@@ -166,10 +165,10 @@ public class PartitionStepParserTests implements ApplicationContextAware {
|
||||
}
|
||||
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
|
||||
Collections.sort(savedStepNames);
|
||||
assertEquals("[j3s1:partition0, j3s1:partition1, j3s1:partition2]", savedStepNames.toString());
|
||||
assertEquals("[j3s1:partition0, j3s1:partition1, j3s1:partition2, j3s1:partition3, j3s1:partition4, j3s1:partition5]", savedStepNames.toString());
|
||||
List<String> stepNames = getStepNames(jobExecution);
|
||||
assertEquals(4, stepNames.size());
|
||||
assertEquals("[j3s1, j3s1:partition0, j3s1:partition1, j3s1:partition2]", stepNames.toString());
|
||||
assertEquals(7, stepNames.size());
|
||||
assertEquals("[j3s1, j3s1:partition0, j3s1:partition1, j3s1:partition2, j3s1:partition3, j3s1:partition4, j3s1:partition5]", stepNames.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -204,8 +203,8 @@ public class PartitionStepParserTests implements ApplicationContextAware {
|
||||
// Step names not saved by this one (it geosn't have that tasklet)
|
||||
assertEquals("[]", savedStepNames.toString());
|
||||
List<String> stepNames = getStepNames(jobExecution);
|
||||
assertEquals(4, stepNames.size());
|
||||
assertEquals("[j4s1, j4s1:partition0, j4s1:partition1, j4s1:partition2]", stepNames.toString());
|
||||
assertEquals(7, stepNames.size());
|
||||
assertEquals("[j4s1, j4s1:partition0, j4s1:partition1, j4s1:partition2, j4s1:partition3, j4s1:partition4, j4s1:partition5]", stepNames.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
<job id="job2">
|
||||
<step id="s2" next="s3">
|
||||
<partition step="step1" handler="handler" partitioner="partitioner" />
|
||||
<partition handler="handler" partitioner="partitioner" />
|
||||
</step>
|
||||
<step id="s3" parent="step2" />
|
||||
</job>
|
||||
|
||||
<job id="job3">
|
||||
<step id="j3s1">
|
||||
<partition handler="handler" partitioner="partitioner">
|
||||
<partition partitioner="partitioner">
|
||||
<step parent="step2" />
|
||||
</partition>
|
||||
</step>
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<job id="job4">
|
||||
<step id="j4s1">
|
||||
<partition handler="handler" partitioner="partitioner">
|
||||
<partition partitioner="partitioner">
|
||||
<step>
|
||||
<tasklet>
|
||||
<chunk reader="reader" writer="writer" commit-interval="10" />
|
||||
@@ -51,6 +51,7 @@
|
||||
or a custom PartitionHandler -->
|
||||
<bean id="handler" class="org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler" xmlns="http://www.springframework.org/schema/beans">
|
||||
<property name="gridSize" value="3" />
|
||||
<property name="step" ref="step1"/>
|
||||
</bean>
|
||||
|
||||
<beans:bean id="aggregator"
|
||||
|
||||
Reference in New Issue
Block a user