Skip to content

Commit

Permalink
fix(apache#4085): CheckPoint Failure Options dose not take effect
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaows08 committed Sep 29, 2024
1 parent fd116a1 commit 308f4ee
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@

package org.apache.streampark.console.core.metrics.flink;

import org.apache.streampark.console.core.enums.CheckPointStatus;
import org.apache.streampark.console.core.enums.CheckPointType;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
import org.apache.streampark.console.core.enums.CheckPointStatus;
import org.apache.streampark.console.core.enums.CheckPointType;

import java.io.Serializable;
import java.util.ArrayList;
Expand Down Expand Up @@ -98,6 +97,7 @@ public String getPath() {
public static class Latest implements Serializable {
private CheckPoint completed;
private CheckPoint savepoint;
private CheckPoint failed;

@JsonIgnore
public List<CheckPoint> getLatestCheckpoint() {
Expand All @@ -108,6 +108,13 @@ public List<CheckPoint> getLatestCheckpoint() {
if (savepoint != null) {
checkPoints.add(savepoint);
}
if (failed != null) {
if (completed == null) {
checkPoints.add(failed);
} else {
if (failed.getId() > completed.getId()) checkPoints.add(failed);
}
}
return checkPoints;
}
}
Expand Down

0 comments on commit 308f4ee

Please sign in to comment.