public class RunQ extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BENCHNAME
Benchmark name field index in the run queue listing.
|
static int |
DESCRIPTION
Description field index in the run queue listing.
|
static int |
RUNSEQ
Run seqeunce field index in the run queue listing.
|
Modifier and Type | Method and Description |
---|---|
String |
addRun(String user,
String profile,
BenchmarkDescription desc)
Adds a Run to the runq.
|
boolean |
deleteRun(String runId)
Deletes the run with the specified runId from the runq.
|
void |
exit()
Method to stop the run daemon before unloading
Faban Engine servlet.
|
Run |
fetchNextRun(String runId)
Moves the run from the queue into the output directory.
|
String |
getCurrentBenchmark()
Obtains the short name of the current benchmark run.
|
String |
getCurrentRunId()
Obtains the run id of the current run.
|
static RunQ |
getHandle()
Singleton initializer for runQ and runDaemon.
|
String |
getRunDaemonStatus()
Reports the status of the RunDaemonThread.
|
String |
killCurrentRun(String runId,
String user)
Method to stop the current benchamark run.
|
static String[] |
listPending()
Obtains the list of pending runs in the run queue.
|
String[][] |
listRunQ()
Returns a list of the runs currently in the runq.
|
NameValuePair<Long> |
nextRunAge(long minAge)
Obtains the name and age of the next run, in milliseconds
since submitted, if the age is more than minAge.
|
boolean |
startRunDaemon()
Starts/restarts the run daemon.
|
boolean |
stopRunDaemon()
Stops/suspends the run daemon.
|
public static final int RUNSEQ
public static final int BENCHNAME
public static final int DESCRIPTION
public static RunQ getHandle()
public String addRun(String user, String profile, BenchmarkDescription desc) throws IOException
user
- The user name or id if logged in, or nullprofile
- Profile name for this rundesc
- The description of the benchmark to runIOException
- There was a problem accessing the run queue directorypublic boolean deleteRun(String runId)
runId
- the runId of the run to be deletedpublic String[][] listRunQ()
public static String[] listPending()
public String getRunDaemonStatus()
public boolean startRunDaemon()
public boolean stopRunDaemon()
public String getCurrentRunId()
public String getCurrentBenchmark()
public String killCurrentRun(String runId, String user)
runId
- The run id to kill - this is for safetyuser
- The current user name, or null if security is disabledpublic Run fetchNextRun(String runId) throws RunEntryException, IOException, ClassNotFoundException
runId
- The id of the run in question.RunEntryException
- There is an error in the run queue entryIOException
ClassNotFoundException
public NameValuePair<Long> nextRunAge(long minAge)
minAge
- The minimum run age to return.public void exit()