You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by va...@apache.org on 2017/02/22 16:14:42 UTC
sentry git commit: [2/2] SENTRY-1635: Limit HMS connections only to
the leader of the sentry servers (Vamsee Yarlagadda,
Reviewed by: Alexander Kolbasov, Hao Hao)
Repository: sentry
Updated Branches:
refs/heads/sentry-ha-redesign 21fbb9d43 -> 3817f18be
[2/2] SENTRY-1635: Limit HMS connections only to the leader of the sentry servers (Vamsee Yarlagadda, Reviewed by: Alexander Kolbasov, Hao Hao)
Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/3817f18b
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/3817f18b
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/3817f18b
Branch: refs/heads/sentry-ha-redesign
Commit: 3817f18befe5d081b80af42f527d23579fb8b2ce
Parents: 21fbb9d
Author: Vamsee Yarlagadda <va...@cloudera.com>
Authored: Wed Feb 22 10:07:23 2017 -0600
Committer: Vamsee Yarlagadda <va...@cloudera.com>
Committed: Wed Feb 22 10:13:20 2017 -0600
----------------------------------------------------------------------
.../java/org/apache/sentry/service/thrift/HMSFollower.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sentry/blob/3817f18b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
index 1a99a04..c91051d 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
@@ -276,15 +276,18 @@ public class HMSFollower implements Runnable {
private void closeHMSConnection() {
try {
if (client != null) {
+ LOGGER.info("Closing the HMS client connection");
client.close();
- client = null;
}
if (kerberosContext != null) {
+ LOGGER.info("Shutting down kerberos context associated with the HMS client connection");
kerberosContext.shutDown();
- kerberosContext = null;
}
} catch (LoginException le) {
LOGGER.warn("Failed to stop kerberos context (potential to cause thread leak)", le);
+ } finally {
+ client = null;
+ kerberosContext = null;
}
}