System properties and the Batch Processor

System properties and the Batch Processor

Note: This information is for the Java version of the Batch Processor only.

Because the Batch Processor spawns slave processes while running, it is important that the system properties can be effectively passed from the main master process to the sub-process.

This topic describes which system properties are automatically passed to a slave sub-process and the techniques for passing other system properties to be used only in the sub-process.

Passing system properties to worker sub-proceses

There is a single simple pattern for passing a system property to a slave process; any system property specified with a prefix of 'dbslave.' will be passed to each slave sub process.

User properties that are normally set by '-D<property name>=<property valule>', can be set by passing --bpslave <property name>=<property value>.

Example: Passing a specific timezone configuration to a sub-process

java -Duser.timezone=UTC -jar determinations-batch.jar --bpslave -Duser.timezone=UTC ...

 

In this case, the initial Java VM is using the system property user.timezone=UTC, the --bpslave argument will pass the system property "-Duser.timezone=UTC" to all worker sub-processes.

Passing VM arguments to worker sub-processes

X properties (memory etc) can be passed to worker processes using the same method.

Example: Passing -Xms and -Xmx memory properties to each slave

java -jar determinations-batch.jar --bpslave -Xmx128m --bpslave -Xms128m ...

 

In this case the arguments -Xms256m -Xmx256m are passed to the worker sub-processes when it starts up.