Fixed
Details
Assignee
Mincong HuangMincong HuangReporter
Mincong HuangMincong HuangComponents
Fix versions
Priority
Major
Details
Details
Assignee
Mincong Huang
Mincong HuangReporter
Mincong Huang
Mincong HuangComponents
Fix versions
Priority
Created May 11, 2017 at 7:24 PM
Updated December 3, 2024 at 11:53 AM
Resolved May 15, 2017 at 8:10 AM
In JSR-352, a checkpoint algorithm is an algorithm which allows to customize the checkpoint policy for a chunk step. To achieve this, we can either specify the number of items to process per chunk when using the item checkpoint policy, or we can provide an implementation of interface
javax.batch.api.chunk.CheckpointAlgorithm
to benefit more customized checkpoint policy.Current, we use the second approach: we provide an implementation of interface, called
org.hibernate.search.jsr352.massindexing.impl.steps.lucene.CheckpointAlgorithm
. However, this implementation is unnecessary, because our checkpoint policy is simple, thecheckpoint interval can be defined via attribute `item-count`, which accepts a Job Specification Language (JSL) expression, see Spec 1.0 - §8.2.1. Syntax:
So we can ask user to provide the value of checkpoint interval, and then fill it into the
value
of the example above using JSL. If user does not provide a value explicitly, then the default value will be applied.