public final class FederationStateStoreFacade extends Object
| Modifier and Type | Class and Description | 
|---|---|
| protected static interface  | FederationStateStoreFacade.Func<T,TResult>Encapsulates a method that has one parameter and returns a value of the
 type specified by the TResult parameter. | 
| Modifier and Type | Method and Description | 
|---|---|
| SubClusterId | addApplicationHomeSubCluster(ApplicationHomeSubCluster appHomeSubCluster)Adds the home  SubClusterIdfor the specifiedApplicationId. | 
| protected String | buildCacheKey(String typeName,
             String methodName,
             String argName) | 
| static <T> T | createInstance(org.apache.hadoop.conf.Configuration conf,
              String configuredClassName,
              String defaultValue,
              Class<T> type)Helper method to create instances of Object using the class name specified
 in the configuration object. | 
| static <T> Object | createRetryInstance(org.apache.hadoop.conf.Configuration conf,
                   String configuredClassName,
                   String defaultValue,
                   Class<T> type,
                   org.apache.hadoop.io.retry.RetryPolicy retryPolicy)Helper method to create instances of Object using the class name defined in
 the configuration object. | 
| static org.apache.hadoop.io.retry.RetryPolicy | createRetryPolicy(org.apache.hadoop.conf.Configuration conf)Create a RetryPolicy for  FederationStateStoreFacade. | 
| SubClusterId | getApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId appId)Returns the home  SubClusterIdfor the specifiedApplicationId. | 
| org.apache.hadoop.conf.Configuration | getConf()Get the configuration. | 
| static FederationStateStoreFacade | getInstance()Returns the singleton instance of the FederationStateStoreFacade object. | 
| Map<String,SubClusterPolicyConfiguration> | getPoliciesConfigurations()Get the policies that is represented as
  SubClusterPolicyConfigurationfor all currently active queues in
 the system. | 
| SubClusterPolicyConfiguration | getPolicyConfiguration(String queue)Returns the  SubClusterPolicyConfigurationfor the specified queue. | 
| SubClusterInfo | getSubCluster(SubClusterId subClusterId)Returns the  SubClusterInfofor the specifiedSubClusterId. | 
| SubClusterInfo | getSubCluster(SubClusterId subClusterId,
             boolean flushCache)Updates the cache with the central  FederationStateStoreand returns
 theSubClusterInfofor the specifiedSubClusterId. | 
| SubClusterResolver | getSubClusterResolver()Get the singleton instance of SubClusterResolver. | 
| Map<SubClusterId,SubClusterInfo> | getSubClusters(boolean filterInactiveSubClusters)Returns the  SubClusterInfoof all active sub cluster(s). | 
| void | reinitialize(FederationStateStore store,
            org.apache.hadoop.conf.Configuration config)Delete and re-initialize the cache, to force it to use the given
 configuration. | 
| void | updateApplicationHomeSubCluster(ApplicationHomeSubCluster appHomeSubCluster)Updates the home  SubClusterIdfor the specifiedApplicationId. | 
public void reinitialize(FederationStateStore store, org.apache.hadoop.conf.Configuration config)
store - the FederationStateStore instance to reinitialize withconfig - the updated configuration to reinitialize withpublic static org.apache.hadoop.io.retry.RetryPolicy createRetryPolicy(org.apache.hadoop.conf.Configuration conf)
FederationStateStoreFacade. In case of
 failure, it retries for:
 FederationStateStoreRetriableExceptionCacheLoaderExceptionconf - the updated configurationpublic static FederationStateStoreFacade getInstance()
FederationStateStoreFacade instancepublic SubClusterInfo getSubCluster(SubClusterId subClusterId) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterInfo for the specified SubClusterId.subClusterId - the identifier of the sub-clusternull if there is no mapping for the subClusterIdorg.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessfulpublic SubClusterInfo getSubCluster(SubClusterId subClusterId, boolean flushCache) throws org.apache.hadoop.yarn.exceptions.YarnException
FederationStateStore and returns
 the SubClusterInfo for the specified SubClusterId.subClusterId - the identifier of the sub-clusterflushCache - flag to indicate if the cache should be flushed or notorg.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessfulpublic Map<SubClusterId,SubClusterInfo> getSubClusters(boolean filterInactiveSubClusters) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterInfo of all active sub cluster(s).filterInactiveSubClusters - whether to filter out inactive
          sub-clustersorg.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessfulpublic SubClusterPolicyConfiguration getPolicyConfiguration(String queue) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterPolicyConfiguration for the specified queue.queue - the queue whose policy is requirednull if there is no
         mapping for the queueorg.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessfulpublic Map<String,SubClusterPolicyConfiguration> getPoliciesConfigurations() throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterPolicyConfiguration for all currently active queues in
 the system.org.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessfulpublic SubClusterId addApplicationHomeSubCluster(ApplicationHomeSubCluster appHomeSubCluster) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterId for the specified ApplicationId.appHomeSubCluster - the mapping of the application to it's home
          sub-clusterorg.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessfulpublic void updateApplicationHomeSubCluster(ApplicationHomeSubCluster appHomeSubCluster) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterId for the specified
 ApplicationId.appHomeSubCluster - the mapping of the application to it's home
          sub-clusterorg.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessfulpublic SubClusterId getApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws org.apache.hadoop.yarn.exceptions.YarnException
SubClusterId for the specified
 ApplicationId.appId - the identifier of the applicationorg.apache.hadoop.yarn.exceptions.YarnException - if the call to the state store is unsuccessfulpublic SubClusterResolver getSubClusterResolver()
public org.apache.hadoop.conf.Configuration getConf()
public static <T> Object createRetryInstance(org.apache.hadoop.conf.Configuration conf, String configuredClassName, String defaultValue, Class<T> type, org.apache.hadoop.io.retry.RetryPolicy retryPolicy)
RetryProxy using
 the specific RetryPolicy.conf - the yarn configurationconfiguredClassName - the configuration provider keydefaultValue - the default implementation for fallbacktype - the class for which a retry proxy is requiredretryPolicy - the policy for retrying method call failurespublic static <T> T createInstance(org.apache.hadoop.conf.Configuration conf,
                                   String configuredClassName,
                                   String defaultValue,
                                   Class<T> type)
T - The type of the instance to createconf - the yarn configurationconfiguredClassName - the configuration provider keydefaultValue - the default implementation classtype - the required interface/base classCopyright © 2008–2023 Apache Software Foundation. All rights reserved.