-
Notifications
You must be signed in to change notification settings - Fork 23
Scheduler Plugins
andre-merzky edited this page Dec 29, 2014
·
1 revision
The RADICAL-Pilot UnitManager
class is responsible for assigning and enacting submitted Unit
s on the respectively available Pilot
s. The specific placement algorithm is encapsulated in scheduler plugins, to support research and experiments on different scheduling strategies.
The scheduler plugin interface is rather simple:
- Scheduler components must be installed under
troy/plugins/scheduler/troy_unit_scheduler_[name].py
, where name should be a short and descriptive string likeround-robin
, etc. - the scheduler module must include two structures:
- a description dictionary like this one:
PLUGIN_DESCRIPTION = {
'name' : 'round_robin',
'version' : '0.1',
'type' : 'unit_scheduler',
'description' : 'simple scheduler, assigns CUs to pilots in round-robin fashion.'
}
* the scheduler class, similar to this stub:
class PLUGIN_CLASS (object) :
def __init__ (self, unit_manager) :
...
def run (self) :
...
The scheduler's responsibility is to move Unit
s, which are submitted to the UnitManager
and thus registered in the data store as:
/sinon/v1/users/<username>/<sid>/um.1/u.1
/sinon/v1/users/<username>/<sid>/um.1/u.2
/sinon/v1/users/<username>/<sid>/um.1/u.3
/sinon/v1/users/<username>/<sid>/um.1/p.1/
/sinon/v1/users/<username>/<sid>/um.1/p.1/
into the respective Pilot
s, like:
/sinon/v1/users/<username>/<sid>/um.1/p.1/u.1
/sinon/v1/users/<username>/<sid>/um.1/p.1/u.3
/sinon/v1/users/<username>/<sid>/um.1/p.2/u.2
That is the location where the pilot agents will pick the units up to execute them.