Skip to content

Commit 86384b5

Browse files
committed
[Fix][Zeta] Signal extends Serializable
1 parent 4a36239 commit 86384b5

2 files changed

Lines changed: 10 additions & 22 deletions

File tree

seatunnel-api/src/main/java/org/apache/seatunnel/api/signal/FlushSignal.java

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717

1818
package org.apache.seatunnel.api.signal;
1919

20+
import lombok.Getter;
21+
import lombok.RequiredArgsConstructor;
22+
import lombok.ToString;
23+
24+
@Getter
25+
@RequiredArgsConstructor
26+
@ToString
2027
public final class FlushSignal implements Signal {
2128

2229
private final long jobId;
@@ -26,25 +33,4 @@ public final class FlushSignal implements Signal {
2633
public static FlushSignal of(long jobId, long taskId) {
2734
return new FlushSignal(jobId, taskId, System.currentTimeMillis());
2835
}
29-
30-
public FlushSignal(long jobId, long taskId, long createdTime) {
31-
this.jobId = jobId;
32-
this.taskId = taskId;
33-
this.createdTime = createdTime;
34-
}
35-
36-
@Override
37-
public long getJobId() {
38-
return jobId;
39-
}
40-
41-
@Override
42-
public long getTaskId() {
43-
return taskId;
44-
}
45-
46-
@Override
47-
public long getCreatedTime() {
48-
return createdTime;
49-
}
5036
}

seatunnel-api/src/main/java/org/apache/seatunnel/api/signal/Signal.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.apache.seatunnel.api.signal;
1919

20+
import java.io.Serializable;
21+
2022
/**
2123
* Interface for control-plane signals that the engine propagates through the data flow.
2224
*
@@ -37,7 +39,7 @@
3739
* <p>Concrete signals should be small and immutable. New signal types are added by introducing new
3840
* implementations of this interface; the engine routes them by type via {@code instanceof}.
3941
*/
40-
public interface Signal {
42+
public interface Signal extends Serializable {
4143

4244
/** @return the id of the job that created this signal. */
4345
long getJobId();

0 commit comments

Comments
 (0)