Skip to content

Commit

Permalink
[KYUUBI #6212] Added audit handler shutdown to the shutdown hook
Browse files Browse the repository at this point in the history
# 🔍 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]>
  • Loading branch information
amanraj2520 authored and pan3793 committed Apr 8, 2024
1 parent b4f35d2 commit 35d4b5f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 35d4b5f

Please sign in to comment.