public class TitusAgentLauncherImpl extends java.lang.Object implements AgentLauncher
| Modifier and Type | Class and Description |
|---|---|
static class |
TitusAgentLauncherImpl.TitusAPIRetryPolicy
A retry policy that has different behavior based on the type of exception thrown by the rest client during
calls to the Titus API.
|
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,
org.springframework.retry.support.RetryTemplate retryTemplate,
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,
com.netflix.genie.common.internal.tracing.brave.BraveTracingComponents tracingComponents,
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,
org.springframework.retry.support.RetryTemplate retryTemplate,
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,
com.netflix.genie.common.internal.tracing.brave.BraveTracingComponents tracingComponents,
org.springframework.core.env.Environment environment,
io.micrometer.core.instrument.MeterRegistry registry)
restTemplate - the rest templateretryTemplate - The RetryTemplate to use when making Titus API callsjobRequestAdapter - 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 propertiestracingComponents - The BraveTracingComponents instance to use for distributed tracingenvironment - 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