The Discriminator Block
Discrimination is a feature of GridServer that allows you to selectively use Engines based on their properties. They enable you to specify if a job or a task can be taken by certain Engines. Normally, discriminators are attached to Services using the GridServer API. However, with PDriver, you can specify job-level or task-level discriminators in your PDS script.
In the discriminator block of a PDS script, you can declare discriminators, which consist of a property name, a comparator, and a value:
property-name==|!=|<|>|<=|>=param-value
For example, putting the following code in a discriminator block discriminates against Engines with a value of 350 or less in the cpuMHz Engine property:
cpuMHz > 350
Declaring a discriminator creates a job-level discriminator by default. You can also create a discriminator that requires conditions to be met before the discriminator is applied to a task. This is accomplished by using an affects clause in the discriminator block.
Use of the affects clause specifies conditions that must be met for the discriminator to be applied to a particular task. For example, the following discriminator block shows how to apply the same discriminator as above, but only for the first five tasks:
discriminator
affects
$DSTASKID <= 5
end
cpuMHz > 350
end
Multiple discriminator blocks with affects clauses can be used.
The property name refers to Engine properties. A predefined set of properties are assigned to all Engines by default. You can assign additional properties to Engines by selecting Edit/View Properties from the Actions list in Grid Components > Engines > Daemon Admin in the Administration Tool.