Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,21 @@ private CloseableIterator<Row> collect(TableResult result, int timeout) {
return;
}
} catch (Exception e) {
// If we can't get job status, assume the job has terminated.
// This handles cases where MiniCluster has already shut down.
// Similar to Flink's CollectResultFetcher behavior.
return;
}
}
// Only cancel if job is not already terminated
try {
if (!client.getJobStatus().get().isGloballyTerminalState()) {
client.cancel();
throw new RuntimeException(e);
}
} catch (Exception e) {
// If we can't check status or cancel, assume job has terminated.
// This handles IllegalStateException when MiniCluster is shut down.
}
client.cancel();
});
timeoutThread.start();
return result.collect();
Expand Down