简体   繁体   English

Spring Batch远程分区

[英]Spring Batch Remote Partitioning

I would like to understand the integration between DeployerPartitionHandler and DeployerStepExecutionHandler during Remote Partitioning. 我想了解远程分区期间DeployerPartitionHandlerDeployerStepExecutionHandler之间的集成。

How does the start time, end time, execution status of the parent task execution is updated when there are multiple workers? 当有多个工作程序时,父任务执行的开始时间,结束时间和执行状态如何更新?

What happens if one of the worker process becomes unresponsive because of some external reasons? 如果某个工作进程由于某些外部原因而无法响应,该怎么办? Is there a way to handle this situation programmatically? 有没有办法以编程方式处理这种情况? ie, to kill the unresponsive process and fail the step. 即杀死无响应的过程并使该步骤失败。

Thanks in advance for inputs!! 在此先感谢您的投入!

You have a number of questions here so let me answer them one at a time. 您在这里有很多问题,所以让我一次回答一次。

How does the start time, end time, execution status of the parent task execution is updated when there are multiple workers? 当有多个工作程序时,父任务执行的开始时间,结束时间和执行状态如何更新?

All components within this architecture are tasks. 该体系结构中的所有组件都是任务。 The parent is a task, the workers are each tasks, so they all update the task repository independently. 父级是一个任务,工人是每个任务,因此它们都独立更新任务存储库。 The parent application will mark the start time at the beginning of the task (before any CommandLineRunner or ApplicationRunner implementations are called). 父应用程序将在任务开始时标记开始时间(在调用任何CommandLineRunnerApplicationRunner实现之前)。 It will update the end time and results once all the workers are done (since the remote partitioned step won't complete until all the workers have completed or timed out). 一旦所有工作程序完成,它将更新结束时间和结果(因为远程分区步骤要等到所有工作程序完成或超时后才能完成)。

What happens if one of the worker process becomes unresponsive because of some external reasons? 如果某个工作进程由于某些外部原因而无法响应,该怎么办?

The deployers used by the DeployerPartitionHandler depend on a platform (CloudFoundry, Kubernetes, etc) for production use. DeployerPartitionHandler使用的DeployerPartitionHandler取决于用于生产用途的平台(CloudFoundry,Kubernetes等)。 Each of these platforms handle hung processes in their own way so the answer to this question is really platform specific. 这些平台中的每一个都以自己的方式处理挂起的进程,因此,该问题的答案实际上是特定于平台的。 In most cases, if a process is identified as not healthy (by whatever definition the platform uses) it will be shut down. 在大多数情况下,如果某个进程被确定为运行状况不佳(根据平台使用的定义),则该进程将被关闭。

Is there a way to handle this situation programmatically? 有没有办法以编程方式处理这种情况? ie, to kill the unresponsive process and fail the step. 即杀死无响应的过程并使该步骤失败。

If a partition fails during the execution, the parent will be also marked as failed and can be restarted. 如果分区在执行期间失败,则父级也将被标记为失败并且可以重新启动。 On a restart (by default), only the failed partitions will be re-run. 重新启动时(默认情况下),将仅重新运行失败的分区。 Any partitions that are already complete will not be re-executed. 任何已经完成的分区都不会重新执行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM