Class JobResolverServiceImpl

java.lang.Object
com.netflix.genie.web.services.impl.JobResolverServiceImpl
All Implemented Interfaces:
JobResolverService

@Validated public class JobResolverServiceImpl extends Object implements JobResolverService
Implementation of the JobResolverService APIs.
Since:
4.0.0
  • Constructor Details

    • JobResolverServiceImpl

      public JobResolverServiceImpl(DataServices dataServices, @NotEmpty @NotEmpty List<ClusterSelector> clusterSelectors, CommandSelector commandSelector, io.micrometer.core.instrument.MeterRegistry registry, JobsProperties jobsProperties, JobResolutionProperties jobResolutionProperties, com.netflix.genie.common.internal.tracing.brave.BraveTracingComponents tracingComponents)
      Constructor.
      Parameters:
      dataServices - The DataServices encapsulation instance to use
      clusterSelectors - The ClusterSelector implementations to use
      commandSelector - The CommandSelector implementation to use
      registry - The MeterRegistrymetrics repository to use
      jobsProperties - The properties for running a job set by the user
      jobResolutionProperties - The JobResolutionProperties instance
      tracingComponents - The BraveTracingComponents instance to use
  • Method Details

    • resolveJob

      @Nonnull @Transactional public ResolvedJob resolveJob(String id) throws com.netflix.genie.common.internal.exceptions.checked.GenieJobResolutionException, com.netflix.genie.common.internal.exceptions.unchecked.GenieJobResolutionRuntimeException
      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. Once these details are determined they are persisted and the job is marked as JobStatus.RESOLVED.
      Specified by:
      resolveJob in interface JobResolverService
      Parameters:
      id - The id of the job to resolve. The job must exist and its status must return true from JobStatus#isResolvable()
      Returns:
      A ResolvedJob instance containing all the concrete information needed to execute the job
      Throws:
      com.netflix.genie.common.internal.exceptions.checked.GenieJobResolutionException - When the job cannot resolved due to unsatisfiable constraints
      com.netflix.genie.common.internal.exceptions.unchecked.GenieJobResolutionRuntimeException - When the job fails to resolve due to a runtime error.
    • resolveJob

      @Nonnull public ResolvedJob resolveJob(String id, @Valid @Valid com.netflix.genie.common.internal.dtos.JobRequest jobRequest, boolean apiJob) throws com.netflix.genie.common.internal.exceptions.checked.GenieJobResolutionException, com.netflix.genie.common.internal.exceptions.unchecked.GenieJobResolutionRuntimeException
      Given a job request resolve all the details needed to run a job. This API is stateless and saves nothing.
      Specified by:
      resolveJob in interface JobResolverService
      Parameters:
      id - The id of the job
      jobRequest - The job request containing all details a user wants to have for their job
      apiJob - true if this job was submitted via the REST API. false otherwise.
      Returns:
      The completely resolved job information within a ResolvedJob instance
      Throws:
      com.netflix.genie.common.internal.exceptions.checked.GenieJobResolutionException - When the job cannot resolved due to unsatisfiable constraints
      com.netflix.genie.common.internal.exceptions.unchecked.GenieJobResolutionRuntimeException - When the job fails to resolve due to a runtime error.