joseluisll commented on code in PR #8681:
URL: https://github.com/apache/hadoop/pull/8681#discussion_r3788598185


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/subcluster/TestMockRouter.java:
##########
@@ -85,6 +99,19 @@ public static void main(String[] args) throws YarnException {
         FederationStateStore.class, retryPolicy);
     stateStore.init(conf);
     FederationStateStoreFacade.getInstance().reinitialize(stateStore, conf);
+

Review Comment:
   Confirmed. RouterClientRMService#serviceStart creates a 
RouterDelegationTokenSecretManager whose constructor calls 
FederationStateStoreFacade#getInstance(Configuration), and 
initializeFacadeInternal creates and initializes a store. reinitialize() then 
assigns this.stateStore without closing the previous one.
   
   Now taking FederationStateStoreFacade.getInstance(conf).getStateStore() and 
dropping the second creation. 
   
   I tested this counting ZooKeeper sessions in the Router's child log under 
TestYarnFederationWithCapacityScheduler:
   2 opened / 1 closed before, 1 opened / 1 closed after the fix.
   
   Thank you!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to