sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vam...@apache.org
Subject 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)
Date Wed, 22 Feb 2017 16:14:42 GMT
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 <vamsee@cloudera.com>
Authored: Wed Feb 22 10:07:23 2017 -0600
Committer: Vamsee Yarlagadda <vamsee@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;
     }
   }
 


Mime
View raw message