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:
parent
90024d8cb1
commit
9710a8d52f
@ -79,7 +79,9 @@ public void initCache(Configuration pConf, FederationStateStore pStateStore) {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearCache() {
|
public void clearCache() {
|
||||||
this.cache.cleanUp();
|
if (this.cache != null) {
|
||||||
|
this.cache.cleanUp();
|
||||||
|
}
|
||||||
this.cache = null;
|
this.cache = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,9 @@ public void initCache(Configuration pConf, FederationStateStore pStateStore) {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearCache() {
|
public void clearCache() {
|
||||||
cache.invalidateAll();
|
if (this.cache != null) {
|
||||||
|
cache.invalidateAll();
|
||||||
|
}
|
||||||
cache = null;
|
cache = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,9 @@ public void initCache(Configuration pConf, FederationStateStore pStateStore) {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearCache() {
|
public void clearCache() {
|
||||||
this.cache.clear();
|
if (this.cache != null) {
|
||||||
|
this.cache.clear();
|
||||||
|
}
|
||||||
this.cache = null;
|
this.cache = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user