orca.controllers.sge
Class SgeController

java.lang.Object
  extended by orca.controllers.sge.SgeController
All Implemented Interfaces:
IController, IInitialize, ILoadSource, ISerialize

public class SgeController
extends java.lang.Object
implements IController


Nested Class Summary
protected  class SgeController.SgeEventHandler
           
 
Field Summary
protected  long advanceTime
           
static long ClockSkew
           
protected  int completedJobs
           
protected  boolean controllerEnabled
           
protected  ImageDescriptor image
           
protected  LoggingTool logger
           
static java.lang.String MasterConfig
           
protected  boolean needAdvanceTime
           
protected  boolean needReservation
           
protected  int numReserveWorkers
           
protected  SgeBatch poller
           
static java.lang.String PropertyMaster
           
static java.lang.String PropertyMasterIP
           
static java.lang.String PropertyMasterName
           
static java.lang.String PropertyReservationType
           
static java.lang.String PropertyWorker
           
protected  int queuedJobs
           
protected  java.lang.String root
           
protected  ResourceType rtype
           
protected  int runningJobs
           
protected  java.lang.String sgeRoot
           
protected  Slice slice
           
protected  IServiceManager sm
           
static java.lang.String SubmitScriptName
           
static java.lang.String WorkerConfig
           
 
Constructor Summary
SgeController()
           
 
Method Summary
 int addWorker()
           
protected  void bid(long cycle)
          This bidding policy bids for one master reservation and multiple worker reservations.
 void disableController()
           
 void enableController()
           
 IActor getActor()
           
protected  long getAdvanceTime()
           
 int getClusterSize()
           
 int getCompletedJobs()
           
 LoggingTool getLogger()
          Returns the logger associated with the controller.
 Node getMasterNode()
           
 int getNumReserveWorkers()
           
 int getQueueLength()
           
 int getRunningJobs()
           
 Slice getSlice()
          Returns the slice the controller belongs to.
 java.util.Vector<Node> getWorkerNodes()
           
 void initialize()
          Initializes the object.
 boolean isActive()
           
 boolean isControllerEnabled()
           
 void reset(java.util.Properties p)
          De-serializes the object from the given properties list.
 java.util.Properties save()
          Serializes the object into a properties list.
 void save(java.util.Properties p)
          Serializes the object into the given properties list.
 void setActor(IActor sm)
          Attach the actor
 void setNumReserveWorkers(int numReserveWorkers)
           
 void setSlice(Slice slice)
          Sets the slice this controller will be associated with.
 int submitJob()
           
 void tick(long cycle)
          Informs the load source that another cycle has passed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ClockSkew

public static long ClockSkew

SubmitScriptName

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

WorkerConfig

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

MasterConfig

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

PropertyMasterIP

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

PropertyMasterName

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

PropertyReservationType

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

PropertyMaster

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

PropertyWorker

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

queuedJobs

protected int queuedJobs

runningJobs

protected int runningJobs

completedJobs

protected int completedJobs

numReserveWorkers

protected int numReserveWorkers

image

protected ImageDescriptor image

sm

protected IServiceManager sm

rtype

protected ResourceType rtype

logger

protected LoggingTool logger

needAdvanceTime

protected boolean needAdvanceTime

needReservation

protected boolean needReservation

advanceTime

protected long advanceTime

slice

protected Slice slice

root

protected java.lang.String root

sgeRoot

protected java.lang.String sgeRoot

controllerEnabled

protected boolean controllerEnabled

poller

protected SgeBatch poller
Constructor Detail

SgeController

public SgeController()
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Description copied from interface: IInitialize
Initializes the object.

Specified by:
initialize in interface IInitialize
Throws:
java.lang.Exception

getAdvanceTime

protected long getAdvanceTime()

tick

public void tick(long cycle)
Informs the load source that another cycle has passed. Initiates the formation of demand for the service manager.

Specified by:
tick in interface ILoadSource
Parameters:
cycle - this cycle

enableController

public void enableController()

disableController

public void disableController()

isControllerEnabled

public boolean isControllerEnabled()

bid

protected void bid(long cycle)
This bidding policy bids for one master reservation and multiple worker reservations. Must make sure if we are recovering we don't deploy a new master. On recovery must recover master and worker reservations.

Parameters:
cycle -

getMasterNode

public Node getMasterNode()

getWorkerNodes

public java.util.Vector<Node> getWorkerNodes()

save

public java.util.Properties save()
                          throws java.lang.Exception
Description copied from interface: ISerialize
Serializes the object into a properties list.

Specified by:
save in interface ISerialize
Returns:
properties list representing this object
Throws:
java.lang.Exception

save

public void save(java.util.Properties p)
          throws java.lang.Exception
Description copied from interface: ISerialize
Serializes the object into the given properties list.

Specified by:
save in interface ISerialize
Parameters:
p - properties list to serialize the object into
Throws:
java.lang.Exception

reset

public void reset(java.util.Properties p)
           throws java.lang.Exception
Description copied from interface: ISerialize
De-serializes the object from the given properties list.

Specified by:
reset in interface ISerialize
Parameters:
p - properties list containing the serialized version of the object
Throws:
java.lang.Exception

getQueueLength

public int getQueueLength()

getRunningJobs

public int getRunningJobs()

getCompletedJobs

public int getCompletedJobs()

getClusterSize

public int getClusterSize()

addWorker

public int addWorker()

setActor

public void setActor(IActor sm)
Description copied from interface: ILoadSource
Attach the actor

Specified by:
setActor in interface ILoadSource
Parameters:
sm - the service manager

setSlice

public void setSlice(Slice slice)
Description copied from interface: IController
Sets the slice this controller will be associated with.

Specified by:
setSlice in interface IController

getSlice

public Slice getSlice()
Description copied from interface: IController
Returns the slice the controller belongs to.

Specified by:
getSlice in interface IController
Returns:
slice the controller belongs to

submitJob

public int submitJob()

getLogger

public LoggingTool getLogger()
Description copied from interface: ILoadSource
Returns the logger associated with the controller.

Specified by:
getLogger in interface ILoadSource
Returns:
logger associated with the controller

getActor

public IActor getActor()

isActive

public boolean isActive()

getNumReserveWorkers

public int getNumReserveWorkers()

setNumReserveWorkers

public void setNumReserveWorkers(int numReserveWorkers)


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.