public class JobKillServiceV3
extends java.lang.Object
| Constructor and Description |
|---|
JobKillServiceV3(@NotBlank java.lang.String hostname,
@NotNull JobSearchService jobSearchService,
@NotNull org.apache.commons.exec.Executor executor,
boolean runAsUser,
@NotNull GenieEventBus genieEventBus,
@NotNull org.springframework.core.io.Resource genieWorkingDir,
@NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper,
ProcessChecker.Factory processCheckerFactory)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
killJob(@NotBlank(message="No id entered. Unable to kill job.") java.lang.String id,
@NotBlank(message="No reason provided.") java.lang.String reason)
Kill the job with the given id if possible.
|
void |
onKillJobEvent(@NotNull KillJobEvent event)
Listen for job kill events from within the system as opposed to on calls from users directly to killJob.
|
public JobKillServiceV3(@NotBlank
@NotBlank java.lang.String hostname,
@NotNull
@NotNull JobSearchService jobSearchService,
@NotNull
@NotNull org.apache.commons.exec.Executor executor,
boolean runAsUser,
@NotNull
@NotNull GenieEventBus genieEventBus,
@NotNull
@NotNull org.springframework.core.io.Resource genieWorkingDir,
@NotNull
@NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper,
@NotNull
ProcessChecker.Factory processCheckerFactory)
hostname - The name of the host this Genie node is running onjobSearchService - The job search service to use to locate job informationexecutor - The executor to use to run system processesrunAsUser - True if jobs are run as the user who submitted the jobgenieEventBus - The system event bus to usegenieWorkingDir - The working directory where all job directories are created.objectMapper - The Jackson ObjectMapper used to serialize from/to JSONprocessCheckerFactory - The process checker factorypublic void killJob(@NotBlank(message="No id entered. Unable to kill job.")
@NotBlank(message="No id entered. Unable to kill job.") java.lang.String id,
@NotBlank(message="No reason provided.")
@NotBlank(message="No reason provided.") java.lang.String reason)
throws com.netflix.genie.common.exceptions.GenieException
id - id of job to killreason - brief reason for requesting the job be killedcom.netflix.genie.common.exceptions.GenieException - if there is an error@EventListener
public void onKillJobEvent(@NotNull
@NotNull KillJobEvent event)
throws com.netflix.genie.common.exceptions.GenieException
event - The KillJobEventcom.netflix.genie.common.exceptions.GenieException - On error