Package com.netflix.genie.agent.cli
Class CliAutoConfiguration
java.lang.Object
com.netflix.genie.agent.cli.CliAutoConfiguration
@Configuration
@EnableConfigurationProperties(AgentProperties.class)
public class CliAutoConfiguration
extends Object
Spring auto configuration class to contain all beans involved in the CLI for the Agent.
- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProvide anAgentLogManager
implementation that can relocate the agent log file created by log4j2.com.netflix.genie.agent.cli.CacheArgumentsImpl
Provide a bean for cache command line arguments.com.netflix.genie.agent.cli.CleanupArgumentsImpl
Provide aArgumentDelegates.CleanupArguments
.com.netflix.genie.agent.cli.DownloadCommand
downloadCommand
(com.netflix.genie.agent.cli.DownloadCommand.DownloadCommandArguments downloadCommandArguments, DownloadService downloadService) Provide a lazy bean definition for aDownloadCommand
.com.netflix.genie.agent.cli.DownloadCommand.DownloadCommandArguments
downloadCommandArguments
(ArgumentDelegates.CacheArguments cacheArguments) Provide a bean for arguments for a download command.com.netflix.genie.agent.cli.ExecCommand
execCommand
(com.netflix.genie.agent.cli.ExecCommand.ExecCommandArguments execCommandArguments, JobExecutionStateMachine jobExecutionStateMachine, KillService killService, AgentProperties agentProperties) Provide a lazy bean definition for anExecCommand
.com.netflix.genie.agent.cli.ExecCommand.ExecCommandArguments
execCommandArguments
(ArgumentDelegates.ServerArguments serverArguments, ArgumentDelegates.CacheArguments cacheArguments, ArgumentDelegates.JobRequestArguments jobRequestArguments, ArgumentDelegates.CleanupArguments cleanupArguments, ArgumentDelegates.RuntimeConfigurationArguments runtimeConfigurationArguments) Provide a bean for execution command arguments.genieAgentRunner
(com.netflix.genie.agent.cli.ArgumentParser argumentParser, com.netflix.genie.agent.cli.CommandFactory commandFactory, BraveTracingComponents tracingComponents, org.springframework.core.env.Environment environment) The mainGenieAgentRunner
entry point bean which implementsCommandLineRunner
.com.netflix.genie.agent.cli.HeartBeatCommand
heartBeatCommand
(com.netflix.genie.agent.cli.HeartBeatCommand.HeartBeatCommandArguments heartBeatCommandArguments, AgentHeartBeatService agentHeartBeatService) Provide a lazy bean definition for aHeartBeatCommand
.com.netflix.genie.agent.cli.HeartBeatCommand.HeartBeatCommandArguments
heartBeatCommandArguments
(ArgumentDelegates.ServerArguments serverArguments) Provide a bean forHeartBeatCommand.HeartBeatCommandArguments
.com.netflix.genie.agent.cli.HelpCommand
helpCommand
(com.netflix.genie.agent.cli.ArgumentParser argumentParser) Provide a lazy bean instance ofHelpCommand
.com.netflix.genie.agent.cli.HelpCommand.HelpCommandArguments
Provide an bean ofHelpCommand.HelpCommandArguments
.com.netflix.genie.agent.cli.InfoCommand
infoCommand
(com.netflix.genie.agent.cli.InfoCommand.InfoCommandArguments infoCommandArguments, org.springframework.context.ConfigurableApplicationContext configurableApplicationContext, AgentMetadata agentMetadata) Provide a lazy bean definition for anInfoCommand
.com.netflix.genie.agent.cli.InfoCommand.InfoCommandArguments
Provide an instance ofInfoCommand.InfoCommandArguments
.com.netflix.genie.agent.cli.JobRequestArgumentsImpl
jobRequestArguments
(com.netflix.genie.agent.cli.MainCommandArguments mainCommandArguments) Provide aArgumentDelegates.JobRequestArguments
.jobRequestConverter
(jakarta.validation.Validator validator) Provide an instance ofJobRequestConverter
.com.netflix.genie.agent.cli.MainCommandArguments
Provide aMainCommandArguments
.com.netflix.genie.agent.cli.PingCommand
pingCommand
(com.netflix.genie.agent.cli.PingCommand.PingCommandArguments pingCommandArguments, com.netflix.genie.proto.PingServiceGrpc.PingServiceFutureStub pingServiceFutureStub, AgentMetadata agentMetadata) Provide a lazy bean for aPingCommand
.com.netflix.genie.agent.cli.PingCommand.PingCommandArguments
pingCommandArguments
(ArgumentDelegates.ServerArguments serverArguments) Provides aPingCommand.PingCommandArguments
bean.com.netflix.genie.agent.cli.ResolveJobSpecCommand
resolveJobSpecCommand
(com.netflix.genie.agent.cli.ResolveJobSpecCommand.ResolveJobSpecCommandArguments resolveJobSpecCommandArguments, AgentJobService agentJobService, JobRequestConverter jobRequestConverter) Provide a lazy bean definition for aResolveJobSpecCommand
.com.netflix.genie.agent.cli.ResolveJobSpecCommand.ResolveJobSpecCommandArguments
resolveJobSpecCommandArguments
(ArgumentDelegates.ServerArguments serverArguments, ArgumentDelegates.JobRequestArguments jobRequestArguments) Provide a bean of typeResolveJobSpecCommand.ResolveJobSpecCommandArguments
.com.netflix.genie.agent.cli.RuntimeConfigurationArgumentsImpl
com.netflix.genie.agent.cli.ServerArgumentsImpl
Provide aArgumentDelegates.ServerArguments
.
-
Constructor Details
-
CliAutoConfiguration
public CliAutoConfiguration()
-
-
Method Details
-
cacheArgumentsDelegate
@Bean public com.netflix.genie.agent.cli.CacheArgumentsImpl cacheArgumentsDelegate()Provide a bean for cache command line arguments.- Returns:
- a
CacheArgumentsImpl
instance
-
downloadCommandArguments
@Bean public com.netflix.genie.agent.cli.DownloadCommand.DownloadCommandArguments downloadCommandArguments(ArgumentDelegates.CacheArguments cacheArguments) Provide a bean for arguments for a download command.- Parameters:
cacheArguments
- Any arguments that were provided for the cache of this agent instance- Returns:
- An instance of
DownloadCommand.DownloadCommandArguments
-
downloadCommand
@Bean @Lazy public com.netflix.genie.agent.cli.DownloadCommand downloadCommand(com.netflix.genie.agent.cli.DownloadCommand.DownloadCommandArguments downloadCommandArguments, DownloadService downloadService) Provide a lazy bean definition for aDownloadCommand
.- Parameters:
downloadCommandArguments
- The download command arguments to usedownloadService
- The download service to use- Returns:
- An instance of
DownloadCommand
-
execCommandArguments
@Bean public com.netflix.genie.agent.cli.ExecCommand.ExecCommandArguments execCommandArguments(ArgumentDelegates.ServerArguments serverArguments, ArgumentDelegates.CacheArguments cacheArguments, ArgumentDelegates.JobRequestArguments jobRequestArguments, ArgumentDelegates.CleanupArguments cleanupArguments, ArgumentDelegates.RuntimeConfigurationArguments runtimeConfigurationArguments) Provide a bean for execution command arguments.- Parameters:
serverArguments
- The server arguments to usecacheArguments
- The cache arguments to usejobRequestArguments
- The job request arguments to usecleanupArguments
- The cleanup arguments to useruntimeConfigurationArguments
- the runtime configuration arguments group- Returns:
- An instance of
ExecCommand.ExecCommandArguments
-
execCommand
@Bean @Lazy public com.netflix.genie.agent.cli.ExecCommand execCommand(com.netflix.genie.agent.cli.ExecCommand.ExecCommandArguments execCommandArguments, JobExecutionStateMachine jobExecutionStateMachine, KillService killService, AgentProperties agentProperties) Provide a lazy bean definition for anExecCommand
.- Parameters:
execCommandArguments
- The exec command arguments to usejobExecutionStateMachine
- The job execution state machine instance to usekillService
- The kill service to useagentProperties
- The agent properties- Returns:
- A bean definition for an
ExecCommand
if one hasn't already been defined
-
genieAgentRunner
@Bean public GenieAgentRunner genieAgentRunner(com.netflix.genie.agent.cli.ArgumentParser argumentParser, com.netflix.genie.agent.cli.CommandFactory commandFactory, BraveTracingComponents tracingComponents, org.springframework.core.env.Environment environment) The mainGenieAgentRunner
entry point bean which implementsCommandLineRunner
.- Parameters:
argumentParser
- The argument parser to usecommandFactory
- The command factory to usetracingComponents
- TheBraveTracingComponents
to useenvironment
- The spring environment- Returns:
- An instance of
GenieAgentRunner
if one hasn't already been provided
-
heartBeatCommandArguments
@Bean public com.netflix.genie.agent.cli.HeartBeatCommand.HeartBeatCommandArguments heartBeatCommandArguments(ArgumentDelegates.ServerArguments serverArguments) Provide a bean forHeartBeatCommand.HeartBeatCommandArguments
.- Parameters:
serverArguments
- The server arguments to use- Returns:
- An instance of
HeartBeatCommand.HeartBeatCommandArguments
-
heartBeatCommand
@Bean @Lazy public com.netflix.genie.agent.cli.HeartBeatCommand heartBeatCommand(com.netflix.genie.agent.cli.HeartBeatCommand.HeartBeatCommandArguments heartBeatCommandArguments, AgentHeartBeatService agentHeartBeatService) Provide a lazy bean definition for aHeartBeatCommand
.- Parameters:
heartBeatCommandArguments
- The heart beat command arguments to useagentHeartBeatService
- The heart beat service to use- Returns:
- An instance of
HeartBeatCommand
-
helpCommandArguments
@Bean public com.netflix.genie.agent.cli.HelpCommand.HelpCommandArguments helpCommandArguments()Provide an bean ofHelpCommand.HelpCommandArguments
.- Returns:
- An instance of
HelpCommand.HelpCommandArguments
-
helpCommand
@Bean @Lazy public com.netflix.genie.agent.cli.HelpCommand helpCommand(com.netflix.genie.agent.cli.ArgumentParser argumentParser) Provide a lazy bean instance ofHelpCommand
.- Parameters:
argumentParser
- The argument parser to use- Returns:
- The
HelpCommand
instance
-
infoCommandArguments
@Bean public com.netflix.genie.agent.cli.InfoCommand.InfoCommandArguments infoCommandArguments()Provide an instance ofInfoCommand.InfoCommandArguments
.- Returns:
- An
InfoCommand.InfoCommandArguments
instance
-
infoCommand
@Bean @Lazy public com.netflix.genie.agent.cli.InfoCommand infoCommand(com.netflix.genie.agent.cli.InfoCommand.InfoCommandArguments infoCommandArguments, org.springframework.context.ConfigurableApplicationContext configurableApplicationContext, AgentMetadata agentMetadata) Provide a lazy bean definition for anInfoCommand
.- Parameters:
infoCommandArguments
- The info command arguments to useconfigurableApplicationContext
- The Spring context to useagentMetadata
- The agent metadata to use- Returns:
- A lazy bean definition for an
InfoCommand
instance
-
mainCommandArguments
@Bean public com.netflix.genie.agent.cli.MainCommandArguments mainCommandArguments()Provide aMainCommandArguments
.- Returns:
- An instance of
MainCommandArguments
.
-
jobRequestArguments
@Bean public com.netflix.genie.agent.cli.JobRequestArgumentsImpl jobRequestArguments(com.netflix.genie.agent.cli.MainCommandArguments mainCommandArguments) Provide aArgumentDelegates.JobRequestArguments
.- Parameters:
mainCommandArguments
- container for the main arguments- Returns:
- An instance of
ArgumentDelegates.JobRequestArguments
-
jobRequestConverter
Provide an instance ofJobRequestConverter
.- Parameters:
validator
- The validator to use- Returns:
- A
JobRequestConverter
instance
-
pingCommandArguments
@Bean public com.netflix.genie.agent.cli.PingCommand.PingCommandArguments pingCommandArguments(ArgumentDelegates.ServerArguments serverArguments) Provides aPingCommand.PingCommandArguments
bean.- Parameters:
serverArguments
- The server arguments to use- Returns:
- A
PingCommand.PingCommandArguments
instance
-
pingCommand
@Bean @Lazy public com.netflix.genie.agent.cli.PingCommand pingCommand(com.netflix.genie.agent.cli.PingCommand.PingCommandArguments pingCommandArguments, com.netflix.genie.proto.PingServiceGrpc.PingServiceFutureStub pingServiceFutureStub, AgentMetadata agentMetadata) Provide a lazy bean for aPingCommand
.- Parameters:
pingCommandArguments
- The ping command arguments to usepingServiceFutureStub
- The gRPC future stub to useagentMetadata
- The agent metadata to use- Returns:
- A
PingCommand
instance
-
resolveJobSpecCommandArguments
@Bean public com.netflix.genie.agent.cli.ResolveJobSpecCommand.ResolveJobSpecCommandArguments resolveJobSpecCommandArguments(ArgumentDelegates.ServerArguments serverArguments, ArgumentDelegates.JobRequestArguments jobRequestArguments) Provide a bean of typeResolveJobSpecCommand.ResolveJobSpecCommandArguments
.- Parameters:
serverArguments
- The server arguments to usejobRequestArguments
- The job request arguments to use- Returns:
- An instance of
ResolveJobSpecCommand.ResolveJobSpecCommandArguments
-
resolveJobSpecCommand
@Bean @Lazy public com.netflix.genie.agent.cli.ResolveJobSpecCommand resolveJobSpecCommand(com.netflix.genie.agent.cli.ResolveJobSpecCommand.ResolveJobSpecCommandArguments resolveJobSpecCommandArguments, AgentJobService agentJobService, JobRequestConverter jobRequestConverter) Provide a lazy bean definition for aResolveJobSpecCommand
.- Parameters:
resolveJobSpecCommandArguments
- The resolve job spec arguments to useagentJobService
- The agent job service to usejobRequestConverter
- The job request converter to use- Returns:
- A
ResolveJobSpecCommand
instance
-
serverArguments
@Bean public com.netflix.genie.agent.cli.ServerArgumentsImpl serverArguments()Provide aArgumentDelegates.ServerArguments
.- Returns:
- A
ServerArgumentsImpl
instance
-
cleanupArguments
@Bean public com.netflix.genie.agent.cli.CleanupArgumentsImpl cleanupArguments()Provide aArgumentDelegates.CleanupArguments
.- Returns:
- A
CleanupArgumentsImpl
instance
-
runtimeConfigurationArguments
@Bean public com.netflix.genie.agent.cli.RuntimeConfigurationArgumentsImpl runtimeConfigurationArguments()- Returns:
- A
RuntimeConfigurationArgumentsImpl
instance
-
agentLogManagerLog4j2
@Bean @ConditionalOnClass(name="org.apache.logging.log4j.core.LoggerContext") @ConditionalOnMissingBean(AgentLogManager.class) public AgentLogManagerLog4j2Impl agentLogManagerLog4j2()Provide anAgentLogManager
implementation that can relocate the agent log file created by log4j2.- Returns:
- the log4j2 implementation of
AgentLogManager
-