Generic task processor executing a task through a grid facility
Modifiers | Name | Description |
---|---|---|
protected static enum |
AbstractGridExecutor.QueueStatus |
Status as returned by the grid engine |
Modifiers | Name | Description |
---|---|---|
protected java.util.Map<java.lang.Object, QueueStatus> |
fQueueStatus |
Store jobs status |
protected nextflow.util.Duration |
queueInterval |
Type Params | Return Type | Name and description |
---|---|---|
|
boolean |
checkActiveStatus(java.lang.Object jobId, java.lang.Object queue) Verify that a job in a 'active' state i.e. |
|
protected BashWrapperBuilder |
createBashWrapperBuilder(TaskRun task) |
|
GridTaskHandler |
createTaskHandler(TaskRun task) |
|
TaskMonitor |
createTaskMonitor() Create a a queue holder for this executor @return |
|
java.util.List<java.lang.String> |
getDirectives(TaskRun task) @param task The current task object |
|
protected java.util.List<java.lang.String> |
getDirectives(TaskRun task, java.util.List<java.lang.String> initial) @param task The current task object |
|
protected java.lang.String |
getHeaderToken() @return String used to declare job directives in the job script wrapper |
|
java.lang.String |
getHeaders(TaskRun task) Defines the jobs directive headers |
|
protected java.lang.String |
getJobNameFor(TaskRun task) Given a task returns a *clean* name used to submit the job to the grid engine. |
|
protected java.util.List<java.lang.String> |
getKillCommand() The command to be used to kill a grid job |
|
java.util.Map<?, QueueStatus> |
getQueueStatus(java.lang.Object queue) @return The status for all the scheduled and running jobs |
|
java.util.List<java.lang.String> |
getSubmitCommandLine(TaskRun task, java.nio.file.Path scriptFile) Build up the platform native command line used to submit the job wrapper execution request to the underlying grid, e.g. |
|
void |
init() Initialize the executor class |
|
void |
killTask(java.lang.Object jobId) Kill a grid job |
|
protected java.util.List<java.lang.String> |
killTaskCommand(java.lang.Object jobId) The command to be used to kill a grid job |
|
java.lang.Object |
parseJobId(java.lang.String text) Given the string returned the by grid submit command, extract the process handle i.e. the grid jobId |
|
protected java.util.Map<?, QueueStatus> |
parseQueueStatus(java.lang.String text) Parse the command stdout produced by the command line #queueStatusCommand |
|
protected boolean |
pipeLauncherScript() Defines how script is run the by the grid-engine. |
|
protected java.util.List<java.lang.String> |
queueStatusCommand(java.lang.Object queue) @param queue The command for which the status of jobs has be to read |
|
protected java.lang.String |
quote(java.nio.file.Path path) |
|
protected java.lang.String |
wrapHeader(java.lang.String str) |
Methods inherited from class | Name |
---|---|
class Executor |
createTaskHandler, createTaskMonitor, init, register |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Store jobs status
Verify that a job in a 'active' state i.e. RUNNING or HOLD
jobId
- The job for which verify the statustrue
if the job is in RUNNING or HOLD status, or even if it is temporarily unable
to retrieve the job status for someCreate a a queue holder for this executor
task
- The current task object
task
- The current task objectinitial
- An initial list of directives
Defines the jobs directive headers
Given a task returns a *clean* name used to submit the job to the grid engine. That string must not contain blank or special shell characters e.g. parenthesis, etc
task
- A TaskRun
instanceThe command to be used to kill a grid job
Build up the platform native command line used to submit the job wrapper
execution request to the underlying grid, e.g. qsub -q something script.job
task
- The task instance descriptorInitialize the executor class
Kill a grid job
jobId
- The ID of the job to killThe command to be used to kill a grid job
jobId
- The job ID to be killGiven the string returned the by grid submit command, extract the process handle i.e. the grid jobId
Parse the command stdout produced by the command line #queueStatusCommand
Defines how script is run the by the grid-engine.
true
the launcher script is piped over the submit tool stdin stream,
if false
is specified as an argument on the command line
queue
- The command for which the status of jobs has be to read