refactor(executor-manager): 修改service命名避免冲突
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
Reference in New Issue
Block a user