【问题标题】:using spring batch to execute jobs in parallel使用spring批处理并行执行作业
【发布时间】:2013-10-21 05:48:56
【问题描述】:

我有一个用例如下:

1)There is a Parentjob which has multiple child jobs.
2)All child jobs should be executed in parallel.
3)The parent job should wait until all child jobs are done.
4)One child jobs are done control returns to master
5)Master job is completed.
6)In case any of the child job throws exception then also control should return to master job

这可以使用弹簧批处理吗?

编辑:我不希望并行执行多个作业步骤。而是并行执行同一父级的多个子作业

【问题讨论】:

    标签: java spring spring-batch


    【解决方案1】:

    也许是这样的?

    1. 创建工作
    2. 将块 tasklet 添加到此作业。
      1. 读者获得新工作
      2. 处理器启动它
    3. 使用任务执行器和具有 10 个线程的线程池运行此块。
    4. 利润! :)

    【讨论】:

      猜你喜欢
      • 2014-09-28
      • 1970-01-01
      • 2023-04-06
      • 2012-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-15
      • 2015-07-30
      相关资源
      最近更新 更多