Skip to content

Commit 73915e7

Browse files
committed
Revert "Capture initial JobStatus"
This reverts commit a63cd554e25a14f69adee3501d249a4129fa619f.
1 parent a7b8b52 commit 73915e7

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/DefaultExecutionGraph.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,15 +1648,6 @@ public void updateAccumulators(AccumulatorSnapshot accumulatorSnapshot) {
16481648
public void registerJobStatusListener(JobStatusListener listener) {
16491649
if (listener != null) {
16501650
jobStatusListeners.add(listener);
1651-
// Emit current state to the newly registered listener
1652-
// This ensures listeners don't miss the initial state
1653-
try {
1654-
listener.jobStatusChanges(getJobID(), state, stateTimestamps[state.ordinal()]);
1655-
} catch (Throwable t) {
1656-
LOG.warn(
1657-
"Error while notifying newly registered JobStatusListener of current state",
1658-
t);
1659-
}
16601651
}
16611652
}
16621653

flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,8 +1706,7 @@ void testJobFailureWhenGracefulTaskExecutorTermination() throws Exception {
17061706
.equals(event.getName()))
17071707
.map(Event::getAttributes)
17081708
.map(x -> x.get("newJobStatus")))
1709-
.containsExactly(
1710-
JobStatus.CREATED.toString(),
1709+
.containsSubsequence(
17111710
JobStatus.RUNNING.toString(),
17121711
JobStatus.FAILING.toString(),
17131712
JobStatus.FAILED.toString());
@@ -1748,8 +1747,7 @@ void testJobFailureWhenTaskExecutorHeartbeatTimeout() throws Exception {
17481747
.equals(event.getName()))
17491748
.map(Event::getAttributes)
17501749
.map(x -> x.get("newJobStatus")))
1751-
.containsExactly(
1752-
JobStatus.CREATED.toString(),
1750+
.containsSubsequence(
17531751
JobStatus.RUNNING.toString(),
17541752
JobStatus.FAILING.toString(),
17551753
JobStatus.FAILED.toString());

0 commit comments

Comments
 (0)