Skip to content

Commit

Permalink
Move DataflowTaskExplorer and associated classes to server core (#5754)
Browse files Browse the repository at this point in the history
* Remove aggregate-task module
* Rename CompositeTaskExplorer to DataflowTaskExplorer
  • Loading branch information
cppwfs committed Mar 28, 2024
1 parent 346507a commit da89b69
Show file tree
Hide file tree
Showing 44 changed files with 127 additions and 257 deletions.
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
<module>spring-cloud-dataflow-configuration-metadata</module>
<module>spring-cloud-dataflow-core-dsl</module>
<module>spring-cloud-dataflow-core</module>
<module>spring-cloud-dataflow-aggregate-task</module>
<module>spring-cloud-dataflow-server-core</module>
<module>spring-cloud-dataflow-rest-resource</module>
<module>spring-cloud-dataflow-audit</module>
Expand Down
10 changes: 0 additions & 10 deletions spring-cloud-dataflow-aggregate-task/README.adoc

This file was deleted.

107 changes: 0 additions & 107 deletions spring-cloud-dataflow-aggregate-task/pom.xml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.cloud.dataflow.composite.task.DataflowTaskExecutionQueryDao;
import org.springframework.cloud.dataflow.composite.task.TaskDefinitionReader;
import org.springframework.cloud.dataflow.composite.task.TaskDeploymentReader;
import org.springframework.cloud.dataflow.server.task.DataflowTaskExecutionQueryDao;
import org.springframework.cloud.dataflow.server.task.TaskDefinitionReader;
import org.springframework.cloud.dataflow.server.task.TaskDeploymentReader;
import org.springframework.cloud.dataflow.registry.service.AppRegistryService;
import org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryConnectionProperties;
import org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryDeployerAutoConfiguration;
Expand Down
5 changes: 0 additions & 5 deletions spring-cloud-dataflow-server-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-micrometer</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dataflow-aggregate-task</artifactId>
<version>${dataflow.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dataflow-common-flyway</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
import org.springframework.cloud.dataflow.server.job.LauncherRepository;
import org.springframework.cloud.dataflow.server.repository.StreamDefinitionRepository;
import org.springframework.cloud.dataflow.server.repository.TaskDefinitionRepository;
import org.springframework.cloud.dataflow.composite.task.CompositeTaskExplorer;
import org.springframework.cloud.dataflow.server.task.DataflowTaskExplorer;
import org.springframework.cloud.dataflow.server.service.LauncherService;
import org.springframework.cloud.dataflow.server.service.SchedulerService;
import org.springframework.cloud.dataflow.server.service.SpringSecurityAuditorAware;
Expand Down Expand Up @@ -131,7 +131,6 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.core.env.PropertyResolver;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.hateoas.mediatype.MessageResolver;
Expand Down Expand Up @@ -269,7 +268,7 @@ public static class TaskEnabledConfiguration {

@Bean
public TaskExecutionController taskExecutionController(
CompositeTaskExplorer explorer,
DataflowTaskExplorer explorer,
TaskExecutionService taskExecutionService,
TaskDefinitionRepository taskDefinitionRepository,
TaskExecutionInfoService taskExecutionInfoService,
Expand All @@ -295,14 +294,14 @@ public TaskPlatformController taskLauncherController(LauncherService launcherSer
public TaskDefinitionAssemblerProvider taskDefinitionAssemblerProvider(
TaskExecutionService taskExecutionService,
TaskJobService taskJobService,
CompositeTaskExplorer taskExplorer
DataflowTaskExplorer taskExplorer
) {
return new DefaultTaskDefinitionAssemblerProvider(taskExecutionService, taskJobService, taskExplorer);
}

@Bean
public TaskDefinitionController taskDefinitionController(
CompositeTaskExplorer taskExplorer,
DataflowTaskExplorer taskExplorer,
TaskDefinitionRepository repository,
TaskSaveService taskSaveService,
TaskDeleteService taskDeleteService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.springframework.boot.autoconfigure.batch.BatchProperties;
import org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.dataflow.composite.task.CompositeTaskConfiguration;
import org.springframework.cloud.dataflow.server.task.DataflowTaskConfiguration;
import org.springframework.cloud.dataflow.audit.service.AuditRecordService;
import org.springframework.cloud.dataflow.completion.CompletionConfiguration;
import org.springframework.cloud.dataflow.registry.repository.AppRegistrationRepositoryCustom;
Expand Down Expand Up @@ -65,7 +65,7 @@
FeaturesConfiguration.class,
WebConfiguration.class,
H2ServerConfiguration.class,
CompositeTaskConfiguration.class,
DataflowTaskConfiguration.class,
DataFlowTaskConfiguration.class
})
@EnableConfigurationProperties({ BatchProperties.class, CommonApplicationProperties.class })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.cloud.dataflow.composite.task.TaskDefinitionReader;
import org.springframework.cloud.dataflow.composite.task.TaskDeploymentReader;
import org.springframework.cloud.dataflow.server.task.TaskDefinitionReader;
import org.springframework.cloud.dataflow.server.task.TaskDeploymentReader;
import org.springframework.cloud.dataflow.core.database.support.MultiSchemaIncrementerFactory;
import org.springframework.cloud.dataflow.server.batch.AllInOneExecutionContextSerializer;
import org.springframework.cloud.dataflow.server.batch.JdbcSearchableJobExecutionDao;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.common.security.core.support.OAuth2TokenUtilsService;
import org.springframework.cloud.dataflow.composite.task.CompositeTaskConfiguration;
import org.springframework.cloud.dataflow.composite.task.CompositeTaskExplorer;
import org.springframework.cloud.dataflow.composite.task.DataflowTaskExecutionQueryDao;
import org.springframework.cloud.dataflow.composite.task.TaskDefinitionReader;
import org.springframework.cloud.dataflow.composite.task.TaskDeploymentReader;
import org.springframework.cloud.dataflow.composite.task.impl.DefaultDataFlowTaskExecutionQueryDao;
import org.springframework.cloud.dataflow.server.task.DataflowTaskConfiguration;
import org.springframework.cloud.dataflow.server.task.DataflowTaskExplorer;
import org.springframework.cloud.dataflow.server.task.DataflowTaskExecutionQueryDao;
import org.springframework.cloud.dataflow.server.task.TaskDefinitionReader;
import org.springframework.cloud.dataflow.server.task.TaskDeploymentReader;
import org.springframework.cloud.dataflow.server.task.impl.DefaultDataFlowTaskExecutionQueryDao;
import org.springframework.cloud.dataflow.audit.service.AuditRecordService;
import org.springframework.cloud.dataflow.configuration.metadata.ApplicationConfigurationMetadataResolver;
import org.springframework.cloud.dataflow.core.TaskPlatform;
Expand Down Expand Up @@ -103,7 +103,7 @@
@EnableTransactionManagement
@Import({
TaskConfiguration.TaskDeleteServiceConfig.class,
CompositeTaskConfiguration.class,
DataflowTaskConfiguration.class,
DataFlowTaskConfiguration.class
})
public class TaskConfiguration {
Expand Down Expand Up @@ -171,7 +171,7 @@ public TaskPlatform localTaskPlatform(
@Bean
public TaskExecutionInfoService taskDefinitionRetriever(
AppRegistryService registry,
CompositeTaskExplorer taskExplorer,
DataflowTaskExplorer taskExplorer,
TaskDefinitionRepository taskDefinitionRepository,
TaskConfigurationProperties taskConfigurationProperties,
LauncherRepository launcherRepository,
Expand Down Expand Up @@ -234,7 +234,7 @@ public TaskExecutionService taskService(
TaskDefinitionRepository taskDefinitionRepository,
TaskExecutionCreationService taskExecutionRepositoryService,
TaskAppDeploymentRequestCreator taskAppDeploymentRequestCreator,
CompositeTaskExplorer taskExplorer,
DataflowTaskExplorer taskExplorer,
DataflowTaskExecutionDao dataflowTaskExecutionDao,
DataflowTaskExecutionMetadataDao dataflowTaskExecutionMetadataDao,
DataflowTaskExecutionQueryDao dataflowTaskExecutionQueryDao,
Expand Down Expand Up @@ -269,7 +269,7 @@ public static class TaskJobServiceConfig {
@Bean
public TaskJobService taskJobExecutionRepository(
JobService service,
CompositeTaskExplorer taskExplorer,
DataflowTaskExplorer taskExplorer,
TaskDefinitionRepository taskDefinitionRepository,
TaskExecutionService taskExecutionService,
LauncherRepository launcherRepository) {
Expand All @@ -287,7 +287,7 @@ public TaskJobService taskJobExecutionRepository(
public static class TaskDeleteServiceConfig {
@Bean
public TaskDeleteService deleteTaskService(
CompositeTaskExplorer taskExplorer,
DataflowTaskExplorer taskExplorer,
LauncherRepository launcherRepository,
TaskDefinitionRepository taskDefinitionRepository,
TaskDeploymentRepository taskDeploymentRepository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.springframework.cloud.dataflow.server.repository.NoSuchTaskDefinitionException;
import org.springframework.cloud.dataflow.server.repository.TaskDefinitionRepository;
import org.springframework.cloud.dataflow.server.repository.TaskQueryParamException;
import org.springframework.cloud.dataflow.composite.task.CompositeTaskExplorer;
import org.springframework.cloud.dataflow.server.task.DataflowTaskExplorer;
import org.springframework.cloud.dataflow.server.service.TaskDeleteService;
import org.springframework.cloud.dataflow.server.service.TaskSaveService;
import org.springframework.cloud.dataflow.server.service.impl.TaskServiceUtils;
Expand Down Expand Up @@ -78,7 +78,7 @@ public class TaskDefinitionController {

private final TaskDeleteService taskDeleteService;

private final CompositeTaskExplorer explorer;
private final DataflowTaskExplorer explorer;

private final TaskDefinitionAssemblerProvider<? extends TaskDefinitionResource> taskDefinitionAssemblerProvider;

Expand All @@ -95,9 +95,9 @@ public class TaskDefinitionController {
* @param taskDeleteService handles Task deletion related operations.
* @param taskDefinitionAssemblerProvider the task definition assembler provider to use.
*/
public TaskDefinitionController(CompositeTaskExplorer taskExplorer, TaskDefinitionRepository repository,
TaskSaveService taskSaveService, TaskDeleteService taskDeleteService,
TaskDefinitionAssemblerProvider<? extends TaskDefinitionResource> taskDefinitionAssemblerProvider) {
public TaskDefinitionController(DataflowTaskExplorer taskExplorer, TaskDefinitionRepository repository,
TaskSaveService taskSaveService, TaskDeleteService taskDeleteService,
TaskDefinitionAssemblerProvider<? extends TaskDefinitionResource> taskDefinitionAssemblerProvider) {
Assert.notNull(taskExplorer, "taskExplorer must not be null");
Assert.notNull(repository, "repository must not be null");
Assert.notNull(taskSaveService, "taskSaveService must not be null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.slf4j.LoggerFactory;

import org.springframework.batch.core.launch.NoSuchJobExecutionException;
import org.springframework.cloud.dataflow.composite.task.CompositeTaskExplorer;
import org.springframework.cloud.dataflow.server.task.DataflowTaskExplorer;
import org.springframework.cloud.dataflow.core.LaunchResponse;
import org.springframework.cloud.dataflow.core.PlatformTaskExecutionInformation;
import org.springframework.cloud.dataflow.core.TaskDefinition;
Expand Down Expand Up @@ -102,7 +102,7 @@ public class TaskExecutionController {

private final TaskDeleteService taskDeleteService;

private final CompositeTaskExplorer explorer;
private final DataflowTaskExplorer explorer;

private final TaskJobService taskJobService;

Expand Down Expand Up @@ -131,7 +131,7 @@ public class TaskExecutionController {
* @param taskDeleteService the task deletion service
* @param taskJobService the task job service
*/
public TaskExecutionController(CompositeTaskExplorer explorer,
public TaskExecutionController(DataflowTaskExplorer explorer,
TaskExecutionService taskExecutionService,
TaskDefinitionRepository taskDefinitionRepository,
TaskExecutionInfoService taskExecutionInfoService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.springframework.cloud.dataflow.rest.util.TaskSanitizer;
import org.springframework.cloud.dataflow.server.controller.TaskDefinitionController;
import org.springframework.cloud.dataflow.server.controller.support.TaskExecutionAwareTaskDefinition;
import org.springframework.cloud.dataflow.composite.task.CompositeTaskExplorer;
import org.springframework.cloud.dataflow.server.task.DataflowTaskExplorer;
import org.springframework.cloud.dataflow.server.service.TaskExecutionService;
import org.springframework.cloud.dataflow.server.service.TaskJobService;
import org.springframework.cloud.dataflow.server.service.impl.TaskServiceUtils;
Expand All @@ -57,7 +57,7 @@ public class DefaultTaskDefinitionAssembler<R extends TaskDefinitionResource> ex

private final TaskJobService taskJobService;

private final CompositeTaskExplorer taskExplorer;
private final DataflowTaskExplorer taskExplorer;

private final TaskSanitizer taskSanitizer = new TaskSanitizer();

Expand All @@ -71,7 +71,7 @@ public DefaultTaskDefinitionAssembler(
boolean enableManifest,
Class<R> classType,
TaskJobService taskJobService,
CompositeTaskExplorer taskExplorer) {
DataflowTaskExplorer taskExplorer) {
super(TaskDefinitionController.class, classType);
this.taskExecutionService = taskExecutionService;
this.enableManifest = enableManifest;
Expand Down
Loading

0 comments on commit da89b69

Please sign in to comment.