+

Search Tips   |   Advanced Search

Parallel job manager APIs

Parallel job manager (PJM) SPIs in previous releases are now APIs. They are packaged as part of an application.


Parameterizer API

The purpose of the parameterizer API is to divide the top-level job into multiple subordinate jobs. The parameterizer API determines the number of subordinate jobs to create, and the input properties passed to each subordinate job. Typically, the input properties contain information for which data chunks process a particular subordinate job. Implementation of the parameterizer API is mandatory.

There is a default parameterizer API that provides the basic functions of the generic parameterizer. To invoke this implementation, set the com.ibm.websphere.batch.parallel.parameterizer property to a value of com.ibm.ws.batch.parallel.BuiltInParameterizer in the xJCL. To specify the number of subordinate jobs, set the com.ibm.wsspi.batch.parallel.jobs input property to N, where N is the number of the subordinate job. To specify a unique property to a specific subordinate job instance, use the property com.ibm.wsspi.batch.parallel.prop.<property_name>.<subordinate_job>=<value> where subordinate_job is the subordinate job instance (1< subordinate job < N). All other properties in <property_name>= <value> format are visible to all subordinate jobs.


Synchronization API

The synchronization API gives you control during the various life cycle stages of the logical transaction. For example, the Begin, beforeCompletion, and afterCompletion life stages. Use these control points to roll back the logical transaction if necessary.


SubJobCollector API

The SubJobCollector API collects information related to a subordinate job execution. In a typical implementation, progress information about a subordinate job is stored as an externalizable object within the subordinate job context. When the batch container starts the collector API, the information previously stored within the subordinate job context is returned.


SubJobAnalyzer API

The SubJobAnalyzer API is used to analyze information collected previously using the SubJobCollector API. In a typical implementation, the SubJobAnalyzer API is used to aggregate information obtained from all subordinate jobs to determine the consolidated return code for the top-level job. The SubJobAnalyzer API is called during checkpoint processing and on job completion.


Context objects

The batch runtime environment provides context objects that offer a common work areas among APIs and batch application programming model artifacts. A context object allows user code to save and retrieve a Java Object and share it within the context scope. The batch runtime environment ensures appropriate cleanup of context objects and end of scope. There are two context object types:


Related:

  • Parallel job manager (PJM)
  • Other considerations for the parallel job manager
  • jobrecovery.bat|.sh batch script
  • Samples, v8.5