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

[Improve][feature] Add JobInstance Delete #161

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Jetiaime
Copy link

@Jetiaime Jetiaime commented Apr 10, 2024

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

@@ -71,11 +71,12 @@
<guava.version>19.0</guava.version>
<checker.qual.version>3.10.0</checker.qual.version>
<awaitility.version>4.2.0</awaitility.version>
<seatunnel-framework.version>2.3.3</seatunnel-framework.version>
<seatunnel-framework.version>2.3.4</seatunnel-framework.version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as seatunnel 2.3.5 is released, can you pls update seatunnel verstion to 2.3.5

@arshadmohammad
Copy link

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

throw new SeatunnelException(SeatunnelErrorEnum.ILLEGAL_STATE, e.getMessage());
}
@PostMapping("/execute")
@ApiOperation(value = "Execute synchronization tasks", httpMethod = "Post")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

httpMethod = "Post" should be changed to httpMethod = "POST"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants