1

I have a partitioned job that reads from and writes to a DB. I have a chunking size of 100. If a partition fails and i want the restart to happen from the last commit, do i have to explicitly specify the checkpoint? (in Serializable checkpointInfo()?)

If so how/where?

Fazil Hussain
  • 425
  • 3
  • 16

1 Answers1

2

Answer

You need to implement the pair of methods: checkpointInfo() and open() for your ItemReader (and you can for your ItemWriter as well).

Example

You can see an example in this answer.

More info

Note that for a partitioned step, each partition has its own checkpoint. In this way the programming model is very similar from the reader/processor/writer perspective across partitioned and non-partitioned steps, and so they can be written independently of whether or not they are running in a partition (for the most part).

Community
  • 1
  • 1
Scott Kurz
  • 4,985
  • 1
  • 18
  • 40