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.ObjectConfiguration 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 ArchivedJobServiceImplarchivedJobService(DataServices dataServices, org.springframework.core.io.ResourceLoader resourceLoader, io.micrometer.core.instrument.MeterRegistry meterRegistry)Provide aArchivedJobServiceimplementation if one hasn't been provided already.AttachmentServiceattachmentService(S3ClientFactory s3ClientFactory, AttachmentServiceProperties attachmentServiceProperties, io.micrometer.core.instrument.MeterRegistry meterRegistry)The attachment service to use.JobDirectoryServerServiceImpljobDirectoryServerService(org.springframework.core.io.ResourceLoader resourceLoader, DataServices dataServices, AgentFileStreamService agentFileStreamService, ArchivedJobService archivedJobService, io.micrometer.core.instrument.MeterRegistry meterRegistry, AgentRoutingService agentRoutingService)Provide the default implementation ofJobDirectoryServerServicefor serving job directory resources.JobLaunchServiceImpljobLaunchService(DataServices dataServices, JobResolverService jobResolverService, AgentLauncherSelector agentLauncherSelector, BraveTracingComponents tracingComponents, io.micrometer.core.instrument.MeterRegistry registry)Provide aJobLaunchServiceimplementation if one isn't available.JobResolverServiceImpljobResolverService(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 ofJobResolverServiceif one hasn't already been defined.JobsPropertiesjobsProperties(JobsForwardingProperties forwarding, JobsLocationsProperties locations, JobsMemoryProperties memory, JobsUsersProperties users, JobsActiveLimitProperties activeLimit)Collection of properties related to job execution.RequestForwardingServiceImplrequestForwardingService(org.springframework.web.client.RestTemplate genieRestTemplate, GenieHostInfo hostInfo, JobsForwardingProperties jobsForwardingProperties)Provide a default implementation ofRequestForwardingServicefor 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
JobsPropertiesinstance
-
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 ofJobResolverServiceif one hasn't already been defined.- Parameters:
dataServices- TheDataServicesencapsulation instance to useclusterSelectors- TheClusterSelectorimplementations to usecommandSelector- TheCommandSelectorimplementation to useregistry- The metrics repository to usejobsProperties- The properties for running a job set by the userenvironment- The Spring applicationEnvironmentfor dynamic property resolutiontracingComponents- TheBraveTracingComponentsto use- Returns:
- A
JobResolverServiceImplinstance
-
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 ofJobDirectoryServerServicefor serving job directory resources.- Parameters:
resourceLoader- The application resource loader used to get references to resourcesdataServices- TheDataServicesinstance to useagentFileStreamService- The service to request a file from an agent running a jobarchivedJobService- TheArchivedJobServiceimplementation 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 aJobLaunchServiceimplementation if one isn't available.- Parameters:
dataServices- TheDataServicesinstance to usejobResolverService- TheJobResolverServiceimplementation to useagentLauncherSelector- TheAgentLauncherSelectorimplementation to usetracingComponents- TheBraveTracingComponentsinstance to useregistry- The metrics registry to use- Returns:
- A
JobLaunchServiceImplinstance
-
archivedJobService
@Bean @ConditionalOnMissingBean(ArchivedJobService.class) public ArchivedJobServiceImpl archivedJobService(DataServices dataServices, org.springframework.core.io.ResourceLoader resourceLoader, io.micrometer.core.instrument.MeterRegistry meterRegistry)
Provide aArchivedJobServiceimplementation if one hasn't been provided already.- Parameters:
dataServices- TheDataServicesinstance to useresourceLoader- TheResourceLoaderto usemeterRegistry- TheMeterRegistryimplementation to use- Returns:
- A
ArchivedJobServiceImplinstance
-
requestForwardingService
@Bean @ConditionalOnMissingBean(RequestForwardingService.class) public RequestForwardingServiceImpl requestForwardingService(@Qualifier("genieRestTemplate") org.springframework.web.client.RestTemplate genieRestTemplate, GenieHostInfo hostInfo, JobsForwardingProperties jobsForwardingProperties)
Provide a default implementation ofRequestForwardingServicefor use by other services.- Parameters:
genieRestTemplate- TheRestTemplateconfigured to be used to call other Genie nodeshostInfo- TheGenieHostInfoinstance containing introspection information about the current nodejobsForwardingProperties- The properties for forwarding requests between Genie nodes- Returns:
- A
RequestForwardingServiceImplinstance
-
-