slfan1989 commented on code in PR #6083:
URL: https://github.com/apache/hadoop/pull/6083#discussion_r1329577079
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/utils/FederationRegistryClient.java:
##########
@@ -203,21 +203,27 @@ public synchronized boolean
writeAMRMTokenForUAM(ApplicationId appId,
* Remove an application from registry.
*
* @param appId application id
+ * @param ignoreMemoryState whether to ignore the memory data in terms of
+ * known application
*/
- public synchronized void removeAppFromRegistry(ApplicationId appId) {
+ public synchronized void removeAppFromRegistry(ApplicationId appId,
+ boolean ignoreMemoryState) {
Map<String, Token<AMRMTokenIdentifier>> subClusterTokenMap =
this.appSubClusterTokenMap.get(appId);
- LOG.info("Removing all registry entries for {}", appId);
-
- if (subClusterTokenMap == null || subClusterTokenMap.size() == 0) {
- return;
+ if (!ignoreMemoryState) {
+ if (subClusterTokenMap == null || subClusterTokenMap.size() == 0) {
Review Comment:
Thank you very much for your suggestions! I will improve this part of the
code.
--
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]