public class LoadBasedGlobalPolicy extends GlobalPolicy
Modifier and Type | Class and Description |
---|---|
static class |
LoadBasedGlobalPolicy.Scaling |
Constructor and Description |
---|
LoadBasedGlobalPolicy() |
Modifier and Type | Method and Description |
---|---|
protected Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo> |
getSubClustersMetricsInfo(Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,Map<Class,Object>> subClusterMetricsInfo)
Get the ClusterMetric information of the subCluster.
|
protected Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterIdInfo,Float> |
getTargetWeights(Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo> clusterMetrics)
Get subCluster target weight.
|
protected float |
getWeightByScaling(int maxPendingVal,
int curPendingVal)
Get weight information.
|
protected org.apache.hadoop.yarn.server.federation.policies.manager.WeightedLocalityPolicyManager |
getWeightedLocalityPolicyManager(String queue,
Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,Map<Class,Object>> subClusterMetricInfos)
GPG can help update the policy of the queue.
|
protected Map<Class<?>,String> |
registerPaths()
Return a map of the object type and RM path to request it from - the
framework will query these paths and provide the objects to the policy.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
protected org.apache.hadoop.yarn.server.federation.policies.manager.FederationPolicyManager |
updatePolicy(String queueName,
Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,Map<Class,Object>> clusterInfo,
org.apache.hadoop.yarn.server.federation.policies.manager.FederationPolicyManager currentManager)
Update the policy of the queue.
|
getConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class GlobalPolicy
protected Map<Class<?>,String> registerPaths()
GlobalPolicy
registerPaths
in class GlobalPolicy
protected org.apache.hadoop.yarn.server.federation.policies.manager.FederationPolicyManager updatePolicy(String queueName, Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,Map<Class,Object>> clusterInfo, org.apache.hadoop.yarn.server.federation.policies.manager.FederationPolicyManager currentManager)
updatePolicy
in class GlobalPolicy
queueName
- name of the queueclusterInfo
- subClusterId map to cluster information about the
SubCluster used to make policy decisionscurrentManager
- the FederationPolicyManager for the queue's existing
policy the manager may be null, in which case the policy
will need to be created.protected org.apache.hadoop.yarn.server.federation.policies.manager.WeightedLocalityPolicyManager getWeightedLocalityPolicyManager(String queue, Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,Map<Class,Object>> subClusterMetricInfos)
queue
- queueName.subClusterMetricInfos
- Metric information of the subCluster.protected Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo> getSubClustersMetricsInfo(Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,Map<Class,Object>> subClusterMetricsInfo)
subClusterMetricsInfo
- subCluster Metric Information.@VisibleForTesting protected Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterIdInfo,Float> getTargetWeights(Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo> clusterMetrics)
clusterMetrics
- Metric of the subCluster.protected float getWeightByScaling(int maxPendingVal, int curPendingVal)
maxPendingVal
- maxPending - minPendingcurPendingVal
- pending - minPendingCopyright © 2008–2024 Apache Software Foundation. All rights reserved.