Execution of the build() method is needed twice, because the first call builds the Job subflow initiated by the decider. The second build() call constructs the main Job instance. After we run this example, we can observe the same output as for the previous example (Listing 9-114).
Scaling and Parallel Processing
All the executions so far have been single-threaded. Sequential processing is often required by the nature of the data being processed, or simply isn’t slow enough to represent a bottleneck in an enterprise system.
But often data doesn’t have to be processed in sequence. In these cases, we can consider whether distributing the batch processing into separate threads or processes would boost overall performance. Fortunately, SB’s creators ...