gov.bnl.star.offline.scheduler
Class Job

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.Job
All Implemented Interfaces:
java.io.Serializable

public class Job
extends java.lang.Object
implements java.io.Serializable

Describes one of the processes to be dispatched with the underlying scheduler. Process are created not by calling the constructor, but by creating them within a ProcessList.

Version:
$Revision: 1.16 $ $Date: 2006/11/21 00:41:32 $
Author:
Gabriele Carcassi
See Also:
Serialized Form

Constructor Summary
Job()
           
Job(java.lang.String jobID)
          Creates a new instance of Process
 
Method Summary
 void AddProcesseID(java.lang.String ID)
           
 void addToReportText(java.lang.String Text)
          Concats a string plus a "\n" to report file.
 void clearProcesseIDs()
           
 void DispatchSuccessful()
           
 AccessMethod getAccessMethod()
           
 LocalAccessPoint getAccessPoint()
           
 Dispatcher getAssociatedDispatcher()
           
 java.lang.String getCluster()
          Getter for property cluster.
 java.lang.String getCommandline()
          Returns the commandline of the process, or null if the command line from the job should be used.
 DatasetSubset getDatasetSubset()
           
 boolean getDispatchSuccessful()
           
 int getDispatchTime()
          Returns how long it took to dispatch this job in ms
 java.util.Properties getEnv()
          Returns the environment variables to be set for the process.
 java.util.List getInput()
          Returns the input file list required by the process.
 java.lang.String getJobID()
          Returns a String that uniquely describes the job.
 int getMaxMemory()
          Returns the maximum memory needed by the process.
 int getMaxStorageSpace()
          Returns the maximum swap disk space needed by the process.
 int getMinMemory()
          Returns the minimum memory needed by the process.
 int getMinStorageSpace()
          Returns the minimum swap disk space needed by the process.
 java.util.List getOuput()
          Returns the output file list produced by the process.
 java.util.List getProcesseIDs()
           
 java.lang.String getProcessID()
           
 java.lang.String getQueue()
          Returns the queue name on which the process should be dispatched.
 Queue getQueueObj()
           
 java.lang.String GetReportText()
          Returns a report of events that happined to the job
 Request getRequest()
           
 java.lang.String getRequestID()
           
 java.net.URL getStderr()
          Returns the location to which the standard error has to be redirected.
 java.net.URL getStdin()
          Returns the location from which the standard input will be read.
 java.net.URL getStdout()
          Returns the location to which the standard output has to be redirected.
 java.lang.String getTarget()
          Returns the resource to which the process should be dispatched, typically a machine name.
 java.lang.String getTimeOfDispatch()
          Returns a string that holds the data and time the job was dispatched.
 void setAccessMethod(AccessMethod accessMethod)
           
 void setAccessPoint(LocalAccessPoint accessPoint)
           
 void setCluster(java.lang.String cluster)
          Setter for property cluster.
 void setCommandline(java.lang.String commandLine)
          Changes the commandline of the process.
 void setDatasetSubset(DatasetSubset datasetSubset)
           
 void setDispatchSuccessful(boolean dispatchSuccessful)
           
 void setDispatchTime(int dispatchTime)
          Sets how long it took to dispatch this job.
 void setJobID(java.lang.String ID)
           
 void setOutput(java.util.List outputList)
          Sets an file list describing all the files the process will produce as outputs.
 void setProcesseIDs(java.util.List ProcesseIDs)
           
 void setQueue(java.lang.String queue)
          Sets the queue on which the job will be dispatched.
 void setQueueObj(Queue queue)
           
 void SetReportText(java.lang.String Text)
          Sets or resets the report text to any string value.
 void setRequest(Request request)
           
 void setStderr(java.net.URL stderr)
          Sets the location to which the standard error has to be redirected.
 void setStdin(java.net.URL stdin)
          Sets the location from which the standard input will be reed.
 void setStdout(java.net.URL stdout)
          Sets the location to which the standard output has to be redirected.
 void setTimeOfDispatch(java.lang.String TimeOfDispatch)
          Accepts a string that represents the date and time a job was dispatched (in any format) (not validated).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Job

public Job()

Job

public Job(java.lang.String jobID)
Creates a new instance of Process

Method Detail

setDatasetSubset

public void setDatasetSubset(DatasetSubset datasetSubset)

getDatasetSubset

public DatasetSubset getDatasetSubset()

setAccessMethod

public void setAccessMethod(AccessMethod accessMethod)

getAccessMethod

public AccessMethod getAccessMethod()

setAccessPoint

public void setAccessPoint(LocalAccessPoint accessPoint)

getAccessPoint

public LocalAccessPoint getAccessPoint()

setRequest

public void setRequest(Request request)

getRequest

public Request getRequest()

getAssociatedDispatcher

public Dispatcher getAssociatedDispatcher()

getEnv

public java.util.Properties getEnv()
Returns the environment variables to be set for the process.

Returns:
a set of properties defining the environment variable requested

getJobID

public java.lang.String getJobID()
Returns a String that uniquely describes the job.

Returns:
the job identification String

setJobID

public void setJobID(java.lang.String ID)

getProcessID

public java.lang.String getProcessID()

getRequestID

public java.lang.String getRequestID()

getInput

public java.util.List getInput()
Returns the input file list required by the process.

Returns:
list of input files needed by the process

setOutput

public void setOutput(java.util.List outputList)
Sets an file list describing all the files the process will produce as outputs.

Parameters:
outputList - the output file list of the process

getOuput

public java.util.List getOuput()
Returns the output file list produced by the process.

Returns:
list of output files produced by the process

getMaxMemory

public int getMaxMemory()
Returns the maximum memory needed by the process.

Returns:
maximum memory needed by the processs.

getMinMemory

public int getMinMemory()
Returns the minimum memory needed by the process.

Returns:
minimum memory needed by the processs.

getMinStorageSpace

public int getMinStorageSpace()
Returns the minimum swap disk space needed by the process.

Returns:
minimum swap disk space needed by the processs.

getMaxStorageSpace

public int getMaxStorageSpace()
Returns the maximum swap disk space needed by the process.

Returns:
maximum swap disk space needed by the processs.

getTarget

public java.lang.String getTarget()
Returns the resource to which the process should be dispatched, typically a machine name.

Returns:
the resource to which the process should be dispatched.

setQueue

public void setQueue(java.lang.String queue)
Sets the queue on which the job will be dispatched. If no queue is set, the dispatcher will use the default queue.


setQueueObj

public void setQueueObj(Queue queue)

getQueueObj

public Queue getQueueObj()

getQueue

public java.lang.String getQueue()
Returns the queue name on which the process should be dispatched.


getStdout

public java.net.URL getStdout()
Returns the location to which the standard output has to be redirected.

Returns:
an URL of the "file" protocol

setStdout

public void setStdout(java.net.URL stdout)
Sets the location to which the standard output has to be redirected.

Parameters:
stdout - an URL of the "file" protocol

getStdin

public java.net.URL getStdin()
Returns the location from which the standard input will be read.

Returns:
an URL of the "file" protocol

setStdin

public void setStdin(java.net.URL stdin)
Sets the location from which the standard input will be reed.

Parameters:
stdin - an URL of the "file" protocol

getStderr

public java.net.URL getStderr()
Returns the location to which the standard error has to be redirected.

Returns:
an URL of the "file" protocol

setStderr

public void setStderr(java.net.URL stderr)
Sets the location to which the standard error has to be redirected.

Parameters:
stderr - an URL of the "file" protocol

getCommandline

public java.lang.String getCommandline()
Returns the commandline of the process, or null if the command line from the job should be used.

Returns:
the full command line or null if the on in the jobrequest should be used

setCommandline

public void setCommandline(java.lang.String commandLine)
Changes the commandline of the process.

Parameters:
commandLine - the command line associated with the process

getCluster

public java.lang.String getCluster()
Getter for property cluster.

Returns:
Value of property cluster.

setCluster

public void setCluster(java.lang.String cluster)
Setter for property cluster.

Parameters:
cluster - New value of property cluster.

AddProcesseID

public void AddProcesseID(java.lang.String ID)

clearProcesseIDs

public void clearProcesseIDs()

setProcesseIDs

public void setProcesseIDs(java.util.List ProcesseIDs)

getProcesseIDs

public java.util.List getProcesseIDs()

DispatchSuccessful

public void DispatchSuccessful()

setDispatchSuccessful

public void setDispatchSuccessful(boolean dispatchSuccessful)

getDispatchSuccessful

public boolean getDispatchSuccessful()

setTimeOfDispatch

public void setTimeOfDispatch(java.lang.String TimeOfDispatch)
Accepts a string that represents the date and time a job was dispatched (in any format) (not validated).


getTimeOfDispatch

public java.lang.String getTimeOfDispatch()
Returns a string that holds the data and time the job was dispatched. This is used for writing info to the log file


setDispatchTime

public void setDispatchTime(int dispatchTime)
Sets how long it took to dispatch this job. This should only be set by the dispatcher


getDispatchTime

public int getDispatchTime()
Returns how long it took to dispatch this job in ms


addToReportText

public void addToReportText(java.lang.String Text)
Concats a string plus a "\n" to report file. This will later be dumped into the .report file.


SetReportText

public void SetReportText(java.lang.String Text)
Sets or resets the report text to any string value. Note: To add to the report text use addToReportText() not SetReportText().


GetReportText

public java.lang.String GetReportText()
Returns a report of events that happined to the job



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