public class JobSubmission extends Object
Constructor and Description |
---|
JobSubmission() |
Modifier and Type | Method and Description |
---|---|
void |
abortTask(String jobIdentifier,
String taskIdentifier)
Send an abort request for a specific task.
|
String |
createJobIdentifier()
Creates a Job Identifier
|
ProgressTracker |
deploy(Operation[] operations,
int numOfResources,
String jobIdentifier,
JobLifecycleObserver jobLifecycleObserver) |
void |
discoverResource()
Discovers the available computational resources.
|
void |
discoverResource(int wait)
Discovers the available computational resources.
|
static JobSubmission |
getInstance()
Deprecated.
|
Enumeration<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() |
Collection<String> |
getResourceDeploymentStreams()
Retrieves the currently-available resource deployment streams known by
the JobSubmission singleton instance.
|
Collection<String> |
getResourceDeploymentStreams(Collection<String> exclusions)
Retrieves the currently-available resource deployment streams known by
the JobSubmission singleton instance.
|
String |
getStatus()
This method returns a String representation of the status of all jobs
that have been submitted from this node.
|
ProgressTracker |
getStatusOfJob(String jobIdentifier)
Retrieve the status of a specific job that was submitted from this node.
|
void |
getStatusOfTask(String jobIdentifier,
String taskIdentifier)
Retrieve the status of a task.
|
void |
initialize(String configurationFile,
int entityId,
Properties props,
String commType)
Initializes communications based on the specified parameters.
|
void |
killJob(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,
String resourceDeploymentStream,
JobLifecycleObserver jobLifecycleObserver)
Submit the given operation for execution.
|
ProgressTracker |
submit(Operation operation,
String resourceDeploymentStream,
String jobIdentifier,
JobLifecycleObserver jobLifecycleObserver)
This method allows one to group a set of related tasks together in a Job.
|
public static final String MODULE
@Deprecated public static JobSubmission getInstance()
public void initialize(String configurationFile, int entityId, Properties props, 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 IOException, MarshallingException, CommunicationsException, DeploymentException
public void discoverResource(int wait) throws 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.IOException
MarshallingException
CommunicationsException
DeploymentException
public int getNumberOfAvailableResources()
public Collection<String> getResourceDeploymentStreams()
public Collection<String> getResourceDeploymentStreams(Collection<String> exclusions)
public 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, 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, String resourceDeploymentStream, 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(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(String jobIdentifier, 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 canceledCommunicationsException
MarshallingException
public void getStatusOfTask(String jobIdentifier, String taskIdentifier) throws CommunicationsException, DeploymentException, MarshallingException
jobIdentifier
- taskIdentifier
- CommunicationsException
DeploymentException
MarshallingException
public String getStatus()
public ProgressTracker getStatusOfJob(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 Enumeration<String> getListOfJobs()
public ProgressTracker deploy(Operation[] operations, int numOfResources, String jobIdentifier, JobLifecycleObserver jobLifecycleObserver) throws CommunicationsException, DeploymentException, MarshallingException
public int getNumberOfResources()
Copyright © 2015. All rights reserved.