This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 35d4b5f0c [KYUUBI #6212] Added audit handler shutdown to the shutdown
hook
35d4b5f0c is described below
commit 35d4b5f0c704db99a6e1457e3238da450cd5f479
Author: amanraj2520 <[email protected]>
AuthorDate: Mon Apr 8 10:40:04 2024 +0800
[KYUUBI #6212] Added audit handler shutdown to the shutdown hook
# :mag: Description
This pull request fixes #6212
When Kyuubi cleans up Ranger related threads like PolicyRefresher, it
should also shutdown the audit threads that include SolrZkClient. Otherwise
Spark Driver keeps on running since SolrZkClient is a non-daemon thread. Added
the cleanup as part of the shutdown hook that Kyuubi registers.
## Types of changes :bookmark:
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
## Test Plan ๐งช
#### Behavior Without This Pull Request :coffin:
#### Behavior With This Pull Request :tada:
#### Related Unit Tests
---
# Checklist ๐
- [ ] This patch was not authored or co-authored using [Generative
Tooling](https://www.apache.org/legal/generative-tooling.html)
**Be nice. Be informative.**
Closes #6233 from amanraj2520/auditShutdown.
Closes #6212
e663d466c [amanraj2520] Refactored code
ed293a9a4 [amanraj2520] Removed unused import
95a6814ad [amanraj2520] Added audit handler shutdown to the shutdown hook
Authored-by: amanraj2520 <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
.../apache/kyuubi/plugin/spark/authz/ranger/SparkRangerAdminPlugin.scala | 1 +
1 file changed, 1 insertion(+)
diff --git
a/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/SparkRangerAdminPlugin.scala
b/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/SparkRangerAdminPlugin.scala
index 66f34db91..2744567a0 100644
---
a/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/SparkRangerAdminPlugin.scala
+++
b/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/SparkRangerAdminPlugin.scala
@@ -78,6 +78,7 @@ object SparkRangerAdminPlugin extends
RangerBasePlugin("spark", "sparkSql")
if (plugin != null) {
LOG.info(s"clean up ranger plugin, appId: ${plugin.getAppId}")
plugin.cleanup()
+ plugin.getAuditProviderFactory.shutdown()
}
},
Integer.MAX_VALUE)