gov.bnl.star.offline.scheduler
Class Queue

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.Queue

public class Queue
extends java.lang.Object

Description of a batch system queue.

Author:
Levente Hajdu

Field Summary
 double accumulatedResponseTime
           
 double baseResponseTime
           
 int Ncpus
           
 
Constructor Summary
Queue()
          Creates a new instance of Queue
 
Method Summary
 void addAccessMethod(AccessMethod accessMethod)
          Used by the framwork to configure the queue
 void addQueueDiscriptors(QueueDiscriptorBase queueDiscriptor)
          Used to add a new QueueDiscriptor to relate the queue to a dispatcher.
 boolean doesJobFit(Job job, Request request)
          Test if this queue meets the hard unchangable limits (jobTimeLimit and memlimit) of the queue
 java.util.List getAccessMethods()
          Return the list of all access methods under which this is queue is listed in the config
 java.lang.String getCluster()
          Returns the cluster name of the cluster the queue is on
 java.lang.String getID()
          Becuase not all queues have names an ID is used, in case data about the queue must be printed.
 java.lang.String getImplementation()
          Is it a "local" queue, "grid" queue, or another type of queue
 java.lang.String getLocalGateway()
           
 int getMaxMemory()
          The max memory a job may have in order for it to be assined to this queue.
 java.lang.String getMessages()
          Returns information about why jobs do / don't fit after calling the doesJobFit()
 java.lang.String getName()
          Returns the name of the Queue
 java.util.List getQueueDiscriptors()
           
 RDLApplicationResolver getRDLApplicationResolver()
           
 java.lang.String getRejectIfTargetHostStartsWith()
           
 java.lang.String getRemoteGateway()
           
 int getSearchOrderPriority()
          The Search Order Priority number of the queue
 java.lang.String getSite()
           
 int getTimeLimit()
          The time limit(in minutes) a job can stay in the queue before it gets killed or before it needs to find an other queue.
 java.lang.String getType()
           
 boolean IsOptimizedAsLocalQueue()
          Returns true is this is a local queue
 void setAccessMethods(java.util.List accessMethods)
          Resets the accessMethods list for this queue.
 void setBatchSystem(BatchSystem batchSystem)
          Recovers the dispatcher to be used by this queue from the config
 void setCluster(java.lang.String Cluster)
          Sets a name used by the, Cluster Dispatcher Chooser to send the job to the right queue This value should be set in the config file
 void setID(java.lang.String QueueID)
          Becuase not all queues have names an ID is used.
 void setImplementation(java.lang.String Implementation)
          This string is "local" by default is can also be "grid" or other
 void setLocalGateway(java.lang.String localGateway)
           
 void setMaxMemory(int maxMemory)
          This is the max memeory (ram) in MB a job will use before it is killed.
 void setName(java.lang.String QueueName)
          Sets the name of the queue, used by LSF and other dispatchers
 void setOptimizeAsLocalQueue()
           
 void setQueueDiscriptors()
           
 void setRDLApplicationResolver(RDLApplicationResolver RDLApp)
           
 void setRejectIfTargetHostStartsWith(java.lang.String RejectIfTargetHostStartsWith)
           
 void setRemoteGateway(java.lang.String remoteGateway)
           
 void setSearchOrderPriority(int searchOrderPriority)
           
 void setSite(java.lang.String Site)
           
 void setTimeLimit(int TimeLimit)
          Sets the time limit(in minutes) a job can stay in the queue before it gets killed.
 void setType(java.lang.String Type)
           
 boolean willJobsFit(Request request)
          Returns true if some jobs this request may fit inside the queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

baseResponseTime

public double baseResponseTime

Ncpus

public int Ncpus

accumulatedResponseTime

public double accumulatedResponseTime
Constructor Detail

Queue

public Queue()
Creates a new instance of Queue

Method Detail

getAccessMethods

public java.util.List getAccessMethods()
Return the list of all access methods under which this is queue is listed in the config


setAccessMethods

public void setAccessMethods(java.util.List accessMethods)
Resets the accessMethods list for this queue. Note: This member should only be called by the framwork, when resubmitting jobs


addAccessMethod

public void addAccessMethod(AccessMethod accessMethod)
Used by the framwork to configure the queue


addQueueDiscriptors

public void addQueueDiscriptors(QueueDiscriptorBase queueDiscriptor)
Used to add a new QueueDiscriptor to relate the queue to a dispatcher. The parameters this member takes are the same as the constructor for the gov.bnl.star.offline.scheduler.Dispatcher.QueueDiscriptor class. For more information see: gov.bnl.star.offline.scheduler.Dispatcher.QueueDiscriptor


getQueueDiscriptors

public java.util.List getQueueDiscriptors()

setQueueDiscriptors

public void setQueueDiscriptors()

setRDLApplicationResolver

public void setRDLApplicationResolver(RDLApplicationResolver RDLApp)

getRDLApplicationResolver

public RDLApplicationResolver getRDLApplicationResolver()

getRejectIfTargetHostStartsWith

public java.lang.String getRejectIfTargetHostStartsWith()

setRejectIfTargetHostStartsWith

public void setRejectIfTargetHostStartsWith(java.lang.String RejectIfTargetHostStartsWith)

getImplementation

public java.lang.String getImplementation()
Is it a "local" queue, "grid" queue, or another type of queue


setImplementation

public void setImplementation(java.lang.String Implementation)
This string is "local" by default is can also be "grid" or other


setOptimizeAsLocalQueue

public void setOptimizeAsLocalQueue()

IsOptimizedAsLocalQueue

public boolean IsOptimizedAsLocalQueue()
Returns true is this is a local queue


getMessages

public java.lang.String getMessages()
Returns information about why jobs do / don't fit after calling the doesJobFit()


setSite

public void setSite(java.lang.String Site)

getSite

public java.lang.String getSite()

setCluster

public void setCluster(java.lang.String Cluster)
Sets a name used by the, Cluster Dispatcher Chooser to send the job to the right queue This value should be set in the config file

Parameters:
Cluster - associatedDispatcher The name in the CompositeDispatchers table

getCluster

public java.lang.String getCluster()
Returns the cluster name of the cluster the queue is on


setType

public void setType(java.lang.String Type)

getType

public java.lang.String getType()

setID

public void setID(java.lang.String QueueID)
Becuase not all queues have names an ID is used. Sets the ID of the queue, this value is only used for the report file Note: All queues in the config file should -aways- be given an ID.


getID

public java.lang.String getID()
Becuase not all queues have names an ID is used, in case data about the queue must be printed. Note: All queues in the config file should -aways- be given an ID.


setName

public void setName(java.lang.String QueueName)
Sets the name of the queue, used by LSF and other dispatchers


getName

public java.lang.String getName()
Returns the name of the Queue

Returns:
Name of the queue

setBatchSystem

public void setBatchSystem(BatchSystem batchSystem)
Recovers the dispatcher to be used by this queue from the config


setTimeLimit

public void setTimeLimit(int TimeLimit)
Sets the time limit(in minutes) a job can stay in the queue before it gets killed. This value should be set in the config file A lower number may be use then the max true queue make time limit for tweaking.

Parameters:
TimeLimit - Time in minutes

getTimeLimit

public int getTimeLimit()
The time limit(in minutes) a job can stay in the queue before it gets killed or before it needs to find an other queue.


setMaxMemory

public void setMaxMemory(int maxMemory)
This is the max memeory (ram) in MB a job will use before it is killed. If you know what your doing you can make the number smaller, to change the way it behaves. This value should be set in the config file


getMaxMemory

public int getMaxMemory()
The max memory a job may have in order for it to be assined to this queue.


setSearchOrderPriority

public void setSearchOrderPriority(int searchOrderPriority)

getSearchOrderPriority

public int getSearchOrderPriority()
The Search Order Priority number of the queue

Returns:
the Search Order Priority number of the queue

doesJobFit

public boolean doesJobFit(Job job,
                          Request request)
Test if this queue meets the hard unchangable limits (jobTimeLimit and memlimit) of the queue

Returns:
True if job fits

willJobsFit

public boolean willJobsFit(Request request)
Returns true if some jobs this request may fit inside the queue. Returns flase if jobs from this request could never be able to fit this queue.


getRemoteGateway

public java.lang.String getRemoteGateway()

setRemoteGateway

public void setRemoteGateway(java.lang.String remoteGateway)

getLocalGateway

public java.lang.String getLocalGateway()

setLocalGateway

public void setLocalGateway(java.lang.String localGateway)


Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.