public class FederationJCache extends FederationCache
FederationCache.ApplicationHomeSubClusterCacheResponse, FederationCache.CacheRequest<K,V>, FederationCache.CacheResponse<R>, FederationCache.SubClusterInfoCacheResponse, FederationCache.SubClusterPolicyConfigurationCacheResponseGET_APPLICATION_HOME_SUBCLUSTER_CACHEID, GET_POLICIES_CONFIGURATIONS_CACHEID, GET_SUBCLUSTERS_CACHEID, POINT| Constructor and Description |
|---|
FederationJCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
clear cache.
|
String |
getAppHomeSubClusterCacheKey(org.apache.hadoop.yarn.api.records.ApplicationId appId) |
SubClusterId |
getApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId appId)
Returns the home
SubClusterId for the specified
ApplicationId. |
org.ehcache.Cache<String,FederationCache.CacheRequest> |
getCache() |
Map<String,SubClusterPolicyConfiguration> |
getPoliciesConfigurations()
Get the policies that is represented as
SubClusterPolicyConfiguration for all currently active queues in
the system. |
Map<SubClusterId,SubClusterInfo> |
getSubClusters(boolean filterInactiveSubClusters)
Returns the
SubClusterInfo of all active sub cluster(s). |
void |
initCache(org.apache.hadoop.conf.Configuration pConf,
FederationStateStore pStateStore)
Initialize the cache.
|
boolean |
isCachingEnabled()
Determine whether to enable cache.
|
void |
removeSubCluster(boolean flushCache)
Remove SubCluster from cache.
|
buildCacheKey, buildCacheKey, buildGetApplicationHomeSubClusterRequest, buildGetPoliciesConfigurationsCacheRequest, buildGetSubClustersCacheRequest, buildPolicyConfigMap, buildPolicyConfigMap, buildSubClusterInfoMap, buildSubClusterInfoMap, getStateStore, setStateStorepublic boolean isCachingEnabled()
FederationCacheisCachingEnabled in class FederationCachepublic void initCache(org.apache.hadoop.conf.Configuration pConf,
FederationStateStore pStateStore)
FederationCacheinitCache in class FederationCachepConf - Configuration.pStateStore - FederationStateStore.public void clearCache()
FederationCacheclearCache in class FederationCachepublic Map<SubClusterId,SubClusterInfo> getSubClusters(boolean filterInactiveSubClusters) throws org.apache.hadoop.yarn.exceptions.YarnException
FederationCacheSubClusterInfo of all active sub cluster(s).getSubClusters in class FederationCachefilterInactiveSubClusters - whether to filter out inactive
sub-clustersorg.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessfulpublic Map<String,SubClusterPolicyConfiguration> getPoliciesConfigurations() throws Exception
FederationCacheSubClusterPolicyConfiguration for all currently active queues in
the system.getPoliciesConfigurations in class FederationCacheorg.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessfulExceptionpublic SubClusterId getApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws Exception
FederationCacheSubClusterId for the specified
ApplicationId.getApplicationHomeSubCluster in class FederationCacheappId - the identifier of the applicationorg.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessfulExceptionpublic void removeSubCluster(boolean flushCache)
FederationCacheremoveSubCluster in class FederationCacheflushCache - whether to filter out inactive
sub-clusters.@VisibleForTesting public org.ehcache.Cache<String,FederationCache.CacheRequest> getCache()
@VisibleForTesting public String getAppHomeSubClusterCacheKey(org.apache.hadoop.yarn.api.records.ApplicationId appId)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.