Skip to content

Commit 865163d

Browse files
authored
[Improve][Zeta] Checkpoint exception status messages exclude state data (apache#5547)
1 parent f73b372 commit 865163d

File tree

3 files changed

+8
-2
lines changed
  • seatunnel-engine/seatunnel-engine-storage
    • checkpoint-storage-api/src/main/java/org/apache/seatunnel/engine/checkpoint/storage
    • checkpoint-storage-plugins/checkpoint-storage-hdfs/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/hdfs

3 files changed

+8
-2
lines changed

release-note.md

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
- [Zeta] Cancel pipeline add retry to avoid cancel failed. (#4792)
140140
- [Zeta] Improve Zeta operation max count and ignore NPE (#4787)
141141
- [Zeta] Remove serialize(deserialize) cost when use shuffle action (#4722)
142+
- [zeta] Checkpoint exception status messages exclude state data (#5547)
142143

143144
## Feature
144145

seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-api/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/PipelineState.java

+2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222

2323
import lombok.Builder;
2424
import lombok.Data;
25+
import lombok.ToString;
2526

2627
@Data
2728
@Builder
29+
@ToString(exclude = "states")
2830
public class PipelineState {
2931

3032
private String jobId;

seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-hdfs/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/hdfs/HdfsStorage.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public String storeCheckPoint(PipelineState state) throws CheckpointStorageExcep
8888
datas = serializeCheckPointData(state);
8989
} catch (IOException e) {
9090
throw new CheckpointStorageException(
91-
"Failed to serialize checkpoint data,state is :" + state, e);
91+
String.format("Failed to serialize checkpoint data, state: %s", state), e);
9292
}
9393
Path filePath =
9494
new Path(
@@ -108,7 +108,10 @@ public String storeCheckPoint(PipelineState state) throws CheckpointStorageExcep
108108
out.write(datas);
109109
} catch (IOException e) {
110110
throw new CheckpointStorageException(
111-
"Failed to write checkpoint data, state: " + state, e);
111+
String.format(
112+
"Failed to write checkpoint data, file: %s, state: %s",
113+
tmpFilePath, state),
114+
e);
112115
}
113116
try {
114117
boolean success = fs.rename(tmpFilePath, filePath);

0 commit comments

Comments
 (0)