org.apache.hadoop.conf.Configurablepublic class LoadBasedGlobalPolicy extends GlobalPolicy
| Modifier and Type | Class | Description |
|---|---|---|
static class |
LoadBasedGlobalPolicy.Scaling |
| Constructor | Description |
|---|---|
LoadBasedGlobalPolicy() |
| Modifier and Type | Method | Description |
|---|---|---|
protected java.util.Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo> |
getSubClustersMetricsInfo(java.util.Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,java.util.Map<java.lang.Class,java.lang.Object>> subClusterMetricsInfo) |
Get the ClusterMetric information of the subCluster.
|
protected java.util.Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterIdInfo,java.lang.Float> |
getTargetWeights(java.util.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(java.lang.String queue,
java.util.Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,java.util.Map<java.lang.Class,java.lang.Object>> subClusterMetricInfos) |
GPG can help update the policy of the queue.
|
protected java.util.Map<java.lang.Class<?>,java.lang.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(java.lang.String queueName,
java.util.Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,java.util.Map<java.lang.Class,java.lang.Object>> clusterInfo,
org.apache.hadoop.yarn.server.federation.policies.manager.FederationPolicyManager currentManager) |
Update the policy of the queue.
|
getConfpublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.ConfigurablesetConf in class GlobalPolicyprotected java.util.Map<java.lang.Class<?>,java.lang.String> registerPaths()
GlobalPolicyregisterPaths in class GlobalPolicyprotected org.apache.hadoop.yarn.server.federation.policies.manager.FederationPolicyManager updatePolicy(java.lang.String queueName,
java.util.Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,java.util.Map<java.lang.Class,java.lang.Object>> clusterInfo,
org.apache.hadoop.yarn.server.federation.policies.manager.FederationPolicyManager currentManager)
updatePolicy in class GlobalPolicyqueueName - 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(java.lang.String queue,
java.util.Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,java.util.Map<java.lang.Class,java.lang.Object>> subClusterMetricInfos)
queue - queueName.subClusterMetricInfos - Metric information of the subCluster.protected java.util.Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo> getSubClustersMetricsInfo(java.util.Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,java.util.Map<java.lang.Class,java.lang.Object>> subClusterMetricsInfo)
subClusterMetricsInfo - subCluster Metric Information.@VisibleForTesting protected java.util.Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterIdInfo,java.lang.Float> getTargetWeights(java.util.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–2025 Apache Software Foundation. All rights reserved.