Skip to content

Commit 327a98f

Browse files
authored
[FLINK-24088][streaming] Log FlinkJobNotFoundException in debug instead of warn level in CollectResultFetcher for a cleaner log
This closes apache#17093
1 parent 73bb9d3 commit 327a98f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/collect/CollectResultFetcher.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.apache.flink.core.execution.JobClient;
2727
import org.apache.flink.runtime.dispatcher.UnavailableDispatcherOperationException;
2828
import org.apache.flink.runtime.jobgraph.OperatorID;
29+
import org.apache.flink.runtime.messages.FlinkJobNotFoundException;
2930
import org.apache.flink.runtime.operators.coordination.CoordinationRequestGateway;
3031
import org.apache.flink.util.ExceptionUtils;
3132
import org.apache.flink.util.Preconditions;
@@ -130,7 +131,13 @@ public T next() throws IOException {
130131
if (ExceptionUtils.findThrowable(
131132
e, UnavailableDispatcherOperationException.class)
132133
.isPresent()) {
133-
LOG.debug("The job execution has not started yet; cannot fetch results.");
134+
LOG.debug(
135+
"The job execution has not started yet; cannot fetch results.", e);
136+
} else if (ExceptionUtils.findThrowable(e, FlinkJobNotFoundException.class)
137+
.isPresent()) {
138+
LOG.debug(
139+
"The job cannot be found. It is very likely that the job is not in a RUNNING state.",
140+
e);
134141
} else {
135142
LOG.warn("An exception occurred when fetching query results", e);
136143
}

0 commit comments

Comments
 (0)