@Configuration
public class ServicesConfig
extends java.lang.Object
| Constructor and Description |
|---|
ServicesConfig() |
| Modifier and Type | Method and Description |
|---|---|
com.netflix.genie.core.services.ApplicationService |
applicationService(com.netflix.genie.core.jpa.repositories.JpaApplicationRepository applicationRepo,
com.netflix.genie.core.jpa.repositories.JpaCommandRepository commandRepo)
Get JPA based implementation of the ApplicationService.
|
com.netflix.genie.core.services.AttachmentService |
attachmentService(com.netflix.genie.core.properties.JobsProperties jobsProperties)
The attachment service to use.
|
com.netflix.genie.core.services.impl.GenieFileTransferService |
cacheGenieFileTransferService(com.netflix.genie.core.services.FileTransferFactory fileTransferFactory,
java.lang.String baseCacheLocation,
com.netflix.genie.core.services.impl.LocalFileTransferImpl localFileTransfer,
com.netflix.spectator.api.Registry registry)
Get an instance of the Cache Genie File Transfer service.
|
com.netflix.genie.core.services.ClusterLoadBalancer |
clusterLoadBalancer()
Get a Randomized Cluster load balancer.
|
com.netflix.genie.core.services.ClusterService |
clusterService(com.netflix.genie.core.jpa.repositories.JpaClusterRepository clusterRepo,
com.netflix.genie.core.jpa.repositories.JpaCommandRepository commandRepo)
Get JPA based implementation of the ClusterService.
|
com.netflix.genie.core.services.CommandService |
commandService(com.netflix.genie.core.jpa.repositories.JpaCommandRepository commandRepo,
com.netflix.genie.core.jpa.repositories.JpaApplicationRepository appRepo,
com.netflix.genie.core.jpa.repositories.JpaClusterRepository clusterRepo)
Get JPA based implementation of the CommandService.
|
org.springframework.beans.factory.FactoryBean |
fileTransferFactory()
FileTransfer factory.
|
com.netflix.genie.core.services.impl.GenieFileTransferService |
genieFileTransferService(com.netflix.genie.core.services.FileTransferFactory fileTransferFactory)
Get an instance of the Genie File Transfer service.
|
com.netflix.genie.core.services.MailService |
getDefaultMailServiceImpl()
Get an default implementation of the Mail Service interface if nothing is supplied.
|
com.netflix.genie.core.services.MailService |
getJavaMailSenderMailService(org.springframework.mail.javamail.JavaMailSender javaMailSender,
java.lang.String fromAddress)
Returns a bean for mail service impl using the Spring Mail.
|
com.netflix.genie.core.services.JobCoordinatorService |
jobCoordinatorService(com.netflix.genie.core.services.JobPersistenceService jobPersistenceService,
com.netflix.genie.core.services.JobKillService jobKillService,
com.netflix.genie.core.services.JobStateService jobStateService,
com.netflix.genie.core.services.JobSearchService jobSearchService,
com.netflix.genie.core.properties.JobsProperties jobsProperties,
com.netflix.genie.core.services.ApplicationService applicationService,
com.netflix.genie.core.services.ClusterService clusterService,
com.netflix.genie.core.services.CommandService commandService,
java.util.List<com.netflix.genie.core.services.ClusterLoadBalancer> clusterLoadBalancers,
com.netflix.spectator.api.Registry registry,
java.lang.String hostName)
Get an instance of the JobCoordinatorService.
|
com.netflix.genie.core.services.JobKillService |
jobKillService(java.lang.String hostName,
com.netflix.genie.core.services.JobSearchService jobSearchService,
org.apache.commons.exec.Executor executor,
com.netflix.genie.core.properties.JobsProperties jobsProperties,
org.springframework.context.ApplicationEventPublisher eventPublisher,
org.springframework.core.io.Resource genieWorkingDir,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Get an local implementation of the JobKillService.
|
com.netflix.genie.core.services.JobPersistenceService |
jobPersistenceService(com.netflix.genie.core.jpa.repositories.JpaJobRepository jobRepo,
com.netflix.genie.core.jpa.repositories.JpaJobRequestRepository jobRequestRepo,
com.netflix.genie.core.jpa.repositories.JpaJobMetadataRepository jobMetadataRepository,
com.netflix.genie.core.jpa.repositories.JpaJobExecutionRepository jobExecutionRepo,
com.netflix.genie.core.jpa.repositories.JpaApplicationRepository applicationRepo,
com.netflix.genie.core.jpa.repositories.JpaClusterRepository clusterRepo,
com.netflix.genie.core.jpa.repositories.JpaCommandRepository commandRepo)
Get JPA based implementation of the JobPersistenceService.
|
com.netflix.genie.core.services.JobSearchService |
jobSearchService(com.netflix.genie.core.jpa.repositories.JpaJobRepository jobRepository,
com.netflix.genie.core.jpa.repositories.JpaJobRequestRepository jobRequestRepository,
com.netflix.genie.core.jpa.repositories.JpaJobExecutionRepository jobExecutionRepository,
com.netflix.genie.core.jpa.repositories.JpaClusterRepository clusterRepository,
com.netflix.genie.core.jpa.repositories.JpaCommandRepository commandRepository)
Get JPA based implementation of the JobSearchService.
|
com.netflix.genie.core.services.JobSubmitterService |
jobSubmitterService(com.netflix.genie.core.services.JobPersistenceService jobPersistenceService,
org.springframework.context.ApplicationEventPublisher eventPublisher,
org.springframework.context.event.ApplicationEventMulticaster eventMulticaster,
java.util.List<com.netflix.genie.core.jobs.workflow.WorkflowTask> workflowTasks,
org.springframework.core.io.Resource genieWorkingDir,
com.netflix.spectator.api.Registry registry)
Get a implementation of the JobSubmitterService that runs jobs locally.
|
@Bean
@ConditionalOnProperty(value="spring.mail.host")
public com.netflix.genie.core.services.MailService getJavaMailSenderMailService(org.springframework.mail.javamail.JavaMailSender javaMailSender,
@Value(value="${genie.mail.fromAddress}")
java.lang.String fromAddress)
javaMailSender - An implementation of the JavaMailSender interface.fromAddress - The from email address for the email.@Bean @ConditionalOnMissingBean public com.netflix.genie.core.services.MailService getDefaultMailServiceImpl()
@Bean
public com.netflix.genie.core.services.ApplicationService applicationService(com.netflix.genie.core.jpa.repositories.JpaApplicationRepository applicationRepo,
com.netflix.genie.core.jpa.repositories.JpaCommandRepository commandRepo)
applicationRepo - The application repository to use.commandRepo - The command repository to use.@Bean
public com.netflix.genie.core.services.ClusterService clusterService(com.netflix.genie.core.jpa.repositories.JpaClusterRepository clusterRepo,
com.netflix.genie.core.jpa.repositories.JpaCommandRepository commandRepo)
clusterRepo - The cluster repository to use.commandRepo - The command repository to use.@Bean
public com.netflix.genie.core.services.CommandService commandService(com.netflix.genie.core.jpa.repositories.JpaCommandRepository commandRepo,
com.netflix.genie.core.jpa.repositories.JpaApplicationRepository appRepo,
com.netflix.genie.core.jpa.repositories.JpaClusterRepository clusterRepo)
commandRepo - the command repository to useappRepo - the application repository to useclusterRepo - the cluster repository to use@Bean
public com.netflix.genie.core.services.JobSearchService jobSearchService(com.netflix.genie.core.jpa.repositories.JpaJobRepository jobRepository,
com.netflix.genie.core.jpa.repositories.JpaJobRequestRepository jobRequestRepository,
com.netflix.genie.core.jpa.repositories.JpaJobExecutionRepository jobExecutionRepository,
com.netflix.genie.core.jpa.repositories.JpaClusterRepository clusterRepository,
com.netflix.genie.core.jpa.repositories.JpaCommandRepository commandRepository)
jobRepository - The repository to use for job entitiesjobRequestRepository - The repository to use for job request entitiesjobExecutionRepository - The repository to use for job execution entitiesclusterRepository - The repository to use for cluster entitiescommandRepository - The repository to use for command entities@Bean
public com.netflix.genie.core.services.JobPersistenceService jobPersistenceService(com.netflix.genie.core.jpa.repositories.JpaJobRepository jobRepo,
com.netflix.genie.core.jpa.repositories.JpaJobRequestRepository jobRequestRepo,
com.netflix.genie.core.jpa.repositories.JpaJobMetadataRepository jobMetadataRepository,
com.netflix.genie.core.jpa.repositories.JpaJobExecutionRepository jobExecutionRepo,
com.netflix.genie.core.jpa.repositories.JpaApplicationRepository applicationRepo,
com.netflix.genie.core.jpa.repositories.JpaClusterRepository clusterRepo,
com.netflix.genie.core.jpa.repositories.JpaCommandRepository commandRepo)
jobRepo - The job repository to usejobRequestRepo - The job request repository to usejobMetadataRepository - The job metadata repository to usejobExecutionRepo - The job execution repository to useapplicationRepo - The application repository to useclusterRepo - The cluster repository to usecommandRepo - The command repository to use@Bean
public com.netflix.genie.core.services.JobKillService jobKillService(java.lang.String hostName,
com.netflix.genie.core.services.JobSearchService jobSearchService,
org.apache.commons.exec.Executor executor,
com.netflix.genie.core.properties.JobsProperties jobsProperties,
org.springframework.context.ApplicationEventPublisher eventPublisher,
@Qualifier(value="jobsDir")
org.springframework.core.io.Resource genieWorkingDir,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
hostName - The name of the host this Genie node is running on.jobSearchService - The job search service to use to locate job information.executor - The executor to use to run system processes.jobsProperties - The jobs properties to useeventPublisher - The application event publisher to use to publish system wide eventsgenieWorkingDir - Working directory for genie where it creates jobs directories.objectMapper - The Jackson ObjectMapper used to serialize from/to JSON@Bean public com.netflix.genie.core.services.ClusterLoadBalancer clusterLoadBalancer()
@Bean
public com.netflix.genie.core.services.impl.GenieFileTransferService genieFileTransferService(com.netflix.genie.core.services.FileTransferFactory fileTransferFactory)
throws com.netflix.genie.common.exceptions.GenieException
fileTransferFactory - file transfer implementation factorycom.netflix.genie.common.exceptions.GenieException - If there is any problem@Bean
public com.netflix.genie.core.services.impl.GenieFileTransferService cacheGenieFileTransferService(com.netflix.genie.core.services.FileTransferFactory fileTransferFactory,
@Value(value="${genie.file.cache.location}")
java.lang.String baseCacheLocation,
com.netflix.genie.core.services.impl.LocalFileTransferImpl localFileTransfer,
com.netflix.spectator.api.Registry registry)
throws com.netflix.genie.common.exceptions.GenieException
fileTransferFactory - file transfer implementation factorybaseCacheLocation - file cache locationlocalFileTransfer - local file transfer serviceregistry - Registrycom.netflix.genie.common.exceptions.GenieException - If there is any problem@Bean
public com.netflix.genie.core.services.JobSubmitterService jobSubmitterService(com.netflix.genie.core.services.JobPersistenceService jobPersistenceService,
org.springframework.context.ApplicationEventPublisher eventPublisher,
org.springframework.context.event.ApplicationEventMulticaster eventMulticaster,
java.util.List<com.netflix.genie.core.jobs.workflow.WorkflowTask> workflowTasks,
@Qualifier(value="jobsDir")
org.springframework.core.io.Resource genieWorkingDir,
com.netflix.spectator.api.Registry registry)
jobPersistenceService - Implementation of the job persistence service.eventPublisher - Instance of the synchronous event publisher.eventMulticaster - Instance of the asynchronous event publisher.workflowTasks - List of all the workflow tasks to be executed.genieWorkingDir - Working directory for genie where it creates jobs directories.registry - The metrics registry to use@Bean
public com.netflix.genie.core.services.JobCoordinatorService jobCoordinatorService(com.netflix.genie.core.services.JobPersistenceService jobPersistenceService,
com.netflix.genie.core.services.JobKillService jobKillService,
@Qualifier(value="jobMonitoringCoordinator")
com.netflix.genie.core.services.JobStateService jobStateService,
com.netflix.genie.core.services.JobSearchService jobSearchService,
com.netflix.genie.core.properties.JobsProperties jobsProperties,
com.netflix.genie.core.services.ApplicationService applicationService,
com.netflix.genie.core.services.ClusterService clusterService,
com.netflix.genie.core.services.CommandService commandService,
java.util.List<com.netflix.genie.core.services.ClusterLoadBalancer> clusterLoadBalancers,
com.netflix.spectator.api.Registry registry,
java.lang.String hostName)
jobPersistenceService - implementation of job persistence service interfacejobKillService - The job kill service to usejobStateService - The running job metrics service to usejobSearchService - Implementation of job search service interfacejobsProperties - The jobs properties to useapplicationService - Implementation of application service interfaceclusterService - Implementation of cluster service interfacecommandService - Implementation of command service interfaceclusterLoadBalancers - Implementations of the cluster load balancer interface in invocation orderregistry - The metrics registry to usehostName - The host this Genie instance is running on@Bean public com.netflix.genie.core.services.AttachmentService attachmentService(com.netflix.genie.core.properties.JobsProperties jobsProperties)
jobsProperties - All properties related to jobs@Bean public org.springframework.beans.factory.FactoryBean fileTransferFactory()