public class PolicyGenerator extends Object implements Runnable, org.apache.hadoop.conf.Configurable
Constructor and Description |
---|
PolicyGenerator(org.apache.hadoop.conf.Configuration conf,
GPGContext context)
The PolicyGenerator periodically reads SubCluster load and updates
policies into the FederationStateStore.
|
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.conf.Configuration |
getConf() |
protected Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,Map<Class,Object>> |
getInfos(Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.federation.store.records.SubClusterInfo> activeSubClusters)
Helper to retrieve metrics from the RM REST endpoints.
|
GlobalPolicy |
getPolicy() |
protected Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.SchedulerInfo> |
getSchedulerInfo(Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.federation.store.records.SubClusterInfo> activeSubClusters)
Helper to retrieve SchedulerInfos.
|
void |
run() |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
void |
setPolicy(GlobalPolicy policy) |
public PolicyGenerator(org.apache.hadoop.conf.Configuration conf, GPGContext context)
conf
- Configuration.context
- GPG Context.public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
@VisibleForTesting protected Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,Map<Class,Object>> getInfos(Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.federation.store.records.SubClusterInfo> activeSubClusters)
activeSubClusters
- A map of active SubCluster IDs to info@VisibleForTesting protected Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.SchedulerInfo> getSchedulerInfo(Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.federation.store.records.SubClusterInfo> activeSubClusters)
activeSubClusters
- A map of active SubCluster IDs to infopublic GlobalPolicy getPolicy()
public void setPolicy(GlobalPolicy policy)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.