public class SGE extends BatchSystem
build, COMMUNICATION_FILE, copyFileToMaster, launcher, listener, masterWorkingDirectory| Constructor and Description |
|---|
SGE(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
String COMMUNICATION_FILE,
String masterWorkingDirectory) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUpFiles(String jobId)
cleans up the files created by the batch system
|
void |
createFinishedJobOutputFile(String jobId,
int offset)
After the job is finished, create a job output file on the slave
beginning with the line after the offset through the end of the file.
|
void |
createFormattedRunningJobOutputFile(String outputFileName,
int offset,
int numberOfLines)
While the job is still running, create a file on the slave that begins
after the specified offset and ending with line numberOfLines
(created by createJobProgressFile method)
|
void |
createJobProgressFile(String jobId,
String outputFileName)
creates the job output file of the running job in the slave
|
String |
getJobStatus(String jobId)
Get the status of the job.
|
boolean |
isEndStatus(String jobStatus) |
boolean |
isRunningStatus(String jobStatus) |
boolean |
jobCompletedSuccessfully(String jobStatus) |
boolean |
jobExitedWithErrors(String jobStatus) |
void |
killJob(String jobId)
kills the job with specified job id in the batch system
|
void |
printErrorLog()
prints the error log to the slave console
|
void |
printExitCode(String jobId)
prints the exit code to the slave console
|
void |
processStatus(String jobStatus)
executes the appropriate actions depending on the status of the job
(prints the appropriate messages)
|
String |
submitJob(String jobFileName,
boolean sendEmail,
String queueType)
Submit the job to SGE using the qsub command and return the job number
as a string.
|
public String submitJob(String jobFileName, boolean sendEmail, String queueType) throws InterruptedException, IOException
submitJob in class BatchSystemjobFileName - name of the job filesendEmail - specifies if an email should be sentqueueType - the batch system's queue type (if it has one)InterruptedExceptionIOExceptionpublic String getJobStatus(String jobId) throws IOException, InterruptedException
BatchSystemgetJobStatus in class BatchSystemIOExceptionInterruptedExceptionpublic void killJob(String jobId) throws InterruptedException
BatchSystemkillJob in class BatchSystemjobId - the identifier of the jobInterruptedExceptionpublic void processStatus(String jobStatus)
BatchSystemprocessStatus in class BatchSystemjobStatus - the status of the jobpublic void printErrorLog()
throws InterruptedException
BatchSystemprintErrorLog in class BatchSystemInterruptedExceptionpublic void printExitCode(String jobId) throws InterruptedException, IOException
BatchSystemprintExitCode in class BatchSystemjobId - the identifier of the jobInterruptedExceptionIOExceptionpublic void createJobProgressFile(String jobId, String outputFileName) throws InterruptedException, IOException
BatchSystemcreateJobProgressFile in class BatchSystemjobId - the identifier of the joboutputFileName - name of the created output fileInterruptedExceptionIOExceptionpublic void createFormattedRunningJobOutputFile(String outputFileName, int offset, int numberOfLines) throws InterruptedException, IOException
createFormattedRunningJobOutputFile in class BatchSystemoutputFileName - the output file to be formattedoffset - number of lines that should be skipped at the beginningnumberOfLines - the last line in outputFileName to be outputInterruptedExceptionIOExceptionpublic void createFinishedJobOutputFile(String jobId, int offset) throws InterruptedException
createFinishedJobOutputFile in class BatchSystemjobId - the identifier of the joboffset - number of lines at the beginning of the file that should
be skippedInterruptedExceptionpublic void cleanUpFiles(String jobId) throws InterruptedException
BatchSystemcleanUpFiles in class BatchSystemInterruptedExceptionpublic boolean isRunningStatus(String jobStatus)
isRunningStatus in class BatchSystemjobStatus - the status of the jobpublic boolean isEndStatus(String jobStatus)
isEndStatus in class BatchSystemjobStatus - the status of the jobpublic boolean jobExitedWithErrors(String jobStatus)
jobExitedWithErrors in class BatchSystemjobStatus - the status of the jobpublic boolean jobCompletedSuccessfully(String jobStatus)
jobCompletedSuccessfully in class BatchSystemjobStatus - the status of the jobCopyright © 2016–2018 Wave Computing, Inc.. All rights reserved.