
As Hawkeye modules are executed, they are expected to produce ClassAd attribute/value pairs. This output of ClassAds is incorporated into the machine Class Ad generated by the condor_startd daemon.
Hawkeye modules are most frequently implemented as scripts, although there is no reason that they need to be scripts. All scripts output one or more ClassAd attribute/value pairs, one pair per line.
At the end of each ClassAd, a line starting with a dash
character (-) should be generated.
It is used to separate one ClassAd from another.
While optional for periodic modules, this line is
required for continuous modules to separate the ClassAds. In
general, for periodic modules, the line with the dash
should be the last output.
An example of a module output that generates two pairs:
attr1 = value1 attr2 = value2 -For string (non-numeric) values, the string must be enclosed in double quotes. An example:
stringattr = "string"
Some modules would appreciate the ability to produce
an array's worth of pairs.
ClassAds do not currently have the ability to specify array
data structures.
A naming convention for attributes substitutes for the
actuality of arrays.
In addition, an extra attribute called INDEX
specifies the indices of this array substitute.
Here is an example of an array-like attribute
called list:
list_1 = value1 list_2 = value2 list_3 = value3 INDEX = "1 2 3" -This array substitute has three elements, identified by the string (index) "1", "2", and "3". The attribute name for each element of this array is formed by appending an underscore character (
_) followed
by one of the index strings.
To further organize ClassAd attributes, it may be useful to
have each array element within this array substitute
have multiple fields.
This is mimicking a data structure identified as an array
of structures.
The fields within a structure are feigned by a further addition
to the attribute name.
An underscore character (_) is followed
by one of the field names.
The field names are specified by their own
attribute pair that uses strings (separated by white space characters)
and is called FIELDS.
Here is the example from above (three array elements, where the
array is called list),
where each element
has two fields.
list_1_a = value1a list_1_b = "X" list_2_a = value2a list_2_b = "Y" list_3_a = value3a list_3_b = "Z" INDEX = "1 2 3" FIELDS = "a b" -The two fields are called "a" and "b". Field "a" is defined by a numerical value, and field "b" is defined by a string.