Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor][Admin] Change dependency implementation to dependency interface #3105

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dinky-admin/src/main/java/org/dinky/service/TaskService.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.dinky.explainer.lineage.LineageResult;
import org.dinky.gateway.enums.SavePointType;
import org.dinky.gateway.result.SavePointResult;
import org.dinky.job.JobConfig;
import org.dinky.job.JobResult;
import org.dinky.mybatis.service.ISuperService;

Expand Down Expand Up @@ -281,4 +282,11 @@ public interface TaskService extends ISuperService<Task> {
* @return A {@link LineageResult} object representing the found task lineage.
*/
LineageResult getTaskLineage(Integer id);

/**
* Build the job submit config with the given task
* @param task
* @return
*/
JobConfig buildJobSubmitConfig(TaskDTO task);
}
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public JobResult executeJob(TaskDTO task, Boolean stream) throws Exception {
return jobResult;
}

// Submit and export task
@Override
@ProcessStep(type = ProcessStepType.SUBMIT_BUILD_CONFIG)
public JobConfig buildJobSubmitConfig(TaskDTO task) {
if (Asserts.isNull(task.getType())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.dinky.gateway.enums.GatewayType;
import org.dinky.job.JobManager;
import org.dinky.job.JobResult;
import org.dinky.service.TaskService;
import org.dinky.service.impl.TaskServiceImpl;

import java.util.List;
Expand Down Expand Up @@ -69,7 +70,7 @@ public boolean stop() {
}

protected JobManager getJobManager() {
TaskServiceImpl taskService = SpringUtil.getBean(TaskServiceImpl.class);
TaskService taskService = SpringUtil.getBean(TaskServiceImpl.class);
return JobManager.build(taskService.buildJobSubmitConfig(task));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.dinky.gateway.enums.GatewayType;
import org.dinky.job.JobManager;
import org.dinky.job.JobResult;
import org.dinky.service.TaskService;
import org.dinky.service.impl.TaskServiceImpl;
import org.dinky.utils.JsonUtils;

Expand Down Expand Up @@ -68,7 +69,7 @@ public JobResult execute() throws Exception {
}

protected JobManager getJobManager() {
TaskServiceImpl taskService = SpringUtil.getBean(TaskServiceImpl.class);
TaskService taskService = SpringUtil.getBean(TaskServiceImpl.class);
return JobManager.build(taskService.buildJobSubmitConfig(task));
}

Expand Down
Loading