ARC SDK
Data Structures | Public Member Functions
Arc::Submitter Class Reference

#include <arc/compute/Submitter.h>

Public Member Functions

SubmissionStatus Submit (const Endpoint &endpoint, const JobDescription &desc)
 
SubmissionStatus Submit (const Endpoint &endpoint, const JobDescription &desc, Job &job)
 
SubmissionStatus Submit (const Endpoint &endpoint, const std::list< JobDescription > &descs)
 
SubmissionStatus Submit (const Endpoint &endpoint, const std::list< JobDescription > &descs, std::list< Job > &jobs)
 
SubmissionStatus Submit (const std::list< Endpoint > &endpoint, const std::list< JobDescription > &descs)
 
SubmissionStatus Submit (const std::list< Endpoint > &endpoint, const std::list< JobDescription > &descs, std::list< Job > &jobs)
 

Detailed Description

As the name indicates this class is used for submitting jobs. It has a number of different submit methods which can be used directly for different purposes. When initiating a object of this class a UserConfig object must be passed, which should contain path to user credentials.

Generally there are two versions of submit methods. One which doesn't accept a reference to a Job or list of Job objects, and one which does. This is because the Submitter class is able to pass submitted Job objects to consumer objects. Registering a consumer object is done using the addConsumer method passing a reference to a EntityConsumer<Job> object. An example of such a consumer is the JobSupervisor class. Multiple consumers can be registered simultaneously. Every submit method will then pass submitted Job objects to the registered consumer objects. A registered consumer can be removed using the removeConsumer method.

For submitting a Grid job one should use one of the BrokeredSubmit methods. They accept a list of job descriptions and a list of information system endpoints for which computing services are discovered and matched to the job descriptions. Jobs are then submitted to the matching services in the order ranked by the algorithm specified in the UserConfig object.

Another way of submitting a job is by using the Submit methods. These methods accepts submission endpoints or ExecutionTarget objects. Using these methods will not do any client side checks whether the computing service resources pointed to by the submission endpoint (or ExecutionTarget) really matches the specified job description(s).

Common for both ways of submitting jobs is that they both return a SubmissionStatus object indicating the outcome of the submission attemp(s). If the returned status object indicates failures, further examination can be carried out by using the GetDescriptionsNotSubmitted, GetEndpointQueryingStatuses and/or GetEndpointSubmissionStatuses methods. Note that on each invocation of any of the submit methods the state from a previous submission attemp will be cleared, thus the just mentioned methods should be used just after an attempted submission fails.

Since
Added in 2.0.0

Member Function Documentation

SubmissionStatus Arc::Submitter::Submit ( const Endpoint endpoint,
const JobDescription desc 
)
inline

Submit a job described by the passed JobDescription object to the specified submission endpoint of a computing service. If successful, the submitted job will be added to the registered consumer object. If unsuccessful, more details can be obtained from the returned SubmissionStatus object, or by using the GetDescriptionsNotSubmitted, GetEndpointQueryingStatuses and GetEndpointSubmissionStatuses

Parameters
[in]endpointthe endpoint to which job should be submitted.
[in]descthe JobDescription object describing the job to be submitted.
Returns
A SubmissionStatus object is returned indicating the status of submission.
See Also
addConsumer
GetDescriptionsNotSubmitted
GetEndpointQueryingStatuses
GetEndpointSubmissionStatuses
Since
Added in 3.0.0
SubmissionStatus Arc::Submitter::Submit ( const Endpoint endpoint,
const JobDescription desc,
Job job 
)

Identical to Submit(const Endpoint&, const JobDescription&), with the addition that the Job object passed as reference will also be filled with job information if submission was successful.

Parameters
[out]joba reference to a Job object which will be filled with job details if submission was successful.
See Also
Submit(const Endpoint&, const JobDescription&) for detailed description.
Since
Added in 3.0.0
SubmissionStatus Arc::Submitter::Submit ( const Endpoint endpoint,
const std::list< JobDescription > &  descs 
)

Identical to Submit(const Endpoint&, const JobDescription&), except that this method submits multiple jobs to same endpoint. Submitted jobs will be added to the registered consumer.

See Also
Submit(const Endpoint&, const JobDescription&)
Since
Added in 3.0.0
SubmissionStatus Arc::Submitter::Submit ( const Endpoint endpoint,
const std::list< JobDescription > &  descs,
std::list< Job > &  jobs 
)

Identical to Submit(const Endpoint&, const JobDescription&), with the addition that the list of Job objects passed reference will filled with the submitted jobs, and that multiple jobs are submitted to same endpoint.

See Also
Submit(const Endpoint&, const JobDescription&)
Since
Added in 3.0.0
SubmissionStatus Arc::Submitter::Submit ( const std::list< Endpoint > &  endpoint,
const std::list< JobDescription > &  descs 
)

Submit multiple jobs to a list of submission endpoints to computing services. For each JobDescription object submission is tried against the list of submission endpoints in order. If submission to a endpoint fails the next in the list is tried - no ranking of endpoints will be done. Also note that a job is only submitted once, and not to multiple computing services. Submitted Job objects is passed to the registered consumer objects.

Returns
A SubmissionStatus object is returned which indicates the outcome of the submission.
See Also
addConsumer
GetDescriptionsNotSubmitted
GetEndpointQueryingStatuses
GetEndpointSubmissionStatuses
Since
Added in 3.0.0
SubmissionStatus Arc::Submitter::Submit ( const std::list< Endpoint > &  endpoint,
const std::list< JobDescription > &  descs,
std::list< Job > &  jobs 
)

Identical to Submit(const Endpoint&, const std::list<JobDescription>&, std::list<Job>&) with the addition that submitted jobs are also added to the passed list of Job objects.

See Also
Submit(const Endpoint&, const std::list<JobDescription>&, std::list<Job>&)
Since
Added in 3.0.0

The documentation for this class was generated from the following file: