public class LocalJobRunner extends java.lang.Object implements JobSubmitterService
| Constructor and Description |
|---|
LocalJobRunner(JobPersistenceService jobPersistenceService,
org.springframework.context.ApplicationEventPublisher eventPublisher,
org.springframework.context.event.ApplicationEventMulticaster eventMulticaster,
java.util.List<WorkflowTask> workflowTasks,
org.springframework.core.io.Resource genieWorkingDir,
com.netflix.spectator.api.Registry registry)
Constructor create the object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
submitJob(JobRequest jobRequest,
Cluster cluster,
Command command,
java.util.List<Application> applications,
int memory)
Submit the job for appropriate execution based on environment.
|
public LocalJobRunner(@NotNull
JobPersistenceService jobPersistenceService,
@NotNull
org.springframework.context.ApplicationEventPublisher eventPublisher,
@NotNull
org.springframework.context.event.ApplicationEventMulticaster eventMulticaster,
@NotNull
java.util.List<WorkflowTask> workflowTasks,
@NotNull
org.springframework.core.io.Resource genieWorkingDir,
@NotNull
com.netflix.spectator.api.Registry registry)
jobPersistenceService - Implementation of the job persistence serviceeventPublisher - The synchronous event publisher to useeventMulticaster - Instance of the asynchronous event publisher to useworkflowTasks - List of all the workflow tasks to be executedgenieWorkingDir - Working directory for genie where it creates jobs directoriesregistry - The metrics registry to usepublic void submitJob(@NotNull(message="No job provided. Unable to submit job for execution.")
JobRequest jobRequest,
@NotNull(message="No cluster provided. Unable to submit job for execution")
Cluster cluster,
@NotNull(message="No command provided. Unable to submit job for execution")
Command command,
@NotNull(message="No applications provided. Unable to submit job for execution")
java.util.List<Application> applications,
@Min(value=1L,message="Memory can\'t be less than 1 MB")
int memory)
throws GenieException
submitJob in interface JobSubmitterServicejobRequest - of job to runcluster - The cluster this job should run oncommand - the command to run this job withapplications - Any applications that are needed to run the commandmemory - The amount of memory (in MB) to use to run the jobGenieException - if there is an error