Class AbstractAMRMProxyPolicy
java.lang.Object
org.apache.hadoop.yarn.server.federation.policies.AbstractConfigurableFederationPolicy
org.apache.hadoop.yarn.server.federation.policies.amrmproxy.AbstractAMRMProxyPolicy
- All Implemented Interfaces:
FederationAMRMProxyPolicy,ConfigurableFederationPolicy
- Direct Known Subclasses:
BroadcastAMRMProxyPolicy,HomeAMRMProxyPolicy,LocalityMulticastAMRMProxyPolicy,RejectAMRMProxyPolicy
public abstract class AbstractAMRMProxyPolicy
extends AbstractConfigurableFederationPolicy
implements FederationAMRMProxyPolicy
Base abstract class for
FederationAMRMProxyPolicy implementations,
that provides common validation for reinitialization.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidnotifyOfResponse(SubClusterId subClusterId, org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse response) This method should be invoked to notify the policy about responses being received.voidvalidate(WeightedPolicyInfo newPolicyInfo) Overridable validation step for the policy configuration.Methods inherited from class org.apache.hadoop.yarn.server.federation.policies.AbstractConfigurableFederationPolicy
getActiveSubclusters, getIsDirty, getPolicyContext, getPolicyInfo, reinitialize, setPolicyContext, setPolicyInfoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.yarn.server.federation.policies.ConfigurableFederationPolicy
reinitializeMethods inherited from interface org.apache.hadoop.yarn.server.federation.policies.amrmproxy.FederationAMRMProxyPolicy
splitResourceRequests
-
Constructor Details
-
AbstractAMRMProxyPolicy
public AbstractAMRMProxyPolicy()
-
-
Method Details
-
validate
public void validate(WeightedPolicyInfo newPolicyInfo) throws FederationPolicyInitializationException Description copied from class:AbstractConfigurableFederationPolicyOverridable validation step for the policy configuration.- Overrides:
validatein classAbstractConfigurableFederationPolicy- Parameters:
newPolicyInfo- the configuration to test.- Throws:
FederationPolicyInitializationException- if the configuration is not valid.
-
notifyOfResponse
public void notifyOfResponse(SubClusterId subClusterId, org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse response) throws org.apache.hadoop.yarn.exceptions.YarnException Description copied from interface:FederationAMRMProxyPolicyThis method should be invoked to notify the policy about responses being received. This is useful for stateful policies that make decisions based on previous responses being received.- Specified by:
notifyOfResponsein interfaceFederationAMRMProxyPolicy- Parameters:
subClusterId- the id of the subcluster sending the notificationresponse- the response received from one of the RMs- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- in case the response is not valid
-