[BATCH-2730] Incorrect remote partitioning sample in the documentation Created: 08/Jun/18  Updated: 05/Jul/18  Resolved: 05/Jul/18

Status: Resolved
Project: Spring Batch
Component/s: Documentation
Affects Version/s: 4.0.1, 4.1.0.M1
Fix Version/s: 4.0.2, 4.1.0.M2

Type: Bug Priority: Minor
Reporter: Mahmoud Ben Hassine Assignee: Mahmoud Ben Hassine
Resolution: Complete Votes: 0
Labels: pull-request-submitted
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Pull Request URL: https://github.com/spring-projects/spring-batch/pull/612

 Description   

There are some minor errors in the remote partitioning section of the documentation. The code example of the partitioned step is incorrect:

public Job personJob() {
                return jobBuilderFactory.get("personJob")
                                .start(stepBuilderFactory.get("step1.master")
                                                .partitioner(partitionHandler())
                                                .build())
                                .build();
 }

while it should be:

public Job personJob() {
                return jobBuilderFactory.get("personJob")
                                .start(stepBuilderFactory.get("step1.master")
                                                .partitioner("step1.worker", partitioner())
                                                .partitionHandler(partitionHandler())
                                                .build())
                                .build();
 }

Moreover, the code example shows all beans in the same bloc without mentioning which ones should be declared on the master side and which ones should be declared on the worker side. This is confusing. It should either use profiles or separate the master's configuration from the worker's configuration.

Finally, it would be great to add a remote partitioning sample to the spring-batch-samples module (current samples show only local partitioning).


Generated at Sun Sep 22 00:11:45 UTC 2019 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.