joseluisll opened a new pull request, #8808:
URL: https://github.com/apache/hadoop/pull/8808

   ### Description of PR
   
   [YARN-12002](https://issues.apache.org/jira/browse/YARN-12002). Replaces 
#8784, which used the branch `YARN-11984-2-router-dtsm-stop`; the change is 
identical.
   
   `RouterClientRMService#serviceStart` calls 
`routerDTSecretManager.startThreads()`, which spawns 
`AbstractDelegationTokenSecretManager`'s `ExpiredTokenRemover` daemon. 
`serviceStop` never called `stopThreads()`, so that thread outlived the service 
and kept reaching the `FederationStateStoreFacade` to roll master keys and 
remove expired tokens after the Router, and everything it owns, had stopped. 
`RMSecretManagerService#serviceStop` already does this for the 
ResourceManager's equivalent; the Router simply omitted it.
   
   `serviceStop` also no longer throws `NullPointerException` when the service 
never started: `userPipelineMap` is created in `serviceStart`, so `clear()` is 
now guarded like the secret manager.
   
   Split out of YARN-11984, whose federation mock Router closes the state store 
once the Router has stopped and so relies on this thread having stopped.
   
   ### How was this patch tested?
   
   `TestRouterClientRMService` covers both cases: stopping a started service 
stops the secret manager's threads, and a service that was only initialized 
stops cleanly.
   
   ### For code changes:
   
   - [x] Does the title of this PR start with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: Have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   ### AI Tooling
   
   If an AI tool was used:
   
   - [x] The PR includes the phrase "Contains content generated by Claude Code"
         where <tool> is the name of the AI tool used.
   - [x] My use of AI contributions follows the ASF legal policy
         https://www.apache.org/legal/generative-tooling.html
   


-- 
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