YARN-11701. [Federation] Enhance Federation Cache Clean Conditions. (#6889) Contributed by Shilun Fan.

Reviewed-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
slfan1989 2024-06-19 08:34:19 +08:00 committed by GitHub
parent 90024d8cb1
commit 9710a8d52f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View File

@ -79,7 +79,9 @@ public void initCache(Configuration pConf, FederationStateStore pStateStore) {
@Override
public void clearCache() {
this.cache.cleanUp();
if (this.cache != null) {
this.cache.cleanUp();
}
this.cache = null;
}

View File

@ -76,7 +76,9 @@ public void initCache(Configuration pConf, FederationStateStore pStateStore) {
@Override
public void clearCache() {
cache.invalidateAll();
if (this.cache != null) {
cache.invalidateAll();
}
cache = null;
}

View File

@ -91,7 +91,9 @@ public void initCache(Configuration pConf, FederationStateStore pStateStore) {
@Override
public void clearCache() {
this.cache.clear();
if (this.cache != null) {
this.cache.clear();
}
this.cache = null;
}