@InterfaceAudience.Private @InterfaceStability.Evolving public class WeightedPolicyInfo extends Object
SubClusterIdInfo and corresponding weights as a Float. The
interpretation of the weight is left to the logic in the policy.| Constructor and Description |
|---|
WeightedPolicyInfo() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
static WeightedPolicyInfo |
fromByteBuffer(ByteBuffer bb)
Deserializes a
WeightedPolicyInfo from a byte UTF-8 JSON
representation. |
Map<SubClusterIdInfo,Float> |
getAMRMPolicyWeights()
Getter for AMRMProxy weights.
|
float |
getHeadroomAlpha()
Return the parameter headroomAlpha, used by policies that balance
weight-based and load-based considerations in their decisions.
|
Map<SubClusterIdInfo,Float> |
getRouterPolicyWeights()
Getter of the router weights.
|
int |
hashCode() |
void |
setAMRMPolicyWeights(Map<SubClusterIdInfo,Float> policyWeights)
Setter method for ARMRMProxy weights.
|
void |
setHeadroomAlpha(float headroomAlpha)
Set the parameter headroomAlpha, used by policies that balance weight-based
and load-based considerations in their decisions.
|
void |
setRouterPolicyWeights(Map<SubClusterIdInfo,Float> policyWeights)
Setter method for Router weights.
|
ByteBuffer |
toByteBuffer()
Converts the policy into a byte array representation in the input
ByteBuffer. |
String |
toString() |
public static WeightedPolicyInfo fromByteBuffer(ByteBuffer bb) throws FederationPolicyInitializationException
WeightedPolicyInfo from a byte UTF-8 JSON
representation.bb - the input byte representation.WeightedPolicyInfo represented.FederationPolicyInitializationException - if a deserialization error
occurs.public Map<SubClusterIdInfo,Float> getRouterPolicyWeights()
public void setRouterPolicyWeights(Map<SubClusterIdInfo,Float> policyWeights)
policyWeights - the router weights.public Map<SubClusterIdInfo,Float> getAMRMPolicyWeights()
public void setAMRMPolicyWeights(Map<SubClusterIdInfo,Float> policyWeights)
policyWeights - the amrmproxy weights.public ByteBuffer toByteBuffer() throws FederationPolicyInitializationException
ByteBuffer.FederationPolicyInitializationException - if a serialization error
occurs.public float getHeadroomAlpha()
public void setHeadroomAlpha(float headroomAlpha)
headroomAlpha - the value to use for balancing.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.