This is an automated email from the ASF dual-hosted git repository.
ggal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-livy.git
The following commit(s) were added to refs/heads/master by this push:
new 830a27e1 [LIVY-973][RSC] Always close RSCClient's EventLoopGroup (#398)
830a27e1 is described below
commit 830a27e16efa9d1e6265988d7d71dc1de6ed2b39
Author: RajshekharMuchandi <[email protected]>
AuthorDate: Wed Apr 12 13:26:39 2023 +0530
[LIVY-973][RSC] Always close RSCClient's EventLoopGroup (#398)
## What changes were proposed in this pull request?
Added try-catch block to jobs' setFailure() and log entries if there is any
exception. eventLoopGroup.shutdownGracefully(); statement will be executed
after exception is caught.
---
rsc/src/main/java/org/apache/livy/rsc/RSCClient.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/rsc/src/main/java/org/apache/livy/rsc/RSCClient.java
b/rsc/src/main/java/org/apache/livy/rsc/RSCClient.java
index c1c95340..ee9c9012 100644
--- a/rsc/src/main/java/org/apache/livy/rsc/RSCClient.java
+++ b/rsc/src/main/java/org/apache/livy/rsc/RSCClient.java
@@ -241,7 +241,11 @@ public class RSCClient implements LivyClient {
// Report failure for all pending jobs, so that clients can react.
for (Map.Entry<String, JobHandleImpl<?>> e : jobs.entrySet()) {
LOG.info("Failing pending job {} due to shutdown.", e.getKey());
- e.getValue().setFailure(new IOException("RSCClient instance
stopped."));
+ try {
+ e.getValue().setFailure(new IOException("RSCClient instance
stopped."));
+ } catch (Exception e2) {
+ LOG.info("Job " + e.getKey() + " already failed.", e2);
+ }
}
eventLoopGroup.shutdownGracefully();