Grid Job Handler Event Channel Syntax

Andreas Hoheisel, Tom Zschaage, Steffen Loos

Technical Report - Fraunhofer FIRST

2003-11-14

$Id: EventChannelSyntax.html,v 1.3 2003/11/14 13:54:21 hoheisel Exp $


All events that occur due to the execution of a Grid job will be distributed to registered listeners inside the Grid Job Handler using the Java Beans Property Change mechanism. External Programs can access this events using the WebService interface. The syntax of the events is specified below.

Java Beans provide an easy way to define an event channel. So every object, which produces events, pushes this event to the event channel that can be observed from listeners. This provides the feature that events from different locations can be collected into a single location. This is also a challenge since we have different events, for example a grid job can be finished or an Atomic job can have a problem. We code these different kinds of events into several key-value tokens separated by pipe symbols (|). So an identifier can look like the following example:

jobHandler#demeter.first.gmd.de:8080|gridJob#15|transition#t_done1|status

The first part carries information which JobHandler instance is acting. This part is omitted in the internal event system of the JobHandler and only appended by remote clients if they need to distinguish between different handlers. In our example the next part provides the grid job ID, followed by the transition ID whose status is carried in the old and new value. Please note that only events below the gridJob token will be submitted to the client. atomicJob is the most generic token it applies to every job description format, whereas transition and place only apply to descriptions in a Petri Net style. Therefore, a client is required to evaluate which token is needed for its purposes.

Remember that "|", "#", "=" and ">" are used as delimiters, so they must not used in element names, identifiers or values.

Valid event identifiers and their corresponding values:

Parent Element
Element
Child Elements
#Identifier
Value
-
jobHandler
status, error, gridJob
URL of jobHandler
-
transition, place
type
-
-
see separate table
jobHandler, gridJob, resource, transition, place, atomicJob
status
-
-
see separate table
jobHandler, gridJob, resource, transition, place, atomicJob
error
-
-
String containing an error message
jobHandler
gridJob
status, error, resource, transition, place, atomicJobsSize, atomicJob
Grid job ID
-
gridJob
resource
status, error
URL of the resource description
-
gridJob
addTransition
-
-
transition ID
gridJob
removeTransition
-
-
transition ID
gridJob
addPlace
-
-
place ID
gridJob
removePlace
-
-
place ID
gridJob
addArc
type
-
"arc ID=transition ID>place ID" or
"arc ID=place ID>transition ID"
gridJob
removeArc
-
-
arc ID
gridJob
transition
type, status, error, info
transition ID
-
gridJob
place
type, status, error, info
place ID
-
gridJob
atomicJobsSize
-
-
Number of atomic Jobs in this Grid job
gridJob
atomicJob
status, error, resourceManagerContact, executable, arguments, stdout, stderr, stdin
atomic job ID
-
transition
info
-
-
String containing information about the transition
place
info
-
-
String containing information about the place
atomicJob
resourceManagerContact
-
-
String containing the GRAM rmc or "local" if atomic job is executed by the jobHandler itself
atomicJob
executable
-
-
String containing the filename of the executable or the Java class if rmc was "local"
atomicJob
arguments
-
-
String containing the arguments for this atomicJob
atomicJob
stdout
-
-
String containing the filename where to write the standard output
atomicJob
stderr
-
-
String containing the filename where to write the standard error
atomicJob
stdin
-
-
String containing the filename from where to read the standard input

Valid type information

The numeric value may be an addition of single values, e.g., 2+4=6.

Parent Element
Numeric Value
String Value
transition
0
1
2
4
TYPE_VOID
TYPE_SOFTWARE
TYPE_CONDITION
TYPE_METHOD_CALL
place
0
1
TYPE_CONTROL
TYPE_DATA

Valid status information

The numeric value may be an addition of single values, e.g., 2+4=6.

Parent Element
Numeric Value
String Value
jobHandler


gridJob
0
1
2
4
8
16
32
64
STATUS_UNDEFINED: Grid job is undefined
STATUS_DEFINING: Definition phase of the grid job
STATUS_PENDING: Grid job is pending i.e. defined but not active
STATUS_ACTIVE: Grid job is active
STATUS_SUSPENDED: Grid job has been suspended
STATUS_FAILED: Grid job has failed
STATUS_DONE: Grid job is done
STATUS_ABORTED: Grid job has been aborted
resource
1
2
STATUS_AVAILABLE
STATUS_LOADING
atomicJob
1
2
4
8
16
32
STATUS_PENDING
STATUS_ACTIVE
STATUS_FAILED
STATUS_DONE
STATUS_SUSPENDED
STATUS_UNSUBMITTED
transition
1
2
4
8
STATUS_IDLE
STATUS_ENABLED
STATUS_TRIGGERED
STATUS_FIRING
place
1
2
STATUS_MARKED
STATUS_LOCKED

Examples

Some examples (without the jobHandler Identifier):
gridJob#1|status=1
gridJob#1|resource#http://mmm.first.fhg.de/grdl/hc/grid-nodes-fhrg.xml|status=2
gridJob#1|transition#dwm|type=1
gridJob#1|transition#dwm|status=1
gridJob#1|place#p_start|status=1
gridJob#1|atomicJobsSize=1
gridJob#1|atomicJob#1|status=32
gridJob#1|atomicJob#1|resourceManagerContact=local
gridJob#1|atomicJob#1|executable=de.fhrg.gridftp.GridFtp#1
gridJob#1|atomicJob#1|arguments=swineherd.first.gmd.de:/home/swineherd/ilab/fhrgbin/ERAMAS/evapPool-20030625.tar.gz->swineherd.first.gmd.de:~/tmp1061984680428-1-1/evapPool-20030625.tar.gz
gridJob#1|atomicJob#1|resourceManagerContact=harlekin.first.gmd.de
gridJob#1|atomicJob#3|executable=/bin/tar
gridJob#1|atomicJob#4|arguments=-xzf $(HOME)/tmp1061984680619-1-2/dwmpgf-20030625.tar.gz -C $(HOME)/tmp1061984680619-1-2
gridJob#1|atomicJob#3|stdout=$(HOME)/tmp1061984680428-1-1/unpackEvapPool.stdout
gridJob#1|atomicJob#3|stderr=$(HOME)/tmp1061984680428-1-1/unpackEvapPool.stderr
gridJob#1|atomicJob#7|error=Error during gridFtp(): org.globus.ftp.exception.ServerException
gridJob#1|addTransition=t_lagrange
gridJob#1|addPlace=p_data
gridJob#1|addArc=arc5=p_data>t_lagrange
gridJob#1|removeTransition=t_lagrange
gridJob#1|removePlace=p_data
gridJob#1|removeArc=arc5
gridJob#1|transition#t_lagrange|type=1
gridJob#1|transition#t_lagrange|info=This transition is linked to lagrange
gridJob#1|place#p_data|type=
gridJob#1|place#p_data|info=This place is linked to file data