HBASE-13969 AuthenticationTokenSecretManager is never stopped in RPCServer (Pankaj Kumar)
This commit is contained in:
parent
70f0ca3c6d
commit
2ed058554c
|
@ -251,6 +251,7 @@ public class RpcServer implements RpcServerInterface {
|
||||||
//of client connections
|
//of client connections
|
||||||
private Listener listener = null;
|
private Listener listener = null;
|
||||||
protected Responder responder = null;
|
protected Responder responder = null;
|
||||||
|
protected AuthenticationTokenSecretManager authTokenSecretMgr = null;
|
||||||
protected int numConnections = 0;
|
protected int numConnections = 0;
|
||||||
|
|
||||||
protected HBaseRPCErrorHandler errorHandler = null;
|
protected HBaseRPCErrorHandler errorHandler = null;
|
||||||
|
@ -2070,10 +2071,10 @@ public class RpcServer implements RpcServerInterface {
|
||||||
@Override
|
@Override
|
||||||
public synchronized void start() {
|
public synchronized void start() {
|
||||||
if (started) return;
|
if (started) return;
|
||||||
AuthenticationTokenSecretManager mgr = createSecretManager();
|
authTokenSecretMgr = createSecretManager();
|
||||||
if (mgr != null) {
|
if (authTokenSecretMgr != null) {
|
||||||
setSecretManager(mgr);
|
setSecretManager(authTokenSecretMgr);
|
||||||
mgr.start();
|
authTokenSecretMgr.start();
|
||||||
}
|
}
|
||||||
this.authManager = new ServiceAuthorizationManager();
|
this.authManager = new ServiceAuthorizationManager();
|
||||||
HBasePolicyProvider.init(conf, authManager);
|
HBasePolicyProvider.init(conf, authManager);
|
||||||
|
@ -2234,6 +2235,10 @@ public class RpcServer implements RpcServerInterface {
|
||||||
public synchronized void stop() {
|
public synchronized void stop() {
|
||||||
LOG.info("Stopping server on " + port);
|
LOG.info("Stopping server on " + port);
|
||||||
running = false;
|
running = false;
|
||||||
|
if (authTokenSecretMgr != null) {
|
||||||
|
authTokenSecretMgr.stop();
|
||||||
|
authTokenSecretMgr = null;
|
||||||
|
}
|
||||||
listener.interrupt();
|
listener.interrupt();
|
||||||
listener.doStop();
|
listener.doStop();
|
||||||
responder.interrupt();
|
responder.interrupt();
|
||||||
|
|
Loading…
Reference in New Issue