Class ServicesAutoConfiguration
- java.lang.Object
-
- com.netflix.genie.web.spring.autoconfigure.services.ServicesAutoConfiguration
-
@Configuration @EnableConfigurationProperties({JobsForwardingProperties.class,JobsLocationsProperties.class,JobsMemoryProperties.class,JobsUsersProperties.class,JobsActiveLimitProperties.class,AttachmentServiceProperties.class}) public class ServicesAutoConfiguration extends java.lang.Object
Configuration for all the services.- Since:
- 3.0.0
-
-
Constructor Summary
Constructors Constructor Description ServicesAutoConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArchivedJobServiceImpl
archivedJobService(DataServices dataServices, org.springframework.core.io.ResourceLoader resourceLoader, io.micrometer.core.instrument.MeterRegistry meterRegistry)
Provide aArchivedJobService
implementation if one hasn't been provided already.AttachmentService
attachmentService(S3ClientFactory s3ClientFactory, AttachmentServiceProperties attachmentServiceProperties, io.micrometer.core.instrument.MeterRegistry meterRegistry)
The attachment service to use.JobDirectoryServerServiceImpl
jobDirectoryServerService(org.springframework.core.io.ResourceLoader resourceLoader, DataServices dataServices, AgentFileStreamService agentFileStreamService, ArchivedJobService archivedJobService, io.micrometer.core.instrument.MeterRegistry meterRegistry, AgentRoutingService agentRoutingService)
Provide the default implementation ofJobDirectoryServerService
for serving job directory resources.JobLaunchServiceImpl
jobLaunchService(DataServices dataServices, JobResolverService jobResolverService, AgentLauncherSelector agentLauncherSelector, BraveTracingComponents tracingComponents, io.micrometer.core.instrument.MeterRegistry registry)
Provide aJobLaunchService
implementation if one isn't available.JobResolverServiceImpl
jobResolverService(DataServices dataServices, @NotEmpty java.util.List<ClusterSelector> clusterSelectors, CommandSelector commandSelector, io.micrometer.core.instrument.MeterRegistry registry, JobsProperties jobsProperties, org.springframework.core.env.Environment environment, BraveTracingComponents tracingComponents)
Get an implementation ofJobResolverService
if one hasn't already been defined.JobsProperties
jobsProperties(JobsForwardingProperties forwarding, JobsLocationsProperties locations, JobsMemoryProperties memory, JobsUsersProperties users, JobsActiveLimitProperties activeLimit)
Collection of properties related to job execution.RequestForwardingServiceImpl
requestForwardingService(org.springframework.web.client.RestTemplate genieRestTemplate, GenieHostInfo hostInfo, JobsForwardingProperties jobsForwardingProperties)
Provide a default implementation ofRequestForwardingService
for use by other services.
-
-
-
Method Detail
-
jobsProperties
@Bean public JobsProperties jobsProperties(JobsForwardingProperties forwarding, JobsLocationsProperties locations, JobsMemoryProperties memory, JobsUsersProperties users, JobsActiveLimitProperties activeLimit)
Collection of properties related to job execution.- Parameters:
forwarding
- forwarding propertieslocations
- locations propertiesmemory
- memory propertiesusers
- users propertiesactiveLimit
- active limit properties- Returns:
- a
JobsProperties
instance
-
attachmentService
@Bean @ConditionalOnMissingBean(AttachmentService.class) public AttachmentService attachmentService(S3ClientFactory s3ClientFactory, AttachmentServiceProperties attachmentServiceProperties, io.micrometer.core.instrument.MeterRegistry meterRegistry) throws java.io.IOException
The attachment service to use.- Parameters:
s3ClientFactory
- the S3 client factoryattachmentServiceProperties
- the service propertiesmeterRegistry
- the meter registry- Returns:
- The attachment service to use
- Throws:
java.io.IOException
- if the local filesystem implmentation is used and it fails to initialize
-
jobResolverService
@Bean @ConditionalOnMissingBean(JobResolverService.class) public JobResolverServiceImpl jobResolverService(DataServices dataServices, @NotEmpty @NotEmpty java.util.List<ClusterSelector> clusterSelectors, CommandSelector commandSelector, io.micrometer.core.instrument.MeterRegistry registry, JobsProperties jobsProperties, org.springframework.core.env.Environment environment, BraveTracingComponents tracingComponents)
Get an implementation ofJobResolverService
if one hasn't already been defined.- Parameters:
dataServices
- TheDataServices
encapsulation instance to useclusterSelectors
- TheClusterSelector
implementations to usecommandSelector
- TheCommandSelector
implementation to useregistry
- The metrics repository to usejobsProperties
- The properties for running a job set by the userenvironment
- The Spring applicationEnvironment
for dynamic property resolutiontracingComponents
- TheBraveTracingComponents
to use- Returns:
- A
JobResolverServiceImpl
instance
-
jobDirectoryServerService
@Bean @ConditionalOnMissingBean(JobDirectoryServerService.class) public JobDirectoryServerServiceImpl jobDirectoryServerService(org.springframework.core.io.ResourceLoader resourceLoader, DataServices dataServices, AgentFileStreamService agentFileStreamService, ArchivedJobService archivedJobService, io.micrometer.core.instrument.MeterRegistry meterRegistry, AgentRoutingService agentRoutingService)
Provide the default implementation ofJobDirectoryServerService
for serving job directory resources.- Parameters:
resourceLoader
- The application resource loader used to get references to resourcesdataServices
- TheDataServices
instance to useagentFileStreamService
- The service to request a file from an agent running a jobarchivedJobService
- TheArchivedJobService
implementation to use to get archived job datameterRegistry
- The meter registry used to keep track of metricsagentRoutingService
- The agent routing service- Returns:
- An instance of
JobDirectoryServerServiceImpl
-
jobLaunchService
@Bean @ConditionalOnMissingBean(JobLaunchService.class) public JobLaunchServiceImpl jobLaunchService(DataServices dataServices, JobResolverService jobResolverService, AgentLauncherSelector agentLauncherSelector, BraveTracingComponents tracingComponents, io.micrometer.core.instrument.MeterRegistry registry)
Provide aJobLaunchService
implementation if one isn't available.- Parameters:
dataServices
- TheDataServices
instance to usejobResolverService
- TheJobResolverService
implementation to useagentLauncherSelector
- TheAgentLauncherSelector
implementation to usetracingComponents
- TheBraveTracingComponents
instance to useregistry
- The metrics registry to use- Returns:
- A
JobLaunchServiceImpl
instance
-
archivedJobService
@Bean @ConditionalOnMissingBean(ArchivedJobService.class) public ArchivedJobServiceImpl archivedJobService(DataServices dataServices, org.springframework.core.io.ResourceLoader resourceLoader, io.micrometer.core.instrument.MeterRegistry meterRegistry)
Provide aArchivedJobService
implementation if one hasn't been provided already.- Parameters:
dataServices
- TheDataServices
instance to useresourceLoader
- TheResourceLoader
to usemeterRegistry
- TheMeterRegistry
implementation to use- Returns:
- A
ArchivedJobServiceImpl
instance
-
requestForwardingService
@Bean @ConditionalOnMissingBean(RequestForwardingService.class) public RequestForwardingServiceImpl requestForwardingService(@Qualifier("genieRestTemplate") org.springframework.web.client.RestTemplate genieRestTemplate, GenieHostInfo hostInfo, JobsForwardingProperties jobsForwardingProperties)
Provide a default implementation ofRequestForwardingService
for use by other services.- Parameters:
genieRestTemplate
- TheRestTemplate
configured to be used to call other Genie nodeshostInfo
- TheGenieHostInfo
instance containing introspection information about the current nodejobsForwardingProperties
- The properties for forwarding requests between Genie nodes- Returns:
- A
RequestForwardingServiceImpl
instance
-
-