使用spring批处理并行执行作业 [英] using spring batch to execute jobs in parallel

查看:94
本文介绍了使用spring批处理并行执行作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用例如下:

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

这是否可以使用春季批次?

Is this possible using spring batch?

编辑:我不打算在parellel执行多个作业步骤。但是并行同一父项的多个子作业

EDIT : Am not looking to execute multiple steps of job in parellel.But multiple child jobs of same parent in parallel

推荐答案

也许是这样的?


  1. 创建job

  2. 将chunk tasklet添加到此作业。
  1. Create job
  2. Add chunk tasklet to this job.

  1. 读者获得新工作

  2. 处理器启动它


  • 使用任务执行程序和10个线程的线程池运行此块。

  • 利润! :)

  • 这篇关于使用spring批处理并行执行作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆