|
g-Eclipse Release 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IBatchService
Wrapper for executing commands on a batch service. IMPORTANT: Make all the public methods of an implementation of this interface synchronized.
| Method Summary | |
|---|---|
boolean |
connectToServer(ISSHConnectionInfo sshConnectionInfo)
Establishes a ssh-connection to the server running the batch service. |
void |
createQueue(DocumentRoot documentRoot)
Executes command that will create a new queue with the root element of a Queue Description Language (QDL) document and argument. |
void |
createQueue(java.lang.String queueName,
int priority,
IQueueInfo.QueueType type,
boolean enabled,
boolean started,
int runMax,
double timeCPU,
double timeWall,
int queMax,
int assignedResources,
java.util.List<java.lang.String> vos)
Executes command that will create a new queue with a "default" number of argument. |
void |
createQueue(java.lang.String queueName,
IQueueInfo.QueueType type,
boolean enabled,
double timeCPU,
double timeWall,
java.util.List<java.lang.String> vos)
Executes command that will create a new queue with minimum arguments. |
void |
delJob(java.lang.String jobId)
Deletes a job in the queues of the batch service. |
void |
delQueue(java.lang.String queueId)
Deletes the specified queue. |
void |
disableQueue(java.lang.String queueId)
Sets the specified queue to be disabled, i.e. closes it for new jobs. |
void |
disableQueues(java.lang.String[] queueIds)
Sets the specified queues to be disabled, i.e. closes them for new jobs. |
void |
disableWN(java.lang.String nodeId)
Changes the state of a workernode to offline, no jobs will be placed on this workernode. |
void |
disconnectFromServer()
Tears down an already established ssh-connection to the server. |
void |
enableQueue(java.lang.String queueId)
Enable the specified queue, i.e. new jobs can be inserted into the queue. |
void |
enableQueues(java.lang.String[] queueIds)
Enables the specified queues, i.e. new jobs can be inserted into the queues. |
void |
enableWN(java.lang.String nodeId)
Changes the state of a workernode to enable, jobs will be placed on this workernode. |
IBatchServiceDescription |
getDescription()
Get the batch service description that was used to create this service. |
void |
getJobs(IBatchJobManager manager)
Returns a List of the jobs as IBatchJobInfo. |
java.lang.String |
getName()
Get the batch service name, i.e. the configuration file that were used to instantiate this service. |
java.util.List<IQueueInfo> |
getQueues()
Returns a list of the queues as IQueueInfo. |
java.util.List<IWorkerNodeInfo> |
getWorkerNodes()
Executes pbsnodes on the PBS server and returns a list of the workernodes as WorkerNodeInfo. |
void |
holdJob(java.lang.String jobId)
Puts a hold on a job in the queue of the batch service. |
void |
holdJobs(java.lang.String[] jobIds)
Puts a hold on one or more jobs in the queue of the batch service. |
void |
moveJob(java.lang.String jobId,
java.lang.String destQueue,
java.lang.String destServer)
Moves a job in the batch system to another batch system and/or queue. |
void |
moveJobs(java.lang.String[] jobIds,
java.lang.String destQueue,
java.lang.String destServer)
Move jobs in the batch system to another batch system and/or queue. |
void |
releaseJob(java.lang.String jobId)
Release a job with a previous hold in queue of the batch system. |
void |
releaseJobs(java.lang.String[] jobIds)
Release one or more jobs with a previous hold in queue of the batch system. |
void |
reRunJob(java.lang.String jobId)
Rerun a currently running job. |
void |
reRunJobs(java.lang.String[] jobIds)
Rerun one or more currently running jobs. |
void |
setMaxWallTime(java.lang.String queueName,
java.lang.String timeWall)
Executes command that will change the maximum allowed wall time of a specific queue. |
void |
startQueue(java.lang.String queueId)
Executes qstart to start a specific queue. |
void |
startQueues(java.lang.String[] queueIds)
Executes qstart to start all specified queues. |
void |
stopQueue(java.lang.String queueId)
Executes qstop to stop a specific queue. |
void |
stopQueues(java.lang.String[] queueIds)
Executes qstop to stop all specified queues. |
| Method Detail |
|---|
IBatchServiceDescription getDescription()
java.lang.String getName()
boolean connectToServer(ISSHConnectionInfo sshConnectionInfo)
throws ProblemException
sshConnectionInfo - Holding the information needed to establish a ssh
connection with the PBS server.
true if the connection is established,
false otherwise.
ProblemException - In case of connection problem to servicevoid disconnectFromServer()
void getJobs(IBatchJobManager manager)
throws ProblemException
IBatchJobInfo. If no jobs are running or
error then this method will return null.
manager - The manager where the jobs will be merged into.
ProblemException - If command is not executed successfully
void delJob(java.lang.String jobId)
throws ProblemException
jobId - The identifier of the job to be deleted.
ProblemException - If command is not executed successfully
void moveJob(java.lang.String jobId,
java.lang.String destQueue,
java.lang.String destServer)
throws ProblemException
jobId - The identifier of the job to be moved.destQueue - The destination queue, null if no destination queue.destServer - The destination server, null if no destination server.
ProblemException - If command is not executed successfully
void moveJobs(java.lang.String[] jobIds,
java.lang.String destQueue,
java.lang.String destServer)
throws ProblemException
jobIds - The identifier of the jobs to be moved.destQueue - The destination queue, null if no destination queue.destServer - The destination server, null if no destination server.
ProblemException - If command is not executed successfully
void holdJob(java.lang.String jobId)
throws ProblemException
jobId - The identifier of the job to be held.
ProblemException - If command is not executed successfully
void holdJobs(java.lang.String[] jobIds)
throws ProblemException
jobIds - The identifiers of the jobs to be held.
ProblemException - If command is not executed successfully
void releaseJob(java.lang.String jobId)
throws ProblemException
jobId - The identifier of the job to be released.
ProblemException - If command is not executed successfully
void releaseJobs(java.lang.String[] jobIds)
throws ProblemException
jobIds - The identifiers of the jobs to be released.
ProblemException - If command is not executed successfully
void reRunJob(java.lang.String jobId)
throws ProblemException
jobId - The identifier of the job to be rerun.
ProblemException - If command is not executed successfully
void reRunJobs(java.lang.String[] jobIds)
throws ProblemException
jobIds - The identifiers of the jobs to be rerun.
ProblemException - If command is not executed successfully
java.util.List<IWorkerNodeInfo> getWorkerNodes()
throws ProblemException
WorkerNodeInfo. If no workernodes or error parsing the output then
this method will return null. The output of pbsnodes are as
follows:
List of IWorkerNodeInfo or null.
ProblemException - If command is not executed successfully
void disableWN(java.lang.String nodeId)
throws ProblemException
nodeId - The identifier of the node to be disabled.
ProblemException - If command is not executed successfully
void enableWN(java.lang.String nodeId)
throws ProblemException
nodeId - The identifier of the node to be disabled.
ProblemException - If command is not executed successfully
java.util.List<IQueueInfo> getQueues()
throws ProblemException
IQueueInfo. If no queues or error
then this method will return null.
List of IQueueInfo or null.
ProblemException - If command is not executed successfully
void disableQueue(java.lang.String queueId)
throws ProblemException
queueId - The identifier of the queue to be disabled.
ProblemException - If command is not executed successfully
void disableQueues(java.lang.String[] queueIds)
throws ProblemException
queueIds - The identifiers of the queues to be drained.
ProblemException - If command is not executed successfully
void enableQueue(java.lang.String queueId)
throws ProblemException
queueId - The identifier of the queue to be enabled.
ProblemException - If command is not executed successfully
void enableQueues(java.lang.String[] queueIds)
throws ProblemException
queueIds - The identifiers of the queues to be enabled.
ProblemException - If command is not executed successfully
void startQueue(java.lang.String queueId)
throws ProblemException
queueId - The identifier of the queue to be started.
ProblemException - If command is not executed successfully
void startQueues(java.lang.String[] queueIds)
throws ProblemException
queueIds - The identifiers of the queues to be started.
ProblemException - If command is not executed successfully
void stopQueue(java.lang.String queueId)
throws ProblemException
queueId - The identifier of the queue to be stopped.
ProblemException - If command is not executed successfully
void stopQueues(java.lang.String[] queueIds)
throws ProblemException
queueIds - The identifiers of the queues to be stopped.
ProblemException - If command is not executed successfully
void createQueue(java.lang.String queueName,
IQueueInfo.QueueType type,
boolean enabled,
double timeCPU,
double timeWall,
java.util.List<java.lang.String> vos)
throws ProblemException
queueName - The name of the new queue.type - The type of the new queue.enabled - The state of the new queue.timeCPU - Maximum allowed CPU time for any job.timeWall - Maximum allowed wall time for any job.vos - Only allow access to the specified vos, null no restriction is applied.
ProblemException - If command is not executed successfully
void createQueue(java.lang.String queueName,
int priority,
IQueueInfo.QueueType type,
boolean enabled,
boolean started,
int runMax,
double timeCPU,
double timeWall,
int queMax,
int assignedResources,
java.util.List<java.lang.String> vos)
throws ProblemException
queueName - The name of the new queue.priority - The priority of the new queue.type - The type of the new queue.enabled - The state of the new queue.started - If the new queue will be started when created.runMax - Maximum running jobs at any given time from the queue.timeCPU - Maximum allowed CPU time for any job.timeWall - Maximum allowed wall time for any job.queMax - Maximum allowed jobs in the queueassignedResources - vos - Only allow access to the specified vos, null no restriction is applied.
ProblemException - If command is not executed successfully
void createQueue(DocumentRoot documentRoot)
throws ProblemException
documentRoot - The root element of a QDL document.
ProblemException
void delQueue(java.lang.String queueId)
throws ProblemException
queueId - The identifier of the queue to be deleted.
ProblemException - If command is not executed successfully
void setMaxWallTime(java.lang.String queueName,
java.lang.String timeWall)
throws ProblemException
queueName - The name of the queue to be modified.timeWall - The new maximum allowed wall time for any job.
ProblemException - If command is not executed successfully
|
g-Eclipse Release 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||