+

Search Tips   |   Advanced Search

Declaring the percentage-based threshold policy (PercentageBasedThresholdPolicy)

The PercentageBasedThresholdPolicy policy provides a batch implementation of the ThresholdPolicy interface.

The percentageBasedThresholdPolicy policy applies only if the ThresholdBatchStep is used. It calculates the percentage of the number of error records processed to the total number processed. If the result is greater than the threshold, it forces the job to go into restartable state.

Optionally use the following properties when you declare the percentage-based threshold policy.

Property Value Description
debug true or false (default is false) Enable tracing and debugging on the step
minimum_threshold_sample_size Integer value (default is 20) The minimum number of records to process before checking for threshold breach.
threshold_percentage Double value (default is 0.1) The acceptable percentage of errors.


Tasks

Declare the threshold policy to use in the xJCL as a property of the step as follows:

...
<props>		        
	<prop name="threshold_policy"
   value="com.ibm.websphere.batch.devframework.thresholdpolicies.PercentageBasedThresholdPolicy"/>
</props>
...    


Related:

  • Batch data stream framework and patterns
  • Developing a simple transactional batch application
  • Implement the error tolerant step (ThresholdBatchStep)
  • Declaring the record based threshold policy (RecordBasedThresholdPolicy)