public class TitusAgentLauncherImpl extends java.lang.Object implements AgentLauncher
| Modifier and Type | Class and Description |
|---|---|
static interface |
TitusAgentLauncherImpl.TitusJobRequestAdapter
An interface that should be implemented by any class which wants to modify the Titus job request before it is
sent.
|
LAUNCH_TIMER, LAUNCHER_CLASS_EXT_FIELD, LAUNCHER_CLASS_KEY, SOURCE_HOST_EXT_FIELD| Constructor and Description |
|---|
TitusAgentLauncherImpl(org.springframework.web.client.RestTemplate restTemplate,
TitusAgentLauncherImpl.TitusJobRequestAdapter jobRequestAdapter,
com.github.benmanes.caffeine.cache.Cache<java.lang.String,java.lang.String> healthIndicatorCache,
com.netflix.genie.common.internal.util.GenieHostInfo genieHostInfo,
TitusAgentLauncherProperties titusAgentLauncherProperties,
org.springframework.core.env.Environment environment,
io.micrometer.core.instrument.MeterRegistry registry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.boot.actuate.health.Health |
health() |
java.util.Optional<com.fasterxml.jackson.databind.JsonNode> |
launchAgent(ResolvedJob resolvedJob,
com.fasterxml.jackson.databind.JsonNode requestedLauncherExt)
Launch an agent to execute the given
ResolvedJob information. |
public TitusAgentLauncherImpl(org.springframework.web.client.RestTemplate restTemplate,
TitusAgentLauncherImpl.TitusJobRequestAdapter jobRequestAdapter,
com.github.benmanes.caffeine.cache.Cache<java.lang.String,java.lang.String> healthIndicatorCache,
com.netflix.genie.common.internal.util.GenieHostInfo genieHostInfo,
TitusAgentLauncherProperties titusAgentLauncherProperties,
org.springframework.core.env.Environment environment,
io.micrometer.core.instrument.MeterRegistry registry)
restTemplate - the rest templatejobRequestAdapter - The implementation of TitusAgentLauncherImpl.TitusJobRequestAdapter to usehealthIndicatorCache - a cache to store metadata about recently launched jobsgenieHostInfo - the metadata about the local server and hosttitusAgentLauncherProperties - the configuration propertiesenvironment - The application environment to pull dynamic properties fromregistry - the metric registrypublic java.util.Optional<com.fasterxml.jackson.databind.JsonNode> launchAgent(ResolvedJob resolvedJob, @Nullable com.fasterxml.jackson.databind.JsonNode requestedLauncherExt) throws AgentLaunchException
ResolvedJob information.launchAgent in interface AgentLauncherresolvedJob - The ResolvedJob information for the agent to act onrequestedLauncherExt - The launcher requested extension, or nullJsonNode with the launcher context about the launched jobAgentLaunchException - For any error launching an Agent instance to run the jobpublic org.springframework.boot.actuate.health.Health health()
health in interface org.springframework.boot.actuate.health.HealthIndicator