|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.globus.exec.monitoring.SchedulerEventGenerator
Scheduler Event Generator monitor thread. The Seg object creates a Scheduler Event Generator process to monitor job state changes associated with a particular scheduler. The Seg object will repeatedly start the SEG process if it terminates prematurely, until its shutdown() method is called.
| Field Summary | |
private java.io.File |
globusLocation
Path to the SEG executable |
private long |
lastRestart
Used to keep track of the last restart time for the SEG process---if it was too recent (less than our THROTTLE_RESTART_THRESHOLD) wait THROTTLE_RESTART_TIME before trying again. |
private static org.apache.commons.logging.Log |
logger
|
private JobStateMonitor |
monitor
Monitor which created this SchedulerEventGenerator. |
private java.lang.Process |
proc
SEG Process handle |
private static java.lang.Runtime |
runtime
Reference to the runtime used to start the SEG process |
private java.lang.String |
schedulerName
Path to the SEG executable |
private static java.lang.String |
SEG_EXECUTABLE_NAME
|
private boolean |
shutdownCalled
Flag indicating that the SEG process should no longer be restarted and the thread should terminate. |
private long |
THROTTLE_RESTART_THRESHOLD
When SEG terminates within this amount of time of being started, assume something might be wrong and delay again. |
private long |
THROTTLE_RESTART_TIME
When throttling process restarts, wait this many milliseconds before next restart attempt. |
private java.util.Date |
timeStamp
Timestamp of last event we've received from a SEG. |
private java.lang.String |
userName
Username of the account to run the SEG as. |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
SchedulerEventGenerator(java.io.File globusLocation,
java.lang.String userName,
java.lang.String schedulerName,
JobStateMonitor monitor,
boolean segDaemon)
SEG constructor. |
|
| Method Summary | |
private void |
cleanProcess()
|
void |
run()
Start and monitor a SEG process. |
void |
shutdown()
Tell a SEG process to terminate. |
void |
start(java.util.Date timeStamp)
|
private boolean |
startSegProcess(java.util.Date timeStamp)
Start a scheduler event generator process. |
private void |
throttleRestart()
Delay THROTTLE_RESTART_TIME before returning unless either The SEG process wasn't restarted within THROTTLE_RESTART_THRESHOLD The shutdown method has been called |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static org.apache.commons.logging.Log logger
private static java.lang.Runtime runtime
private java.io.File globusLocation
private java.lang.String userName
private java.lang.String schedulerName
private java.lang.Process proc
private boolean shutdownCalled
private java.util.Date timeStamp
private JobStateMonitor monitor
private long lastRestart
private final long THROTTLE_RESTART_TIME
private final long THROTTLE_RESTART_THRESHOLD
private static final java.lang.String SEG_EXECUTABLE_NAME
| Constructor Detail |
public SchedulerEventGenerator(java.io.File globusLocation,
java.lang.String userName,
java.lang.String schedulerName,
JobStateMonitor monitor,
boolean segDaemon)
globusLocation - Path to the Globus Toolkit installation.userName - Username to sudo(8) to start the SEG.schedulerName - Name of the scheduler SEG module to use (fork, lsf, etc).| Method Detail |
public void run()
private boolean startSegProcess(java.util.Date timeStamp)
throws java.io.IOException
java.io.IOExceptionprivate void throttleRestart()
private void cleanProcess()
public void shutdown()
throws java.io.IOException
java.io.IOExceptionpublic void start(java.util.Date timeStamp)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||