|
g-Eclipse Release 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.geclipse.batch.AbstractBatchService
eu.geclipse.batch.pbs.PBSBatchService
public final class PBSBatchService
Class for executing PBS commands on a Computing Element.
| Constructor Summary | |
|---|---|
PBSBatchService(IBatchServiceDescription description,
java.lang.String name)
Create a new PBSWrapper. |
|
| Method Summary | |
|---|---|
boolean |
connectToServer(ISSHConnectionInfo sshConnectionInfo)
Establishes a ssh-connection to the server running the PBS 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 maxRunningJobs,
double timeCPU,
double timeWall,
int maxJobsInQueue,
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)
Executes qdel on the PBS server and returns if the command was executed of not. |
void |
delQueue(java.lang.String queueId)
Deletes the specified queue. |
void |
disableQueue(java.lang.String queueId)
Executes qdisable to disable a specific queue. |
void |
disableQueues(java.lang.String[] queueIds)
Executes qdisable to disable all specified queues. |
void |
disableWN(java.lang.String nodeId)
Changes the state of a workernode to offline, no jobs will be placed on this workernode. |
void |
enableQueue(java.lang.String queueId)
Executes qenable to enable a specific queue. |
void |
enableQueues(java.lang.String[] queueIds)
Executes qenable to enable all specified queues. |
void |
enableWN(java.lang.String nodeId)
Changes the state of a workernode to free, jobs will be placed on this workernode. |
void |
getJobs(IBatchJobManager manager)
Executes qstat on the PBS server and returns a list of the jobs as BatchJobInfo. |
java.util.List<IQueueInfo> |
getQueues()
Executes qstat -q on the PBS server and returns a list of the queues as QueueInfo. |
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)
Executes qmove on the PBS server and returns if the command was executed of not. |
void |
moveJobs(java.lang.String[] jobIds,
java.lang.String destQueue,
java.lang.String destServer)
Executes qmove on the PBS server and returns if the command was executed of not. |
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. |
| Methods inherited from class eu.geclipse.batch.AbstractBatchService |
|---|
disconnectFromServer, getDescription, getName |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PBSBatchService(IBatchServiceDescription description,
java.lang.String name)
description - The IBatchServiceDescription from which
this service should be created.name - batch service name, i.e. the configuration file that were
used to instantiate this service| Method Detail |
|---|
public boolean connectToServer(ISSHConnectionInfo sshConnectionInfo)
throws ProblemException
connectToServer in interface IBatchServiceconnectToServer in class AbstractBatchServicesshConnectionInfo - Holding the information needed to establish a ssh
connection with the PBS server.
true if the connection is established,
false otherwise.
ProblemException - If the ssh connection cannot be established
public void getJobs(IBatchJobManager manager)
throws ProblemException
BatchJobInfo. If no jobs are running or error parsing the output then
this method will return null. The output of qstat are as
follows:
Job id Name User Time Use S Queue
------------------- ---------------- --------------- -------- - -----
968.ce201 blahjob_KJ8465 see001 0 R see
969.ce201 blahjob_RT8482 see001 0 R see
manager - The manager where the jobs will be merged into.
ProblemException - If command is not executed successfully
public void delJob(java.lang.String jobId)
throws ProblemException
jobId - The identifier of the job to be deleted.
ProblemException - If command is not executed successfully
public 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
public 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
public void holdJob(java.lang.String jobId)
throws ProblemException
jobId - The identifier of the job to be held.
ProblemException - If command is not executed successfully
public void holdJobs(java.lang.String[] jobIds)
throws ProblemException
jobIds - The identifiers of the jobs to be held.
ProblemException - If command is not executed successfully
public void releaseJob(java.lang.String jobId)
throws ProblemException
jobId - The identifier of the job to be released.
ProblemException - If command is not executed successfully
public void releaseJobs(java.lang.String[] jobIds)
throws ProblemException
jobIds - The identifiers of the jobs to be released.
ProblemException - If command is not executed successfully
public void reRunJob(java.lang.String jobId)
throws ProblemException
jobId - The identifier of the job to be rerun.
ProblemException - If command is not executed successfully
public void reRunJobs(java.lang.String[] jobIds)
throws ProblemException
jobIds - The identifiers of the jobs to be rerun.
ProblemException - If command is not executed successfully
public 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:
wn201.grid.ucy.ac.cy
state = free
np = 1
properties = lcgpro
ntype = cluster
status = opsys=linux,uname=Linux wn201.grid.ucy.ac.cy 2.4.21-47.0.1.EL #1 Thu Oct 19 11:02:51 CDT 2006 i686,
sessions=? 0,nsessions=? 0,nusers=0,idletime=1268300,totmem=1821164kb,availmem=1716700kb,
physmem=768916kb,ncpus=1,loadave=0.00,netload=637790691,state=free,jobs=? 0,rectime=1180422371
List of WorkerNodeInfo or null.
ProblemException - If command is not executed successfully
public void disableWN(java.lang.String nodeId)
throws ProblemException
nodeId - The identifier of the node to be disabled.
ProblemException - If command is not executed successfully
public void enableWN(java.lang.String nodeId)
throws ProblemException
nodeId - The identifier of the node to be enabled.
ProblemException - If command is not executed successfully
public java.util.List<IQueueInfo> getQueues()
throws ProblemException
QueueInfo. If no queues or error parsing the output then
this method will return null. The output of qstat -q are as
follows:
server: ce201.grid.ucy.ac.cy
Queue Memory CPU Time Walltime Node Run Que Lm State
---------------- ------ -------- -------- ---- --- --- -- -----
dteam -- 48:00:00 72:00:00 -- 0 0 -- E R
see -- 48:00:00 72:00:00 -- 0 0 -- E R
geclipse -- 48:00:00 72:00:00 -- 0 0 -- E R
ops -- 48:00:00 72:00:00 -- 0 0 -- E R
----- -----
0 0
List of QueueInfo or null.
ProblemException - If command is not executed successfully
public void disableQueue(java.lang.String queueId)
throws ProblemException
queueId - The identifier of the queue to be disable.
ProblemException - If command is not executed successfully
public void disableQueues(java.lang.String[] queueIds)
throws ProblemException
queueIds - The identifiers of the queues to be disable.
ProblemException - If command is not executed successfully
public void enableQueue(java.lang.String queueId)
throws ProblemException
queueId - The identifier of the queue to be enabled.
ProblemException - If command is not executed successfully
public void enableQueues(java.lang.String[] queueIds)
throws ProblemException
queueIds - The identifiers of the queues to be enabled.
ProblemException - If command is not executed successfully
public void startQueue(java.lang.String queueId)
throws ProblemException
queueId - The identifier of the queue to be started.
ProblemException - If command is not executed successfully
public void startQueues(java.lang.String[] queueIds)
throws ProblemException
queueIds - The identifiers of the queues to be started.
ProblemException - If command is not executed successfully
public void stopQueue(java.lang.String queueId)
throws ProblemException
queueId - The identifier of the queue to be stopped.
ProblemException - If command is not executed successfully
public void stopQueues(java.lang.String[] queueIds)
throws ProblemException
queueIds - The identifiers of the queues to be stopped.
ProblemException - If command is not executed successfully
public 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
public void createQueue(java.lang.String queueName,
int priority,
IQueueInfo.QueueType type,
boolean enabled,
boolean started,
int maxRunningJobs,
double timeCPU,
double timeWall,
int maxJobsInQueue,
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.maxRunningJobs - 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.maxJobsInQueue - 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
public 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
public void delQueue(java.lang.String queueId)
throws ProblemException
queueId - The identifier of the queue to be deleted.
ProblemException - If command is not executed successfully
public void createQueue(DocumentRoot documentRoot)
throws ProblemException
IBatchService
documentRoot - The root element of a QDL document.
ProblemException
|
g-Eclipse Release 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||