|
||||||||||
| 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 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 Process |
proc
SEG Process handle |
private static Runtime |
runtime
Reference to the runtime used to start the SEG process |
private String |
schedulerName
Path to the SEG executable |
private static 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 Date |
timeStamp
Timestamp of last event we've received from a SEG. |
private 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(File globusLocation,
String userName,
String schedulerName,
JobStateMonitor monitor)
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(Date timeStamp)
|
private boolean |
startSegProcess(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 Runtime runtime
private File globusLocation
private String userName
private String schedulerName
private Process proc
private boolean shutdownCalled
private Date timeStamp
private JobStateMonitor monitor
private long lastRestart
private final long THROTTLE_RESTART_TIME
private final long THROTTLE_RESTART_THRESHOLD
private static final String SEG_EXECUTABLE_NAME
| Constructor Detail |
public SchedulerEventGenerator(File globusLocation,
String userName,
String schedulerName,
JobStateMonitor monitor)
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(Date timeStamp)
throws IOException
IOExceptionprivate void throttleRestart()
private void cleanProcess()
public void shutdown()
throws IOException
IOExceptionpublic void start(Date timeStamp)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||