并行弹簧批处理作业的推荐方法 [英] Recommended approach for parallel spring batch jobs

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

问题描述

Spring Batch 集成文档解释了如何使用远程分块和分区的步骤,参见

The Spring Batch Integration documentation explains how to use remote chunking and partitioning for steps, see

http://docs.spring.io/spring-batch/trunk/reference/html/springBatchIntegration.html#externalizing-batch-process-execution

我们的工作不包括简单的读取器/处理器/写入器步骤.因此,我们只想让整个作业并行运行,将每个作业分配到不同的分区.

Our jobs do not consist of straightforward reader/processor/writer steps. So we want to simply have whole jobs running in parallel, with each job being farmed out to different partitions.

Spring Batch 中已经有这种模式了吗?或者我是否需要实现我自己的 JobLauncher 来维护一个奴隶池来启动工作?

Is there already a pattern for this in Spring Batch? Or would I need to implement my own JobLauncher to maintain a pool of slaves to launch jobs on?

干杯,门诺

推荐答案

Spring Batch 专门承担不处理作业编排(您的问题基本上是关于此)的位置.有几种方法可以解决这样的问题:

Spring Batch specifically takes the position of not handling job orchestration (which your question fundamentally is about). There are a couple of approaches for something like this:

  • 分布式调度程序 - 大多数分布式调度程序都能够在多个节点上执行任务.例如,Quartz 具有分布式模式.
  • 使用远程分区进行编排 - 远程分区作为从属执行完整的 Spring Batch 步骤.这些步骤没有理由不能成为执行作业的作业步骤.
  • 消息驱动的作业启动 - Spring Batch 集成(Spring Batch 的子模块)提供了通过消息启动作业的工具.另一种方法是让一组从设备监听队列,等待消息启动作业.您必须以某种方式处理从属设备之间的负载平衡等问题,但这是处理作业编排的另一种常见方法.

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

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