JSR 352 :How to collect data from the Writer of each Partition of a Partitioned Step?
问题 So, I have 2 partitions in a step which writes into a database. I want to record the number of rows written in each partition, get the sum, and print it to the log; I was thinking of using a static variable in the Writer and use Step Context/Job Context to get it in afterStep() of the Step Listener. However when I tried it I got null . I am able to get these values in close() of the Reader. Is this the right way to go about it? Or should I use Partition Collector/Reducer/ Analyzer? I am using