Class FederationQueueWeight
java.lang.Object
org.apache.hadoop.yarn.server.api.protocolrecords.FederationQueueWeight
Queue weights for representing Federation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckHeadRoomAlphaValid(String headRoomAlpha) Check if HeadRoomAlpha is a number and is between 0 and 1.static voidcheckSubClusterQueueWeightRatioValid(String subClusterWeight) Check if the subCluster Queue Weight Ratio are valid.abstract Stringabstract Stringabstract Stringabstract StringgetQueue()abstract Stringprotected static booleanDetermines whether the given value is a number.static FederationQueueWeightnewInstance(String routerWeight, String amrmWeight, String headRoomAlpha) The FederationQueueWeight object consists of three parts: routerWeight, amrmWeight, and headRoomAlpha.static FederationQueueWeightnewInstance(String routerWeight, String amrmWeight, String headRoomAlpha, String queue, String policyManagerClassName) abstract voidsetAmrmWeight(String amrmWeight) abstract voidsetHeadRoomAlpha(String headRoomAlpha) abstract voidsetPolicyManagerClassName(String policyManagerClassName) abstract voidabstract voidsetRouterWeight(String routerWeight) toString()
-
Constructor Details
-
FederationQueueWeight
public FederationQueueWeight()
-
-
Method Details
-
newInstance
@Private @Unstable public static FederationQueueWeight newInstance(String routerWeight, String amrmWeight, String headRoomAlpha) The FederationQueueWeight object consists of three parts: routerWeight, amrmWeight, and headRoomAlpha.- Parameters:
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.- Returns:
- FederationQueueWeight
-
newInstance
-
getRouterWeight
-
setRouterWeight
-
getAmrmWeight
-
setAmrmWeight
-
getHeadRoomAlpha
-
setHeadRoomAlpha
-
checkSubClusterQueueWeightRatioValid
public static void checkSubClusterQueueWeightRatioValid(String subClusterWeight) throws YarnException Check if the subCluster Queue Weight Ratio are valid. This method can be used to validate RouterPolicyWeight and AMRMPolicyWeight.- Parameters:
subClusterWeight- the weight ratios of subClusters.- Throws:
YarnException- exceptions from yarn servers.
-
checkHeadRoomAlphaValid
Check if HeadRoomAlpha is a number and is between 0 and 1.- Parameters:
headRoomAlpha- headroomalpha.- Throws:
YarnException- exceptions from yarn servers.
-
isNumeric
Determines whether the given value is a number.- Parameters:
value- given value.- Returns:
- true, is a number, false, not a number.
-
getQueue
-
setQueue
-
getPolicyManagerClassName
-
setPolicyManagerClassName
-
toString
-