public class LSF extends BatchSystem
build, COMMUNICATION_FILE, copyFileToMaster, launcher, listener, masterWorkingDirectory
Constructor and Description |
---|
LSF(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)
creates the final job output file of the finished job in the slave
|
void |
createFormattedRunningJobOutputFile(String outputFileName,
int offset,
int numberOfLines)
creates a formatted job output file of the running job in the slave from
the specified output file (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) |
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)
submits the the job to the batch system's selected queue and configures
if an email should be sent after the job is done
|
public String submitJob(String jobFileName, boolean sendEmail, String queueType) throws InterruptedException, IOException
BatchSystem
submitJob
in class BatchSystem
jobFileName
- name of the job filesendEmail
- specifies if an email should be sentqueueType
- the batch system's queue type (if it has one)InterruptedException
IOException
public String getJobStatus(String jobId) throws IOException, InterruptedException
getJobStatus
in class BatchSystem
IOException
InterruptedException
public void killJob(String jobId) throws InterruptedException
BatchSystem
killJob
in class BatchSystem
jobId
- the identifier of the jobInterruptedException
public void processStatus(String jobStatus)
BatchSystem
processStatus
in class BatchSystem
jobStatus
- the status of the jobpublic void printErrorLog() throws InterruptedException
BatchSystem
printErrorLog
in class BatchSystem
InterruptedException
public void printExitCode(String jobId) throws InterruptedException, IOException
BatchSystem
printExitCode
in class BatchSystem
jobId
- the identifier of the jobInterruptedException
IOException
public void createJobProgressFile(String jobId, String outputFileName) throws InterruptedException, IOException
BatchSystem
createJobProgressFile
in class BatchSystem
jobId
- the identifier of the joboutputFileName
- name of the created output fileInterruptedException
IOException
public void createFormattedRunningJobOutputFile(String outputFileName, int offset, int numberOfLines) throws InterruptedException, IOException
BatchSystem
createFormattedRunningJobOutputFile
in class BatchSystem
outputFileName
- the output file that should be formattedoffset
- number of lines that should be skipped from the given
output filenumberOfLines
- the total amount of lines of the given output fileInterruptedException
IOException
public void createFinishedJobOutputFile(String jobId, int offset) throws InterruptedException
BatchSystem
createFinishedJobOutputFile
in class BatchSystem
jobId
- the identifier of the joboffset
- number of lines that should be skipped from the final
outputInterruptedException
public void cleanUpFiles(String jobId) throws InterruptedException
BatchSystem
cleanUpFiles
in class BatchSystem
InterruptedException
public boolean isRunningStatus(String jobStatus)
isRunningStatus
in class BatchSystem
jobStatus
- the status of the jobpublic boolean isEndStatus(String jobStatus)
isEndStatus
in class BatchSystem
jobStatus
- the status of the jobpublic boolean jobExitedWithErrors(String jobStatus)
jobExitedWithErrors
in class BatchSystem
jobStatus
- the status of the jobpublic boolean jobCompletedSuccessfully(String jobStatus)
jobCompletedSuccessfully
in class BatchSystem
jobStatus
- the status of the jobCopyright © 2004-2015. All Rights Reserved.