LiJie20190102 commented on code in PR #10133:
URL: https://github.com/apache/seatunnel/pull/10133#discussion_r2588663709
##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/dag/physical/PhysicalPlan.java:
##########
@@ -300,7 +316,7 @@ public void makeJobFailing(Throwable e) {
updateJobState(JobStatus.FAILING);
}
- public void startJob() {
+ public synchronized void startJob() {
isRunning = true;
log.info("{} state process is start", getJobFullName());
updateJobState(JobStatus.SCHEDULED);
Review Comment:
If `synchronized` is added here, I noticed that `synchronized` is used in
all calls to the `stateProcess` method. Can the `stateProcess` method remove
`synchronized`?
##########
seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/event/JobStateEventTest.java:
##########
@@ -35,10 +35,10 @@
import static
org.apache.seatunnel.engine.server.checkpoint.CheckpointErrorRestoreEndTest.STREAM_CONF_WITH_ERROR_PATH;
import static org.awaitility.Awaitility.await;
-public class JobStateEventTest extends AbstractSeaTunnelServerTest {
+class JobStateEventTest extends AbstractSeaTunnelServerTest {
Review Comment:
Why remove `public`
##########
seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/event/JobStateEventTest.java:
##########
@@ -35,10 +35,10 @@
import static
org.apache.seatunnel.engine.server.checkpoint.CheckpointErrorRestoreEndTest.STREAM_CONF_WITH_ERROR_PATH;
import static org.awaitility.Awaitility.await;
-public class JobStateEventTest extends AbstractSeaTunnelServerTest {
+class JobStateEventTest extends AbstractSeaTunnelServerTest {
@Test
- public void testJobStateEvent() throws InterruptedException {
+ void testJobStateEvent() {
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]