I have a ListItemReader
, which makes a repo call to read data from database.
How can I partition when my primary key column in SQL results does not have consecutive values in count of 1000s
(ex. 3785, 3854, 3899, 3942, 3956)?
I used SimplePartitioner
but all threads read the same data. I have the @StepScope
annotation in place.
Also tried range partitioner but could not partition correctly due to non consecutive ids.
I expect to partition the repo results so it divides 1000s of ids equally on multiple threads (grid size provided)