Skip to content

Incorrect remote partitioning sample in the documentation [BATCH-2730] #875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Jun 8, 2018 · 0 comments
Labels
has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" in: documentation type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Mahmoud Ben Hassine opened BATCH-2730 and commented

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).


Affects: 4.0.1, 4.1.0.M1

Referenced from: pull request #612, and commits 5730f38, 2c5b7b5

Backported to: 4.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" in: documentation type: bug
Projects
None yet
Development

No branches or pull requests

1 participant