Defining configuration overrides at runtime
Using one of a number of available methods, you can override the default batch processor configuration on a per-job basis.
The default configuration of the batch processor is defined in the properties file Batch.properties. The configuration overrides enable you to change the configured behavior specifically for the processing of a given batch job.
For example,
if the default consumer number of a submitter is defined in the Batch.properties file as Submitter.number=5
, you can use one of the override methods to provide a different
submitter number value for a specific batch job.
- Extension properties file override
- Create an extension properties file containing one or more configuration
overrides, and then reference that file either from the command line
when you start a batch job or from the
ExtProperties
attribute in the task definition. All of the properties defined in your extension properties file will override the corresponding properties in the default Batch.properties file.The extension properties file must be located in the $home\properties folder.
Important: When you specify the extension properties file, either in a command line or in theExtProperties
attribute, do not include the .properties file extension suffix.
- Input type override
- In the Batch.properties file or an extension
properties file, define the property
runtime.override.input.<inputType>
to override the configuration settings based on the input type.For example, the following property setting in Batch.properties defines a configuration override using a CSV input type:
runtime.override.input.csv=ReaderQueue=com.ibm.mdm.batchframework.bulkprocessing.queue.TitledSingleLineCSVFileReaderQueue;message_generator=com.ibm.mdm.batchframework.message.CSVStringMessageGenerator
Tip: As shown, multiple configuration items can be included. The must be separated by a semicolon (;
) and all of the items must be on a single line in the file.The input type style of runtime override takes precedence over the extension properties file override.
- Task definition ID override
- In the Batch.properties or an extension properties
file, define the property
runtime.override.jobdef.<TaskDefinitionId>
to override the configuration settings based on the task definition ID (task type).For example, the following property setting in Batch.properties defines a configuration override using the task definition ID 10 (Standardize Person Names):
runtime.override.jobdef.10=ParseAndExecConfiguration.OperationType=All;ParseAndExecConfiguration.requesterName=cusadmin;ParseAndExecConfiguration.requesterLanguage=100;ParseAndExecConfiguration.Parser=TCRMService;ParseAndExecConfiguration.Constructor=TCRMService;ParseAndExecConfiguration.CompositeTxn=no
Tip: As shown, multiple configuration items can be included. The must be separated by a semicolon (;
) and all of the items must be on a single line in the file.The task definition ID style of runtime override takes precedence over all other types of overrides except for the batch job definition override.
- Batch job definition override
In the batch job definition comment in the
CDATA
section, define a configuration override using theRuntimeOverride
attribute. For example:<TaskCommentBObj> <CommentText> <![CDATA[ <File>/tmp/delta20121124.csv</File> <RuntimeOverride>Submitter.number=10; queueSize=1500</RuntimeOverride> ]]> </CommentText> </TaskCommentBObj>
The batch job definition comment style of runtime override takes precedence over all other types of overrides.
The priority order of the different styles of runtime overrides, from highest priority (overrides all other configuration override styles) to lowest priority (overrides only the default Batch.properties setting):
- Batch job definition
- Task definition ID
- Input type
- Extension properties file