Spring 批处理 - 管理器中的远程分区 - 工作环境 - CSV 文件
Spring Batch - Remote Partitioning in Manager - Worker Environment - CSV Files
我有一个要求,我需要处理存储在目录/GCP 中的 400 多个 CSV 文件(每个 100 到 500MB)。
对于每个文件,我需要从数据库中获取有效帐号并将它们保存在内存中,根据内存中的数据验证文件的每一行并将有效记录写入另一个 CSV 文件(列格式更改)并生成导出文件到 AWS。将来,希望支持来自 MQ 的请求,并且流程保持不变。
要求在分布式系统中实现。
我计划使用 Spring 批处理来满足此要求,但我无法找到使用不同系统作为管理器 - 工作人员的远程分区的良好示例/代码。我想了解如何配置 Manager、Worker、如何启动它们以及将文件元数据作为请求和响应传递。
我得到了在单个 JVM 上进行分区的示例,因此仅使用示例代码寻找 Manager-Worker 示例。
任何建议/参考将不胜感激,并提前致谢。
I am planning to use Spring Batch for this requirement, But i am unable to find good example / code of Remote partitioning using different systems as Manager - Worker.
远程分区在此处通过代码示例和图表进行了详细说明:https://docs.spring.io/spring-batch/docs/4.2.x/reference/html/spring-batch-integration.html#remote-partitioning
您还可以找到:
- 这里有一个完整的示例:Remote partitioning sample along with the code for both Manager and Worker setup: https://github.com/spring-projects/spring-batch/tree/master/spring-batch-samples/src/main/java/org/springframework/batch/sample/remotepartitioning
- 在此处讨论 Spring 批处理中的缩放选项:https://youtu.be/J6IPlfm7N6w?t=2230
我有一个要求,我需要处理存储在目录/GCP 中的 400 多个 CSV 文件(每个 100 到 500MB)。
对于每个文件,我需要从数据库中获取有效帐号并将它们保存在内存中,根据内存中的数据验证文件的每一行并将有效记录写入另一个 CSV 文件(列格式更改)并生成导出文件到 AWS。将来,希望支持来自 MQ 的请求,并且流程保持不变。
要求在分布式系统中实现。
我计划使用 Spring 批处理来满足此要求,但我无法找到使用不同系统作为管理器 - 工作人员的远程分区的良好示例/代码。我想了解如何配置 Manager、Worker、如何启动它们以及将文件元数据作为请求和响应传递。
我得到了在单个 JVM 上进行分区的示例,因此仅使用示例代码寻找 Manager-Worker 示例。
任何建议/参考将不胜感激,并提前致谢。
I am planning to use Spring Batch for this requirement, But i am unable to find good example / code of Remote partitioning using different systems as Manager - Worker.
远程分区在此处通过代码示例和图表进行了详细说明:https://docs.spring.io/spring-batch/docs/4.2.x/reference/html/spring-batch-integration.html#remote-partitioning
您还可以找到:
- 这里有一个完整的示例:Remote partitioning sample along with the code for both Manager and Worker setup: https://github.com/spring-projects/spring-batch/tree/master/spring-batch-samples/src/main/java/org/springframework/batch/sample/remotepartitioning
- 在此处讨论 Spring 批处理中的缩放选项:https://youtu.be/J6IPlfm7N6w?t=2230