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 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 a DownloadCommand.
      Parameters:
      downloadCommandArguments - The download command arguments to use
      downloadService - 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 use
      cacheArguments - The cache arguments to use
      jobRequestArguments - The job request arguments to use
      cleanupArguments - The cleanup arguments to use
      runtimeConfigurationArguments - 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 an ExecCommand.
      Parameters:
      execCommandArguments - The exec command arguments to use
      jobExecutionStateMachine - The job execution state machine instance to use
      killService - The kill service to use
      agentProperties - 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 main GenieAgentRunner entry point bean which implements CommandLineRunner.
      Parameters:
      argumentParser - The argument parser to use
      commandFactory - The command factory to use
      tracingComponents - The BraveTracingComponents to use
      environment - 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 for HeartBeatCommand.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 a HeartBeatCommand.
      Parameters:
      heartBeatCommandArguments - The heart beat command arguments to use
      agentHeartBeatService - 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 of HelpCommand.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 of HelpCommand.
      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 of InfoCommand.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 an InfoCommand.
      Parameters:
      infoCommandArguments - The info command arguments to use
      configurableApplicationContext - The Spring context to use
      agentMetadata - 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 a MainCommandArguments.
      Returns:
      An instance of MainCommandArguments.
    • jobRequestArguments

      @Bean public com.netflix.genie.agent.cli.JobRequestArgumentsImpl jobRequestArguments(com.netflix.genie.agent.cli.MainCommandArguments mainCommandArguments)
      Parameters:
      mainCommandArguments - container for the main arguments
      Returns:
      An instance of ArgumentDelegates.JobRequestArguments
    • jobRequestConverter

      @Bean @Lazy public JobRequestConverter jobRequestConverter(jakarta.validation.Validator validator)
      Provide an instance of JobRequestConverter.
      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 a PingCommand.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 a PingCommand.
      Parameters:
      pingCommandArguments - The ping command arguments to use
      pingServiceFutureStub - The gRPC future stub to use
      agentMetadata - 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 type ResolveJobSpecCommand.ResolveJobSpecCommandArguments.
      Parameters:
      serverArguments - The server arguments to use
      jobRequestArguments - 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 a ResolveJobSpecCommand.
      Parameters:
      resolveJobSpecCommandArguments - The resolve job spec arguments to use
      agentJobService - The agent job service to use
      jobRequestConverter - The job request converter to use
      Returns:
      A ResolveJobSpecCommand instance
    • serverArguments

      @Bean public com.netflix.genie.agent.cli.ServerArgumentsImpl serverArguments()
      Returns:
      A ServerArgumentsImpl instance
    • cleanupArguments

      @Bean public com.netflix.genie.agent.cli.CleanupArgumentsImpl 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 an AgentLogManager implementation that can relocate the agent log file created by log4j2.
      Returns:
      the log4j2 implementation of AgentLogManager