弹簧批次1.1中的平行步骤

时间:2016-07-09 12:40:41

标签: parallel-processing spring-batch

HY,

必须使用spring批处理1.1,由于进程将要运行的机器的限制,我对配置并行步骤有一些疑问。在较新版本的弹簧批处理中,您可以使用弹簧批处理中的流程包执行此操作,但此程序包在1.1版中不存在。

  1. 如何在spring spring 1.1中的自己的线程中执行不同的步骤?(默认情况下,我了解在作业中配置的步骤是顺序的)
  2. 由于

1 个答案:

答案 0 :(得分:0)

可能是Spring批量并行处理的最佳阅读地点:

[http://docs.spring.io/spring-batch/reference/html/scalability.html][1]

<job id="job1">
    <split id="split1" task-executor="taskExecutor" next="step4">
        <flow>
            <step id="step1" parent="s1" next="step2"/>
            <step id="step2" parent="s2"/>
        </flow>
        <flow>
            <step id="step3" parent="s3"/>
        </flow>
    </split>
    <step id="step4" parent="s4"/>
</job>

<beans:bean id="taskExecutor" class="org.spr...SimpleAsyncTaskExecutor"/>

上面片段中的关键时刻是多线程的taskExecutor定义。并且步骤“step1,step2”在单个流程中声明,而step3在另一个流程中声明。这意味着step1和step2将相继顺序运行,但与步骤3并行。

相关问题