The jobagent.properties
file is the main configuration file
for job agents. It is located in the <basedir>/www/WEB-INF/classes
directory.
This section describes the configuration parameters that are used by the job agent to get access to the BASE server.
Required. The BASE user account used by the job agent to log on to the BASE server. The user account must have sufficient privileges to access jobs and job agents. The Job agent role is a predefined role with all permissions a job agent needs. There is also a predefined user account with the user name jobagent. This account is disabled by default and has to be enabled and given a password before it can be used.
Required. The password for the job agent user account.
Required. A unique ID that identifies this job agent among other job agents. If multiple job agents are installed each job agent should have it's own unique ID.
Optional. The name of the job agent. If not specified the ID is used. The name is only used when registering the job agent with the BASE server.
Optional. A description of the job agent. This is only used when registering the job agent.
This section describes the configuration parameters that affect the job agent server itself.
Optional. The port the job agent listens to for control requests.
Control requests are used for starting, stopping, pausing and getting
status information from the job agent. It is also used by the
jobagent.sh
script to control
the local job agent. The default value is 47822.
Optional. A comma-separated list of IP addresses or names of computers that are allowed to send control requests to the job agent. If no value is specified, only the local host is allowed to connect. It is recommended that the web server is added to the list if the job agent is not running on the same server as the web server.
Optional. If the stop
command should be
accepted from remote hosts specified in the agent.remotecontrol setting.
If false
, which is the default value,
only the local host is allowed to stop the job agent.
Note | |
---|---|
Once the job agent has been stopped it cannot be started
by remote control. You must use the |
Optional. If the pause
command should be
accepted from remote hosts specified in the agent.remotecontrol setting.
If false
, only the local host is allowed to
pause the job agent. The default value is true
.
Optional, valid only when job agent is paused. If
the start
command should be accepted from
remote hosts specified in
the agent.remotecontrol setting.
If false
, only the local host is
allowed to start the job agent when it is paused. The
default value is true
.
Optional. One or more entries for custom remote control handlers.
The * should be replaced with the name of the protocol and the
value should be the name of a class implementing the
CustomRequestHandler
foo://custom-data....
.
This section describes the configuration parameters that affect the execution of jobs.
The name of the Java class that handles the actual execution of jobs. The default implementation for a job agent ships three implementations:
net.sf.basedb.clients.jobagent.executors.ProcessJobExecutor
net.sf.basedb.clients.jobagent.executors.ThreadJobExecutor
net.sf.basedb.clients.jobagent.executors.DummyJobExecutor
It is possible to create your own implementation of a job executor.
Create a class that implements the
net.sf.basedb.clients.jobagent.JobExecutor
Optional. The path to the Java executable used by the
ProcessJobExecutor
JAVA_HOME
environment variable will be checked.
As a last resort java
is used without path
information to let the operating system find the default
installation.
Optional. Additional command line options to the Java executable.
Do not add memory options (-Mx
or
-Ms
), it will be added automatically by the
executor. This setting is used by the
ProcessJobExecutor
Optional. Number of seconds the DummyJobExecutor
Optional. Number of seconds between querying the database for jobs that are waiting for execution. The default value is 30 seconds.
The job agent does not execute an arbitrary number of jobs simultaneously. This would sooner or later break the server. A slot manager is used to assign jobs to a pre-configured number of slots.
The name of the Java class that handles slot assignment to jobs. The standard job agent ships with three different implementations:
net.sf.basedb.clients.jobagent.slotmanager.InternalSlotManager
net.sf.basedb.clients.jobagent.slotmanager.MasterSlotManager
RemoteSlotManager
net.sf.basedb.clients.jobagent.slotmanager.RemoteSlotManager
MasterSlotManager
It is possible to create your own implementation of a slot manager.
Create a class that implements the
net.sf.basedb.clients.jobagent.slotmanager.SlotManager
The ip-adress or name of a job agent running as the master slot manager.
This setting is needed by the RemoteSlotManager
The remote control port number of the job agent running as the
master slot manager. Make sure that the master job agent is accepting connection
from this job agent. This setting is needed by the RemoteSlotManager
This table lists slot settings for the internal and master
slot managers. The remote slot manager will get slots from
another job agent.
A thread priority is associated with each slot.
The priority is a value between 1 and 10 as defined by the
java.lang.Thread
class. The
priorities are not handled by the slot managers, but by the job
agent core and apply to all job agents, no matter which slot manager
that is selected.
Property | Default value | Estimated execution time |
---|---|---|
agent.shortest.slots | 1 | < 1 minute |
agent.shortest.priority | 4 | |
agent.short.slots | 1 | < 10 minutes |
agent.short.priority | 4 | |
agent.medium.slots | 2 | < 1 hour |
agent.medium.priority | 3 | |
agent.long.slots | 2 | > 1 hour |
agent.long.priority | 3 |