org.globus.cog.karajan.scheduler
Class WeightedHostScoreScheduler
java.lang.Object
java.lang.Thread
org.globus.cog.karajan.scheduler.AbstractScheduler
org.globus.cog.karajan.scheduler.LateBindingScheduler
org.globus.cog.karajan.scheduler.WeightedHostScoreScheduler
- All Implemented Interfaces:
- Runnable, StatusListener, Scheduler
public class WeightedHostScoreScheduler
- extends LateBindingScheduler
Fields inherited from class org.globus.cog.karajan.scheduler.LateBindingScheduler |
DEFAULT_JOBS_PER_CPU, DEFAULT_MAX_FILE_OPERATIONS, DEFAULT_MAX_TRANSFERS, DEFAULT_SSH_INITIAL_RATE, executionHandlers, HOST_SUBMIT_THROTTLE, JOBS_PER_CPU, K, MAX_FILE_OPERATIONS, MAX_TRANSFERS, SSH_INITIAL_RATE, SUBMIT_THROTTLE, THREAD_STACK_SIZE |
Methods inherited from class org.globus.cog.karajan.scheduler.LateBindingScheduler |
allocateContact, allocateContact, cancelTask, checkFreeMemory, checkGlobalLoadConditions, checkLoad, checkTaskLoadConditions, decRunning, enqueue, failTask, findTaskHandler, getContacts, getHandler, getHandlerType, getJobsPerCPU, getNextContact, getRunning, getSubmitQueue, getTaskConstraints, getVirtualContacts, incRunning, isDone, removeHandler, resolveContact, resolveService, resolveVirtualContact, run, setHandler, setVirtualContacts, terminate |
Methods inherited from class org.globus.cog.karajan.scheduler.AbstractScheduler |
addFailureHandler, addJobStatusListener, addTaskHandler, addTaskTransformer, applyTaskTransformers, checkConstraints, checkConstraints, combineNames, fireJobStatusChangeEvent, fireJobStatusChangeEvent, getConstraintChecker, getConstraints, getJobQueue, getMaxSimultaneousJobs, getProperty, getResources, getTaskHadlerWrapper, getTaskHandlers, getTaskHandlerWrapper, getTaskHandlerWrappers, getTaskTransformers, removeConstraints, removeJobStatusListener, runFailureHandlers, setConstraintChecker, setConstraints, setMaxSimultaneousJobs, setTaskHandlers, throttleValue |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
POLICY_WEIGHTED_RANDOM
public static final int POLICY_WEIGHTED_RANDOM
- See Also:
- Constant Field Values
POLICY_BEST_SCORE
public static final int POLICY_BEST_SCORE
- See Also:
- Constant Field Values
FACTOR_CONNECTION_REFUSED
public static final String FACTOR_CONNECTION_REFUSED
- See Also:
- Constant Field Values
FACTOR_CONNECTION_TIMEOUT
public static final String FACTOR_CONNECTION_TIMEOUT
- See Also:
- Constant Field Values
FACTOR_SUBMISSION_TASK_LOAD
public static final String FACTOR_SUBMISSION_TASK_LOAD
- See Also:
- Constant Field Values
FACTOR_TRANSFER_TASK_LOAD
public static final String FACTOR_TRANSFER_TASK_LOAD
- See Also:
- Constant Field Values
FACTOR_FILEOP_TASK_LOAD
public static final String FACTOR_FILEOP_TASK_LOAD
- See Also:
- Constant Field Values
FACTOR_SUCCESS
public static final String FACTOR_SUCCESS
- See Also:
- Constant Field Values
FACTOR_FAILURE
public static final String FACTOR_FAILURE
- See Also:
- Constant Field Values
SCORE_HIGH_CAP
public static final String SCORE_HIGH_CAP
- See Also:
- Constant Field Values
POLICY
public static final String POLICY
- See Also:
- Constant Field Values
JOB_THROTTLE
public static final String JOB_THROTTLE
- See Also:
- Constant Field Values
WeightedHostScoreScheduler
public WeightedHostScoreScheduler()
setDefaultFactors
protected final void setDefaultFactors()
setResources
public void setResources(ContactSet grid)
- Description copied from interface:
Scheduler
- Sets the set of resources that the scheduler will use
- Specified by:
setResources
in interface Scheduler
- Overrides:
setResources
in class AbstractScheduler
- See Also:
ContactSet
addToSorted
protected void addToSorted(WeightedHost wh)
multiplyScore
protected void multiplyScore(WeightedHost wh,
double factor)
multiplyScoreLater
protected void multiplyScoreLater(WeightedHost wh,
double factor)
factor
protected final double factor(double score,
double factor)
getNextContact
protected BoundContact getNextContact(TaskConstraints t)
throws NoFreeResourceException
- Specified by:
getNextContact
in class LateBindingScheduler
- Throws:
NoFreeResourceException
releaseContact
public void releaseContact(Contact contact)
- Description copied from interface:
Scheduler
- Can be used to tell the scheduler that a previously allocated contact
(using allocateContact()) is not used any more.
- Specified by:
releaseContact
in interface Scheduler
- Overrides:
releaseContact
in class LateBindingScheduler
constrain
protected WeightedHostSet constrain(WeightedHostSet s,
ResourceConstraintChecker rcc,
TaskConstraints tc)
removeOverloaded
protected WeightedHostSet removeOverloaded(WeightedHostSet s)
getPropertyNames
public String[] getPropertyNames()
- Specified by:
getPropertyNames
in interface Scheduler
- Overrides:
getPropertyNames
in class LateBindingScheduler
setProperty
public void setProperty(String name,
Object value)
- Description copied from interface:
Scheduler
- Sets a scheduler property. The supported property names can be queried
using the getPropertyNames method
- Specified by:
setProperty
in interface Scheduler
- Overrides:
setProperty
in class LateBindingScheduler
submitBoundToServices
public void submitBoundToServices(Task t,
Contact[] contacts,
Service[] services)
throws TaskSubmissionException
- Overrides:
submitBoundToServices
in class LateBindingScheduler
- Throws:
TaskSubmissionException
statusChanged
public void statusChanged(StatusEvent e)
- Specified by:
statusChanged
in interface StatusListener
- Overrides:
statusChanged
in class LateBindingScheduler