Skip to content

Commit 9334c93

Browse files
amanraj2520pan3793
authored andcommitted
[KYUUBI #6212] Added audit handler shutdown to the shutdown hook
# 🔍 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 🔖 - [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 ⚰️ #### Behavior With This Pull Request 🎉 #### 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 e663d46 [amanraj2520] Refactored code ed293a9 [amanraj2520] Removed unused import 95a6814 [amanraj2520] Added audit handler shutdown to the shutdown hook Authored-by: amanraj2520 <[email protected]> Signed-off-by: Cheng Pan <[email protected]> (cherry picked from commit 35d4b5f) Signed-off-by: Cheng Pan <[email protected]>
1 parent c5cd771 commit 9334c93

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/SparkRangerAdminPlugin.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ object SparkRangerAdminPlugin extends RangerBasePlugin("spark", "sparkSql")
8080
if (plugin != null) {
8181
LOG.info(s"clean up ranger plugin, appId: ${plugin.getAppId}")
8282
plugin.cleanup()
83+
plugin.getAuditProviderFactory.shutdown()
8384
}
8485
},
8586
Integer.MAX_VALUE)

0 commit comments

Comments
 (0)