@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class FederationQueueWeight extends Object
Constructor and Description |
---|
FederationQueueWeight() |
Modifier and Type | Method and Description |
---|---|
static void |
checkHeadRoomAlphaValid(String headRoomAlpha)
Check if HeadRoomAlpha is a number and is between 0 and 1.
|
static void |
checkSubClusterQueueWeightRatioValid(String subClusterWeight)
Check if the subCluster Queue Weight Ratio are valid.
|
abstract String |
getAmrmWeight() |
abstract String |
getHeadRoomAlpha() |
abstract String |
getPolicyManagerClassName() |
abstract String |
getQueue() |
abstract String |
getRouterWeight() |
protected static boolean |
isNumeric(String value)
Determines whether the given value is a number.
|
static FederationQueueWeight |
newInstance(String routerWeight,
String amrmWeight,
String headRoomAlpha)
The FederationQueueWeight object consists of three parts:
routerWeight, amrmWeight, and headRoomAlpha.
|
static FederationQueueWeight |
newInstance(String routerWeight,
String amrmWeight,
String headRoomAlpha,
String queue,
String policyManagerClassName) |
abstract void |
setAmrmWeight(String amrmWeight) |
abstract void |
setHeadRoomAlpha(String headRoomAlpha) |
abstract void |
setPolicyManagerClassName(String policyManagerClassName) |
abstract void |
setQueue(String queue) |
abstract void |
setRouterWeight(String routerWeight) |
String |
toString() |
@InterfaceAudience.Private @InterfaceStability.Unstable public static FederationQueueWeight newInstance(String routerWeight, String amrmWeight, String headRoomAlpha)
routerWeight
- Weight for routing applications to different subclusters.
We will route the application to different subclusters based on the configured weights.
Assuming we have two subclusters, SC-1 and SC-2,
with a weight of 0.7 for SC-1 and 0.3 for SC-2,
the application will be allocated in such a way
that 70% of the applications will be assigned to SC-1 and 30% to SC-2.amrmWeight
- Weight for resource request from ApplicationMaster (AM) to
different subclusters' Resource Manager (RM).
Assuming we have two subclusters, SC-1 and SC-2,
with a weight of 0.6 for SC-1 and 0.4 for SC-2,
When AM requesting resources,
60% of the requests will be made to the Resource Manager (RM) of SC-1
and 40% to the RM of SC-2.headRoomAlpha
- used by policies that balance weight-based and load-based considerations in their decisions.
For policies that use this parameter,
values close to 1 indicate that most of the decision
should be based on currently observed headroom from various sub-clusters,
values close to zero, indicate that the decision should be
mostly based on weights and practically ignore current load.@InterfaceAudience.Private @InterfaceStability.Unstable public static FederationQueueWeight newInstance(String routerWeight, String amrmWeight, String headRoomAlpha, String queue, String policyManagerClassName)
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract String getRouterWeight()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void setRouterWeight(String routerWeight)
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract String getAmrmWeight()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void setAmrmWeight(String amrmWeight)
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract String getHeadRoomAlpha()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void setHeadRoomAlpha(String headRoomAlpha)
public static void checkSubClusterQueueWeightRatioValid(String subClusterWeight) throws YarnException
subClusterWeight
- the weight ratios of subClusters.YarnException
- exceptions from yarn servers.public static void checkHeadRoomAlphaValid(String headRoomAlpha) throws YarnException
headRoomAlpha
- headroomalpha.YarnException
- exceptions from yarn servers.protected static boolean isNumeric(String value)
value
- given value.@InterfaceAudience.Public @InterfaceStability.Unstable public abstract String getQueue()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void setQueue(String queue)
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract String getPolicyManagerClassName()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void setPolicyManagerClassName(String policyManagerClassName)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.