Uploaded image for project: 'Spring Batch'
  1. Spring Batch
  2. BATCH-2730

Incorrect remote partitioning sample in the documentation

    Details

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

        Attachments

          Activity

            People

            • Assignee:
              mbenhassine Mahmoud Ben Hassine
              Reporter:
              mbenhassine Mahmoud Ben Hassine
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: