You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2023/01/11 09:20:52 UTC
[GitHub] [flink] link3280 commented on a diff in pull request #21581: [FLINK-30538][SQL gateway/client] Improve error handling of stop job operation
link3280 commented on code in PR #21581:
URL: https://github.com/apache/flink/pull/21581#discussion_r1066752130
##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/service/operation/OperationExecutor.java:
##########
@@ -487,23 +487,22 @@ public ResultFetcher callStopJobOperation(
.get(
clientTimeout.toMillis(),
TimeUnit.MILLISECONDS));
- } catch (Exception e) {
- throw new FlinkException(
- "Could not stop job "
- + stopJobOperation.getJobId()
- + " in session "
- + handle.getIdentifier()
- + ".",
- e);
+ } else {
+ clusterClient.cancel(JobID.fromHexString(jobId)).get();
+ return Optional.empty();
}
- } else {
- clusterClient.cancel(JobID.fromHexString(jobId));
- return Optional.empty();
+ } catch (Exception e) {
+ throw new FlinkException(e);
Review Comment:
Good point. Fixed in https://github.com/apache/flink/pull/21582.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org