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.Healthhealth()Optional<com.fasterxml.jackson.databind.JsonNode>launchAgent(@Valid ResolvedJob resolvedJob, com.fasterxml.jackson.databind.JsonNode requestedLauncherExt) Launch an agent to execute the givenResolvedJobinformation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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- TheGenieWebHostInfoinstancerpcInfo- TheGenieWebRpcInfoinstancedataServices- TheDataServicesencapsulation instance to uselauncherProperties- The properties from the configuration that control agent behaviorexecutorFactory- AExecutorFactoryto createExecutorinstancestracingComponents- TheBraveTracingComponentsinstance 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 givenResolvedJobinformation.- Specified by:
launchAgentin interfaceAgentLauncher- Parameters:
resolvedJob- TheResolvedJobinformation for the agent to act onrequestedLauncherExt- The launcher requested extension, or null- Returns:
- an optional
JsonNodewith 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:
healthin interfaceorg.springframework.boot.actuate.health.HealthIndicator
-