gov.bnl.star.offline.scheduler.Dispatchers.xgrid
Class XgridDispatcher

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.Dispatchers.xgrid.XgridDispatcher
All Implemented Interfaces:
Dispatcher

public class XgridDispatcher
extends java.lang.Object
implements Dispatcher

Dispatches a jobs using XGRID for Mac O.S. X

Author:
mlmiller

Field Summary
protected  BashApplication application
           
protected  boolean simulation
           
 
Constructor Summary
XgridDispatcher()
          Creates a new instance of XgridDispatcher
 
Method Summary
protected  void dispatch(Request request, Job job)
           
 void dispatch(Request request, java.util.List jobs)
          Dispatches the processes described in the job request.
 BashApplication getBashApplication()
           
 java.lang.String getInputDirName(Job job)
           
 int getMaxElapseTime()
           
 java.lang.String getOutputDirName(Job job)
           
 java.lang.String getXgridCommand(Request request, Job job)
          Returns the full xgrid command to be executed to dispatch the process.
 java.lang.String getXgridEx()
           
 void Kill(Request request, java.util.List jobs)
          Kills the processes associated with this job.
 void retrieveOutput(Request job, java.util.List jobs)
          Retrieves the output of the job from the target machine.
 void setBashApplication(BashApplication application)
           
 void setMaxElapseTime(int maxElapseTime)
           
 void setXgridEx(java.lang.String v)
           
 java.lang.String Status(Job job, int Processe)
          Returns The status of the job
 void stop()
          Cases the dispacher to stop dispaching and trys to kill dispached jobs
 boolean test(Queue queue)
          Runs test(s) on underlying components to determine if submitting jobs should be attempted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

application

protected BashApplication application

simulation

protected boolean simulation
Constructor Detail

XgridDispatcher

public XgridDispatcher()
Creates a new instance of XgridDispatcher

Method Detail

getXgridEx

public java.lang.String getXgridEx()

setXgridEx

public void setXgridEx(java.lang.String v)

setMaxElapseTime

public void setMaxElapseTime(int maxElapseTime)

getMaxElapseTime

public int getMaxElapseTime()

getOutputDirName

public java.lang.String getOutputDirName(Job job)

getInputDirName

public java.lang.String getInputDirName(Job job)

dispatch

public void dispatch(Request request,
                     java.util.List jobs)
Description copied from interface: Dispatcher
Dispatches the processes described in the job request. To dispatch the job, the dispatcher will also recreate the remote environment needed by the job as specified in the JobDescription

Specified by:
dispatch in interface Dispatcher
Parameters:
request - job description and requirements, include input and output file and environment variables

dispatch

protected void dispatch(Request request,
                        Job job)

getXgridCommand

public java.lang.String getXgridCommand(Request request,
                                        Job job)
Returns the full xgrid command to be executed to dispatch the process. This command must executed in the directory in which the script resides.

Returns:
the xgrid command

setBashApplication

public void setBashApplication(BashApplication application)

getBashApplication

public BashApplication getBashApplication()

retrieveOutput

public void retrieveOutput(Request job,
                           java.util.List jobs)
Retrieves the output of the job from the target machine. It will first check whether the job has terminated, and than it will retrieve the output files and delete any temporary files on the target machine.

Specified by:
retrieveOutput in interface Dispatcher
Parameters:
job - job description and requirements, include input and output file and environment variables

Kill

public void Kill(Request request,
                 java.util.List jobs)
Kills the processes associated with this job.

Specified by:
Kill in interface Dispatcher

Status

public java.lang.String Status(Job job,
                               int Processe)
Returns The status of the job

Specified by:
Status in interface Dispatcher

stop

public void stop()
Cases the dispacher to stop dispaching and trys to kill dispached jobs

Specified by:
stop in interface Dispatcher

test

public boolean test(Queue queue)
Description copied from interface: Dispatcher
Runs test(s) on underlying components to determine if submitting jobs should be attempted. Will return true to indicate everything is alright and false if the test has failed.

Specified by:
test in interface Dispatcher


Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.