diff --git a/service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/controller/TaskController.java b/service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/controller/ExecutorTaskController.java similarity index 82% rename from service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/controller/TaskController.java rename to service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/controller/ExecutorTaskController.java index 417989e..3ce8b0d 100644 --- a/service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/controller/TaskController.java +++ b/service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/controller/ExecutorTaskController.java @@ -1,7 +1,7 @@ package com.lanyuanxiaoyao.service.executor.manager.controller; import cn.hutool.core.util.StrUtil; -import com.lanyuanxiaoyao.service.executor.manager.service.TaskService; +import com.lanyuanxiaoyao.service.executor.manager.service.ExecutorTaskService; import java.io.IOException; import org.eclipse.collections.api.list.ImmutableList; import org.slf4j.Logger; @@ -17,13 +17,13 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController @RequestMapping("task") -public class TaskController { - private static final Logger logger = LoggerFactory.getLogger(TaskController.class); +public class ExecutorTaskController { + private static final Logger logger = LoggerFactory.getLogger(ExecutorTaskController.class); - private final TaskService taskService; + private final ExecutorTaskService executorTaskService; - public TaskController(TaskService taskService) { - this.taskService = taskService; + public ExecutorTaskController(ExecutorTaskService executorTaskService) { + this.executorTaskService = executorTaskService; } @GetMapping("scan") @@ -48,7 +48,7 @@ public class TaskController { if ((scanLog || scanBase) && StrUtil.isBlank(hdfs)) { throw new RuntimeException("Hdfs path cannot be empty"); } - return taskService.scanAvro(key, hdfs, pulsar, pulsarTopic, scanSource, scanQueue, scanLog, scanBase, scanTarget); + return executorTaskService.scanAvro(key, hdfs, pulsar, pulsarTopic, scanSource, scanQueue, scanLog, scanBase, scanTarget); } @GetMapping("results") @@ -56,6 +56,6 @@ public class TaskController { @RequestParam("task_id") String taskId, @RequestParam(value = "limit", defaultValue = "1000") Integer limit ) throws IOException { - return taskService.taskResult(taskId, limit); + return executorTaskService.taskResult(taskId, limit); } } diff --git a/service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/service/TaskService.java b/service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/service/ExecutorTaskService.java similarity index 97% rename from service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/service/TaskService.java rename to service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/service/ExecutorTaskService.java index 659793f..4611a9f 100644 --- a/service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/service/TaskService.java +++ b/service-executor/service-executor-manager/src/main/java/com/lanyuanxiaoyao/service/executor/manager/service/ExecutorTaskService.java @@ -46,14 +46,14 @@ import static com.eshore.odcp.hudi.connector.Constants.MINUTE; * @date 2024-01-10 */ @Service -public class TaskService { - private static final Logger logger = LoggerFactory.getLogger(TaskService.class); +public class ExecutorTaskService { + private static final Logger logger = LoggerFactory.getLogger(ExecutorTaskService.class); private final HadoopConfiguration hadoopConfiguration; private final ExecutorConfiguration executorConfiguration; private final ObjectMapper mapper; - public TaskService(HadoopConfiguration hadoopConfiguration, ExecutorConfiguration executorConfiguration, Jackson2ObjectMapperBuilder builder) { + public ExecutorTaskService(HadoopConfiguration hadoopConfiguration, ExecutorConfiguration executorConfiguration, Jackson2ObjectMapperBuilder builder) { this.hadoopConfiguration = hadoopConfiguration; this.executorConfiguration = executorConfiguration; this.mapper = builder.build();