public class JobSubmission
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MODULE |
| Constructor and Description |
|---|
JobSubmission() |
| Modifier and Type | Method and Description |
|---|---|
void |
abortTask(java.lang.String jobIdentifier,
java.lang.String taskIdentifier)
Send an abort request for a specific task.
|
java.lang.String |
createJobIdentifier()
Creates a Job Identifier
|
ProgressTracker |
deploy(Operation[] operations,
int numOfResources,
java.lang.String jobIdentifier,
JobLifecycleObserver jobLifecycleObserver) |
void |
discoverResource()
Discovers the available computational resources.
|
void |
discoverResource(int wait)
Discovers the available computational resources.
|
static JobSubmission |
getInstance()
Deprecated.
|
java.util.Enumeration<java.lang.String> |
getListOfJobs()
Get the complete list of jobs that have been submitted from this node.
|
int |
getNumberOfAvailableResources()
Retrieves the number of available resources.
|
int |
getNumberOfResources() |
java.util.Collection<java.lang.String> |
getResourceDeploymentStreams()
Retrieves the currently-available resource deployment streams known by
the JobSubmission singleton instance.
|
java.util.Collection<java.lang.String> |
getResourceDeploymentStreams(java.util.Collection<java.lang.String> exclusions)
Retrieves the currently-available resource deployment streams known by
the JobSubmission singleton instance.
|
java.lang.String |
getStatus()
This method returns a String representation of the status of all jobs
that have been submitted from this node.
|
ProgressTracker |
getStatusOfJob(java.lang.String jobIdentifier)
Retrieve the status of a specific job that was submitted from this node.
|
void |
getStatusOfTask(java.lang.String jobIdentifier,
java.lang.String taskIdentifier)
Retrieve the status of a task.
|
void |
initialize(java.lang.String configurationFile,
int entityId,
java.util.Properties props,
java.lang.String commType)
Initializes communications based on the specified parameters.
|
void |
killJob(java.lang.String jobIdentifier)
Attempts to kill the job while it is in execution at different sites
|
ProgressTracker |
submit(Operation operation,
JobLifecycleObserver jobLifecycleObserver)
Submit the given operation for execution.
|
ProgressTracker |
submit(Operation operation,
java.lang.String resourceDeploymentStream,
JobLifecycleObserver jobLifecycleObserver)
Submit the given operation for execution.
|
ProgressTracker |
submit(Operation operation,
java.lang.String resourceDeploymentStream,
java.lang.String jobIdentifier,
JobLifecycleObserver jobLifecycleObserver)
This method allows one to group a set of related tasks together in a Job.
|
public static final java.lang.String MODULE
@Deprecated public static JobSubmission getInstance()
public void initialize(java.lang.String configurationFile,
int entityId,
java.util.Properties props,
java.lang.String commType)
throws CommunicationsException
configurationFile - The configuration fileentityId - The ID for the entityprops - The properties for streamingcommType - The communications typeCommunicationsException - If there are problems sending messages over the networkpublic void discoverResource()
throws java.io.IOException,
MarshallingException,
CommunicationsException,
DeploymentException
java.io.IOExceptionMarshallingExceptionCommunicationsExceptionDeploymentExceptionpublic void discoverResource(int wait)
throws java.io.IOException,
MarshallingException,
CommunicationsException,
DeploymentException
wait - Number of half-second intervals to wait for the discovery to
complete. For small networks, this could be lower than the
default of 6.java.io.IOExceptionMarshallingExceptionCommunicationsExceptionDeploymentExceptionpublic int getNumberOfAvailableResources()
public java.util.Collection<java.lang.String> getResourceDeploymentStreams()
public java.util.Collection<java.lang.String> getResourceDeploymentStreams(java.util.Collection<java.lang.String> exclusions)
public java.lang.String createJobIdentifier()
public ProgressTracker submit(Operation operation, JobLifecycleObserver jobLifecycleObserver) throws CommunicationsException, DeploymentException, MarshallingException
operation - The operation that needs to be executed at the remote sitesjobLifecycleObserver - The observer being registered, and on whom the appropriate
methods outlining the executing of the job will be invoked.CommunicationsException - If there are problems sending messages over the networkDeploymentException - If there are problems during the deployment processMarshallingException - If there are problems Marshalling the operation in a
deployment requestpublic ProgressTracker submit(Operation operation, java.lang.String resourceDeploymentStream, JobLifecycleObserver jobLifecycleObserver) throws CommunicationsException, DeploymentException, MarshallingException
operation - The operation that needs to be executed at the remote sitesresourceDeploymentStream - The deployment stream associated with the resource.jobLifecycleObserver - The observer being registered, and on whom the appropriate
methods outlining the executing of the job will be invoked.CommunicationsException - If there are problems sending messages over the networkDeploymentException - If there are problems during the deployment processMarshallingException - If there are problems Marshalling the operation in a
deployment requestpublic ProgressTracker submit(Operation operation, java.lang.String resourceDeploymentStream, java.lang.String jobIdentifier, JobLifecycleObserver jobLifecycleObserver) throws CommunicationsException, DeploymentException, MarshallingException
createJobIdentifier() method.operation - The operation that needs to be executed at the remote sitesresourceDeploymentStream - The deployment stream associated with the resource.jobIdentifier - The identifier of the Job group.jobLifecycleObserver - The observer being registered, and on whom the appropriate
methods outlining the executing of the job will be invoked.CommunicationsException - If there are problems sending messages over the networkDeploymentException - if there are problems during the deployment process * @throws
DeploymentExceptionMarshallingException - If there are problems Marshalling the operation in a
deployment requestpublic void killJob(java.lang.String jobIdentifier)
throws DeploymentException,
CommunicationsException,
MarshallingException
jobIdentifier - The ID of the Job that needs to be killedDeploymentException - If there are problems in locating the job, or if it has
already been completed or canceledMarshallingException - If there are problems marshalling the requestCommunicationsException - If there are problems sending the request over the network.public void abortTask(java.lang.String jobIdentifier,
java.lang.String taskIdentifier)
throws CommunicationsException,
DeploymentException,
MarshallingException
jobIdentifier - The Job that this task is a part oftaskIdentifier - The ID of the task that needs to be abortedDeploymentException - If there are problems in locating the job, or if it has
already been completed or canceledCommunicationsExceptionMarshallingExceptionpublic void getStatusOfTask(java.lang.String jobIdentifier,
java.lang.String taskIdentifier)
throws CommunicationsException,
DeploymentException,
MarshallingException
jobIdentifier - taskIdentifier - CommunicationsExceptionDeploymentExceptionMarshallingExceptionpublic java.lang.String getStatus()
public ProgressTracker getStatusOfJob(java.lang.String jobIdentifier)
jobIdentifier - The id of the job in questionProgressTracker associated with the job, or NULL if
the specified id is an invalid one.public java.util.Enumeration<java.lang.String> getListOfJobs()
public ProgressTracker deploy(Operation[] operations, int numOfResources, java.lang.String jobIdentifier, JobLifecycleObserver jobLifecycleObserver) throws CommunicationsException, DeploymentException, MarshallingException
public int getNumberOfResources()