Class LocalAgentLauncherImpl
java.lang.Object
com.netflix.genie.web.agent.launchers.impl.LocalAgentLauncherImpl
- All Implemented Interfaces:
AgentLauncher
,org.springframework.boot.actuate.health.HealthContributor
,org.springframework.boot.actuate.health.HealthIndicator
Implementation of
AgentLauncher
which launched Agent instances on the local Genie hardware.- Since:
- 4.0.0
-
Field Summary
Fields inherited from interface com.netflix.genie.web.agent.launchers.AgentLauncher
LAUNCH_TIMER, LAUNCHER_CLASS_EXT_FIELD, LAUNCHER_CLASS_KEY, SOURCE_HOST_EXT_FIELD
-
Constructor Summary
ConstructorsConstructorDescriptionLocalAgentLauncherImpl
(GenieWebHostInfo hostInfo, GenieWebRpcInfo rpcInfo, DataServices dataServices, LocalAgentLauncherProperties launcherProperties, ExecutorFactory executorFactory, BraveTracingComponents tracingComponents, io.micrometer.core.instrument.MeterRegistry registry) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.boot.actuate.health.Health
health()
Optional<com.fasterxml.jackson.databind.JsonNode>
launchAgent
(@Valid ResolvedJob resolvedJob, com.fasterxml.jackson.databind.JsonNode requestedLauncherExt) Launch an agent to execute the givenResolvedJob
information.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.boot.actuate.health.HealthIndicator
getHealth
-
Constructor Details
-
LocalAgentLauncherImpl
public LocalAgentLauncherImpl(GenieWebHostInfo hostInfo, GenieWebRpcInfo rpcInfo, DataServices dataServices, LocalAgentLauncherProperties launcherProperties, ExecutorFactory executorFactory, BraveTracingComponents tracingComponents, io.micrometer.core.instrument.MeterRegistry registry) Constructor.- Parameters:
hostInfo
- TheGenieWebHostInfo
instancerpcInfo
- TheGenieWebRpcInfo
instancedataServices
- TheDataServices
encapsulation instance to uselauncherProperties
- The properties from the configuration that control agent behaviorexecutorFactory
- AExecutorFactory
to createExecutor
instancestracingComponents
- TheBraveTracingComponents
instance to useregistry
- Metrics repository
-
-
Method Details
-
launchAgent
public Optional<com.fasterxml.jackson.databind.JsonNode> launchAgent(@Valid @Valid ResolvedJob resolvedJob, @Nullable com.fasterxml.jackson.databind.JsonNode requestedLauncherExt) throws AgentLaunchException Launch an agent to execute the givenResolvedJob
information.- Specified by:
launchAgent
in interfaceAgentLauncher
- Parameters:
resolvedJob
- TheResolvedJob
information for the agent to act onrequestedLauncherExt
- The launcher requested extension, or null- Returns:
- an optional
JsonNode
with the launcher context about the launched job - Throws:
AgentLaunchException
- For any error launching an Agent instance to run the job
-
health
public org.springframework.boot.actuate.health.Health health()- Specified by:
health
in interfaceorg.springframework.boot.actuate.health.HealthIndicator
-