hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-13969 AuthenticationTokenSecretManager is never stopped in RPCServer (Pankaj Kumar)
Date Fri, 26 Jun 2015 00:42:17 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 70f0ca3c6 -> 2ed058554


HBASE-13969 AuthenticationTokenSecretManager is never stopped in RPCServer (Pankaj Kumar)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2ed05855
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2ed05855
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2ed05855

Branch: refs/heads/master
Commit: 2ed058554c0b6d6da0388497562e254107f13d67
Parents: 70f0ca3
Author: tedyu <yuzhihong@gmail.com>
Authored: Thu Jun 25 17:42:22 2015 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Thu Jun 25 17:42:22 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/ipc/RpcServer.java    | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2ed05855/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index cafd25d..8c4f6d4 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -251,6 +251,7 @@ public class RpcServer implements RpcServerInterface {
   //of client connections
   private Listener listener = null;
   protected Responder responder = null;
+  protected AuthenticationTokenSecretManager authTokenSecretMgr = null;
   protected int numConnections = 0;
 
   protected HBaseRPCErrorHandler errorHandler = null;
@@ -2070,10 +2071,10 @@ public class RpcServer implements RpcServerInterface {
   @Override
   public synchronized void start() {
     if (started) return;
-    AuthenticationTokenSecretManager mgr = createSecretManager();
-    if (mgr != null) {
-      setSecretManager(mgr);
-      mgr.start();
+    authTokenSecretMgr = createSecretManager();
+    if (authTokenSecretMgr != null) {
+      setSecretManager(authTokenSecretMgr);
+      authTokenSecretMgr.start();
     }
     this.authManager = new ServiceAuthorizationManager();
     HBasePolicyProvider.init(conf, authManager);
@@ -2234,6 +2235,10 @@ public class RpcServer implements RpcServerInterface {
   public synchronized void stop() {
     LOG.info("Stopping server on " + port);
     running = false;
+    if (authTokenSecretMgr != null) {
+      authTokenSecretMgr.stop();
+      authTokenSecretMgr = null;
+    }
     listener.interrupt();
     listener.doStop();
     responder.interrupt();


Mime
View raw message