Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members
resources::Job Class ReferenceAn instance of this class represents a monitorable simple job, a job which requires the start of a single executable and is monitorable.
More...
Inheritance diagram for resources::Job:
[legend]Collaboration diagram for resources::Job:
[legend]List of all members.
|
Public Methods |
| Job | create (GATContext gatContext, SoftwareResourceDescription softwareResourceDescription) throws Exception |
| | Constructs a instance corresponding to the passed SoftwareResourceDescription and GATContext.
|
| Job | create (GATContext gatContext, Preferences preferences, SoftwareResourceDescription softwareResourceDescription) throws Exception |
| | Constructs a instance corresponding to the passed SoftwareResourceDescription and GATContext.
|
| abstract void | submit () throws RemoteException, IOException |
| | Submits the associated physical job to a job queue, an ordered list of jobs which will eventually be run.
|
| abstract void | stop () throws RemoteException, IOException |
| | Stops the associated physical job.
|
| abstract int | getState () throws RemoteException, IOException |
| | This method returns the state of the associated .
|
| abstract Map | getInfo () throws RemoteException, IOException |
| | This method returns an instance of the class java.util.Map which contains information about the associated .
|
| abstract String | getJobID () throws RemoteException, IOException |
| | This method returns the job id, a globally unique identifier for the physical job corresponding to this instance.
|
| abstract void | checkpoint () throws RemoteException, IOException |
| | Checkpoints the associated physical job.
|
| abstract void | migrate () throws RemoteException, IOException |
| | This method is equivalent to calling Checkpoint, Stop, then Submit on this instance of Job.
|
| abstract void | migrate (HardwareResourceDescription hardwareResourceDescription) throws RemoteException, IOException |
| | This method is equivalent to calling Checkpoint then Stop on this instance of Job, then calling Submit on an instance of Job identical to this instance except that.
|
Static Public Attributes |
| final int | CONSTRUCTED = 1 |
| | Constructed state indicator.
|
| final int | SUBMITTED = 2 |
| | Submitted state indicator.
|
| final int | RUNNING = 4 |
| | Running state indicator.
|
| final int | STOPPED = 8 |
| | Stopped state indicator.
|
| final int | CHECKPOINTING = 16 |
| | Checkpointing state indicator.
|
Protected Methods |
| | Job (GATContext gatContext, Preferences preferences, SoftwareResourceDescription softwareResourceDescription) throws Exception |
| | Constructs a instance corresponding to the passed SoftwareResourceDescription and GATContext.
|
Protected Attributes |
| SoftwareResourceDescription | softwareResourceDescription |
Private Attributes |
| GATContext | gatContext |
| Preferences | preferences |
Detailed Description
An instance of this class represents a monitorable simple job, a job which requires the start of a single executable and is monitorable.
A simple job is what one normally considers when referring to a starting a program. Thus, a simple job is primarily described by the software which is to execute during this simple job. The description of the software which is to execute during this simple job is given by an instance of the class SoftwareResourceDescription. As detailed in the description section of the documentation for the class SoftwareResourceDescription, an instance of the class SoftwareResourceDescription describes a software component. uses this description to describe the software which is to execute during this simple job.
Upon creating an instance of the class the associated physical job is not immediately running. An instance of the class has various states which it can be in, only one of which maps to a running physical job. In particular the various state are as follows
- Constructed
- Submitted
- Running
- Stopped
A description of the various states diagrammed in figure below is as follows:
Constructed An instance of the class has been constructed, but the method Submit has not yet been successfully called on this instance.
Submitted The method Submit has been successfully called on an instance of while the instance was in the Constructed state.
Running The physical job corresponding to an instance of a is running.
Stopped The physical job corresponding to an instance of a was running but is not currently running due to a successful call to the method Stop, or the physical job corresponding to an instance of a was running but is not currently running due to the physical job completing.
In addition a allows one or more Metrics to be monitored.
Definition at line 58 of file Job.java.
Constructor & Destructor Documentation
Member Function Documentation
| abstract void resources::Job::submit |
( |
|
) |
throws RemoteException, IOException [pure virtual] |
|
|
|
Submits the associated physical job to a job queue, an ordered list of jobs which will eventually be run.
Eventually the associated physical job will be taken off of the job queue and begin running. This method can only be called on a in the Constructed or Stopped state or an error will occur. - Exceptions:
-
| java |
.rmi.RemoteException Thrown upon problems accessing the remote instance |
| java |
.io.IOException Upon non-remote IO problem |
|
| abstract void resources::Job::stop |
( |
|
) |
throws RemoteException, IOException [pure virtual] |
|
|
|
Stops the associated physical job.
Upon a successful call to this method the associated physical job is forcibly terminated. This method can only be called on a in the Running state. - Exceptions:
-
| java |
.rmi.RemoteException Thrown upon problems accessing the remote instance |
| java |
.io.IOException Upon non-remote IO problem |
|
| abstract int resources::Job::getState |
( |
|
) |
throws RemoteException, IOException [pure virtual] |
|
|
|
This method returns the state of the associated .
This is one of the associated public member member variables CONSTRUCTED, SUBMITTED, RUNNING, or STOPPED.
- Returns:
-
This method returns the state of the associated , one of the associated member variables
- Exceptions:
-
| java |
.rmi.RemoteException Thrown upon problems accessing the remote instance |
| java |
.io.IOException Upon non-remote IO problem |
|
| abstract Map resources::Job::getInfo |
( |
|
) |
throws RemoteException, IOException [pure virtual] |
|
|
|
This method returns an instance of the class java.util.Map which contains information about the associated .
This java.util.Map contains a set of key/value pairs the key, a java.lang.String, being the name of the information and the value being the value of the associated named information. The minimum set of keys which the returned java.util.Map contains is as follows:
- hostname
- submissiontime
- starttime
- stoptime
hostname The key hostname corresponds to a java.lang.String value which is the name of the host on which the physical job is running, if is in the Running state, or will be running on, if is in the Submitted state. If the associated is not in the Running or Submitted state, then the value is null.
submissiontime The key submissiontime corresponds to a long value which is the number of milliseconds after January 1, 1970, 00:00:00 GMT when the associated physical job was submitted. This value is null for a in the Constructed state otherwise it is not null.
starttime The key starttime corresponds to a long value which is the number of milliseconds after January 1, 1970, 00:00:00 GMT when the associated physical job was started. This value is null for a in the Submitted or Constructed states otherwise it is not null.
stoptime The key stoptime corresponds to a long value which is the number of milliseconds after January 1, 1970, 00:00:00 GMT when the associated physical job stopped. This value is not null for a in the Stopped state otherwise it is null.
Other key/value pairs will be in future added to the list of key/value pairs returned in this java.util.Map as the need develops.
- Returns:
-
An instance of the class java.util.Map which presents information about the associated .
- Exceptions:
-
| java |
.rmi.RemoteException Thrown upon problems accessing the remote instance |
| java |
.io.IOException Upon non-remote IO problem |
|
| abstract String resources::Job::getJobID |
( |
|
) |
throws RemoteException, IOException [pure virtual] |
|
|
|
This method returns the job id, a globally unique identifier for the physical job corresponding to this instance.
This method should be called on an instance of this class only when the instance is in a Running or Submitted state or an error will be returned.
- Returns:
-
An instance of the class java.lang.String which represents the job ID
- Exceptions:
-
| java |
.rmi.RemoteException Thrown upon problems accessing the remote instance |
| java |
.io.IOException Upon non-remote IO problem |
|
| abstract void resources::Job::checkpoint |
( |
|
) |
throws RemoteException, IOException [pure virtual] |
|
|
|
Checkpoints the associated physical job.
A physical job is said to be checkpointed when it writes its current state information to a long term storage medium. A physical job when checkpointing must write its current state information to a long term storage medium in such a manner so that it can, at a later date, by using the state information stored in the long term storage medium continue running "from the same point" it was at before checkpointing. This is useful for physical jobs which involve significant data processing and can not, for any number of reasons, process all of this data in a single run; also, it is useful for physical jobs which involve significant data processing and are, for any number of reasons unstable. In both of these cases checkpointing allows the physical job to process some data now, then, at a later date, continue running. This method can only be called on a Job in the Running state or an error will occur. - Exceptions:
-
| java |
.rmi.RemoteException Thrown upon problems accessing the remote instance |
| java |
.io.IOException Upon non-remote IO problem |
|
| abstract void resources::Job::migrate |
( |
|
) |
throws RemoteException, IOException [pure virtual] |
|
|
|
This method is equivalent to calling Checkpoint, Stop, then Submit on this instance of Job.
- Exceptions:
-
| java |
.rmi.RemoteException Thrown upon problems accessing the remote instance |
| java |
.io.IOException Upon non-remote IO problem |
|
| abstract void resources::Job::migrate |
( |
HardwareResourceDescription |
hardwareResourceDescription |
) |
throws RemoteException, IOException [pure virtual] |
|
|
|
This method is equivalent to calling Checkpoint then Stop on this instance of Job, then calling Submit on an instance of Job identical to this instance except that.
- The Job when it first enters the Running state will be in the state specified by the state information stored during the previous call to the Checkpoint method.
- The Job when it first enters the Running state will be running on a hardware resource described in the passed HardwareResourceDescription.
- Parameters:
-
| hardwareResourceDescription |
A description of the hardware resource to which the physical job corresponding to this Job should be migrated, a HardwareResourceDescription |
- Exceptions:
-
| java |
.rmi.RemoteException Thrown upon problems accessing the remote instance |
| java |
.io.IOException Upon non-remote IO problem |
|
Member Data Documentation
final int resources::Job::CONSTRUCTED = 1 [static]
|
|
|
|
Constructed state indicator.
Definition at line 61 of file Job.java. |
final int resources::Job::SUBMITTED = 2 [static]
|
|
|
|
Submitted state indicator.
Definition at line 64 of file Job.java. |
final int resources::Job::RUNNING = 4 [static]
|
|
|
|
Running state indicator.
Definition at line 67 of file Job.java. |
final int resources::Job::STOPPED = 8 [static]
|
|
|
|
Stopped state indicator.
Definition at line 70 of file Job.java. |
final int resources::Job::CHECKPOINTING = 16 [static]
|
|
|
|
Checkpointing state indicator.
Definition at line 73 of file Job.java. |
The documentation for this class was generated from the following file:
|