@Validated public class JobResolverServiceImpl extends java.lang.Object implements JobResolverService
JobResolverService
APIs.Constructor and Description |
---|
JobResolverServiceImpl(DataServices dataServices,
@NotEmpty java.util.List<ClusterSelector> clusterSelectors,
CommandSelector commandSelector,
io.micrometer.core.instrument.MeterRegistry registry,
JobsProperties jobsProperties,
org.springframework.core.env.Environment environment)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ResolvedJob |
resolveJob(java.lang.String id)
Given the id of a job that was successfully submitted to the system this API will attempt to resolve all the
concrete details (cluster, command, resources, etc) needed for the system to actually launch the job.
|
ResolvedJob |
resolveJob(java.lang.String id,
@Valid JobRequest jobRequest,
boolean apiJob)
Given a job request resolve all the details needed to run a job.
|
public JobResolverServiceImpl(DataServices dataServices, @NotEmpty @NotEmpty java.util.List<ClusterSelector> clusterSelectors, CommandSelector commandSelector, io.micrometer.core.instrument.MeterRegistry registry, JobsProperties jobsProperties, org.springframework.core.env.Environment environment)
dataServices
- The DataServices
encapsulation instance to useclusterSelectors
- The ClusterSelector
implementations to usecommandSelector
- The CommandSelector
implementation to useregistry
- The MeterRegistry
metrics repository to usejobsProperties
- The properties for running a job set by the userenvironment
- The Spring application Environment
for dynamic property resolution@Nonnull @Transactional public ResolvedJob resolveJob(java.lang.String id) throws GenieJobResolutionException
JobStatus.RESOLVED
.resolveJob
in interface JobResolverService
id
- The id of the job to resolve. The job must exist and its status must return true from
JobStatus#isResolvable()
ResolvedJob
instance containing all the concrete information needed to execute the jobGenieJobResolutionException
- When there is an issue resolving the job based on the information provided
by the user in conjunction with the configuration available in the system@Nonnull public ResolvedJob resolveJob(java.lang.String id, @Valid @Valid JobRequest jobRequest, boolean apiJob) throws GenieJobResolutionException
resolveJob
in interface JobResolverService
id
- The id of the jobjobRequest
- The job request containing all details a user wants to have for their jobapiJob
- true if this job was submitted via the REST API. false otherwise.ResolvedJob
instanceGenieJobResolutionException
- When there is an issue resolving the job based on the information provided
by the user in conjunction with the configuration available in the system