public class Job extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Job.JobFile |
class |
Job.JobFiles |
Modifier and Type | Field and Description |
---|---|
Job.JobFiles |
jobfiles |
JobStatusInfo |
status |
Modifier | Constructor and Description |
---|---|
protected |
Job(java.lang.String jobID)
Constructor is called from JobFactory. jobID is a unique id for the jobs.
|
Modifier and Type | Method and Description |
---|---|
boolean |
deleteFromQueue()
Remove job from the queue (either running or waiting)
|
protected java.lang.String |
getBinFile() |
Job[] |
getDependentJobs()
Get a set of jobs that must successfully complete before this job
can start.
|
java.lang.String |
getJobID()
Get the key of the Job object in the hash table.
|
protected java.util.Vector |
getLocalFiles()
Return vector of local files that should be staged to the remote site for
a job.
|
java.lang.String |
getLocalWorkdirPath() |
int |
getNumTasks() |
protected java.util.Vector |
getRemoteFiles()
Return vector of remote files that should be copied into to remote job
directory before submission.
|
java.lang.String |
getSubmitFile() |
java.lang.String |
getWorkdirPath() |
protected boolean |
isBinFileLocal() |
protected boolean |
isSubmitFileLocal() |
boolean |
reconnect(JobManager jobmanager)
Reconnect to a executing job.
|
void |
setBinFile(java.lang.String binFile,
boolean isLocal)
Set file to be staged to bin path.
|
void |
setDependentJobs(Job[] dependentJobs)
Specify a set of jobs that must successfully complete before this
can start.
|
boolean |
setExecutable(java.lang.String executablePath,
boolean isLocal,
java.lang.String arguments)
Set the executable for the job.
|
boolean |
setInputFile(java.lang.String path,
boolean isLocal)
Set an input file for job.
|
boolean |
setLocalWorkdir(java.lang.String path)
Set and create the local working directory.
|
void |
setNumTasks(int nt) |
boolean |
setOtherInputFile(java.lang.String path)
Set an "other" input file for job.
|
void |
setOutputFile(java.lang.String path)
Set an output file for job.
|
void |
setSubmitFile(java.lang.String submitFile,
boolean isItLocal)
Give a predefined submit file for the job.
|
boolean |
setWorkdir(java.lang.String path)
Set the (remote) working directory.
|
boolean |
setWorkdir(java.lang.String path,
boolean createUniqueSubdir)
Set the (remote) working directory.
|
boolean |
status()
Check the status of the job
|
java.lang.String |
submit(JobManager jobmanager,
boolean overwrite,
java.lang.String options)
Submit a job, called from Job.submit(); boolean overwrite
indicates whether old files that exist on the same directory should be
removed before staging new files.
|
public JobStatusInfo status
public Job.JobFiles jobfiles
protected Job(java.lang.String jobID)
public java.lang.String getJobID()
public void setNumTasks(int nt)
public int getNumTasks()
public boolean setExecutable(java.lang.String executablePath, boolean isLocal, java.lang.String arguments) throws JobException
JobException
public boolean setInputFile(java.lang.String path, boolean isLocal) throws JobException
JobException
public void setBinFile(java.lang.String binFile, boolean isLocal) throws JobException
JobException
public boolean setOtherInputFile(java.lang.String path) throws JobException
JobException
public void setOutputFile(java.lang.String path) throws JobException
JobException
public boolean setLocalWorkdir(java.lang.String path) throws JobException
JobException
public boolean setWorkdir(java.lang.String path)
public boolean setWorkdir(java.lang.String path, boolean createUniqueSubdir)
public java.lang.String getLocalWorkdirPath()
public java.lang.String getWorkdirPath()
public void setSubmitFile(java.lang.String submitFile, boolean isItLocal) throws JobException
JobException
public java.lang.String submit(JobManager jobmanager, boolean overwrite, java.lang.String options) throws JobException
JobException
public boolean reconnect(JobManager jobmanager) throws JobException
JobException
public boolean status() throws JobException
JobException
public boolean deleteFromQueue() throws JobException
JobException
public void setDependentJobs(Job[] dependentJobs)
public Job[] getDependentJobs()
public java.lang.String getSubmitFile()
protected boolean isSubmitFileLocal()
protected java.lang.String getBinFile()
protected boolean isBinFileLocal()
protected java.util.Vector getLocalFiles()
protected java.util.Vector getRemoteFiles()