unm.maui.sched
Class BackfillMod

java.lang.Object
  extended byunm.maui.sched.BackfillMod
All Implemented Interfaces:
java.util.EventListener, MauiListener, SchedListener, java.io.Serializable

public class BackfillMod
extends java.lang.Object
implements SchedListener, java.io.Serializable

Basic Scheduler.

See Also:
Serialized Form

Field Summary
protected  int bfdepth
          Backfill depth.
static java.lang.String bfDepthProperty
           
protected  java.lang.String prefix
          Properties prefix.
protected  java.lang.String resClass
          JobReservation class string.
static java.lang.String resClassProperty
           
protected  Scheduler scheduler
          The scheduler.
 
Constructor Summary
BackfillMod()
          Construct
 
Method Summary
 void assignProperties(java.lang.String prefix, java.util.Properties props)
          Set properties.
 void event(SchedEvent evt)
          Schedule jobs.
protected  Reservation makeReservation(Job job, long starttime)
          Core method to make reservation(s) (potentially spanning RMs) for a given schedulable object.
We ask the matcher object for available nodes/slots to run the job (potentially at a given starttime).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bfDepthProperty

public static final transient java.lang.String bfDepthProperty
See Also:
Constant Field Values

resClassProperty

public static final transient java.lang.String resClassProperty
See Also:
Constant Field Values

scheduler

protected Scheduler scheduler
The scheduler.


bfdepth

protected transient int bfdepth
Backfill depth.


resClass

protected transient java.lang.String resClass
JobReservation class string.


prefix

protected java.lang.String prefix
Properties prefix.

Constructor Detail

BackfillMod

public BackfillMod()
Construct

Method Detail

assignProperties

public void assignProperties(java.lang.String prefix,
                             java.util.Properties props)
Set properties.

Specified by:
assignProperties in interface MauiListener
Parameters:
prefix - String properties prefix
props - Properties

event

public void event(SchedEvent evt)
Schedule jobs.

Scheduling is done in basic FIFO order (NOTE: jobs have been previously prioritized and are sorted in order of priority in the queue). First we clear any job reservations made previously, then, starting at the head of the queue, we ask the question can we make an immediate reservation for the job? If so, we do and continue this process until we cannot immediately schedule the next highest priority job.
In addition, any reservations that are made are immediately activated (which means that the jobs are submitted to and started on the relevant RMs).

Specified by:
event in interface SchedListener
Parameters:
evt - SchedEvent
See Also:
SchedListener.event(unm.maui.sched.SchedEvent)

makeReservation

protected Reservation makeReservation(Job job,
                                      long starttime)
Core method to make reservation(s) (potentially spanning RMs) for a given schedulable object.
We ask the matcher object for available nodes/slots to run the job (potentially at a given starttime). Make a reservation if we get enough nodes/slots. NOTE: as with all internal scheduler/RM methods it is assumed that the JobFilter has successfully parsed the job requirements and hasn't allowed a job with bogus parameter values through...

Parameters:
job - Job
starttime - time when we want the job to start (if < 0, then starttime isn't a concern)
Returns:
Reservation or null if reservation could not be made