seatunnel-web
seatunnel-web copied to clipboard
[Improve][feature] Add JobInstance Delete
Purpose of this pull request
This PR adds the JobExecutor Delete functions.
It work like this: If the Job haven't been completed, cancel it in the engine, and then delete the restored conf file if it existed. Then delete it in the db.
I just simplely remove the record from db, and cancel the job in the engine, so it will not be removed if the record has been write into the sink. And I add some helpful functions like isCompelete
, jobStorePath
for simplify the code. The Metric Part is been repeated, I think there are some elegant ways to rewrite it.
It's my first pr, please feel free to comment and give me some suggestion or advices.
Check list
- [ ] Code changed are covered with tests, or it does not need tests for reason:
- [x] If any new Jar binary package adding in your PR, please add License Notice according New License Guide
- [x] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
Many modified files have format voilations. [ERROR] Violations also present in: [ERROR] src/main/java/org/apache/seatunnel/app/controller/JobExecutorController.java [ERROR] src/main/java/org/apache/seatunnel/app/service/impl/TableSchemaServiceImpl.java [ERROR] src/main/java/org/apache/seatunnel/app/service/impl/JobExecutorServiceImpl.java [ERROR] src/main/java/org/apache/seatunnel/app/service/impl/JobInstanceServiceImpl.java [ERROR] src/main/java/org/apache/seatunnel/app/service/impl/JobMetricsServiceImpl.java [ERROR] src/main/java/org/apache/seatunnel/app/service/IJobInstanceService.java [ERROR] src/main/java/org/apache/seatunnel/app/thirdparty/framework/PluginDiscoveryUtil.java [ERROR] src/main/java/org/apache/seatunnel/app/thirdparty/engine/SeaTunnelEngineProxy.java [ERROR] Run 'mvn spotless:apply' to fix these violations
@Jetiaime are you still working on this PR? can you please rebase this PR with latest code