@Private
@Evolving
public class WeightedPolicyInfo
extends java.lang.Object
SubClusterIdInfo and corresponding weights as a Float. The
interpretation of the weight is left to the logic in the policy.| Constructor | Description |
|---|---|
WeightedPolicyInfo() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object other) |
|
static WeightedPolicyInfo |
fromByteBuffer(java.nio.ByteBuffer bb) |
Deserializes a
WeightedPolicyInfo from a byte UTF-8 JSON
representation. |
java.util.Map<SubClusterIdInfo,java.lang.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.
|
java.util.Map<SubClusterIdInfo,java.lang.Float> |
getRouterPolicyWeights() |
Getter of the router weights.
|
int |
hashCode() |
|
void |
setAMRMPolicyWeights(java.util.Map<SubClusterIdInfo,java.lang.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(java.util.Map<SubClusterIdInfo,java.lang.Float> policyWeights) |
Setter method for Router weights.
|
java.nio.ByteBuffer |
toByteBuffer() |
Converts the policy into a byte array representation in the input
ByteBuffer. |
java.lang.String |
toString() |
public static WeightedPolicyInfo fromByteBuffer(java.nio.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 java.util.Map<SubClusterIdInfo,java.lang.Float> getRouterPolicyWeights()
public void setRouterPolicyWeights(java.util.Map<SubClusterIdInfo,java.lang.Float> policyWeights)
policyWeights - the router weights.public java.util.Map<SubClusterIdInfo,java.lang.Float> getAMRMPolicyWeights()
public void setAMRMPolicyWeights(java.util.Map<SubClusterIdInfo,java.lang.Float> policyWeights)
policyWeights - the amrmproxy weights.public java.nio.ByteBuffer toByteBuffer()
throws FederationPolicyInitializationException
ByteBuffer.FederationPolicyInitializationException - if a serialization error
occurs.public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic float getHeadroomAlpha()
public void setHeadroomAlpha(float headroomAlpha)
headroomAlpha - the value to use for balancing.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.