Class RejectAMRMProxyPolicy
java.lang.Object
org.apache.hadoop.yarn.server.federation.policies.AbstractConfigurableFederationPolicy
org.apache.hadoop.yarn.server.federation.policies.amrmproxy.AbstractAMRMProxyPolicy
org.apache.hadoop.yarn.server.federation.policies.amrmproxy.RejectAMRMProxyPolicy
- All Implemented Interfaces:
FederationAMRMProxyPolicy,ConfigurableFederationPolicy
An implementation of the
FederationAMRMProxyPolicy that simply
rejects all requests. Useful to prevent apps from accessing any sub-cluster.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreinitialize(FederationPolicyInitializationContext policyContext) This method is invoked to initialize of update the configuration of policies.Map<SubClusterId,List<org.apache.hadoop.yarn.api.records.ResourceRequest>> splitResourceRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> resourceRequests, Set<SubClusterId> timedOutSubClusters) Splits theResourceRequests from the client across one or more sub-clusters based on the policy semantics (e.g., broadcast, load-based).Methods inherited from class org.apache.hadoop.yarn.server.federation.policies.amrmproxy.AbstractAMRMProxyPolicy
notifyOfResponse, validateMethods inherited from class org.apache.hadoop.yarn.server.federation.policies.AbstractConfigurableFederationPolicy
getActiveSubclusters, getIsDirty, getPolicyContext, getPolicyInfo, setPolicyContext, setPolicyInfo
-
Constructor Details
-
RejectAMRMProxyPolicy
public RejectAMRMProxyPolicy()
-
-
Method Details
-
reinitialize
public void reinitialize(FederationPolicyInitializationContext policyContext) throws FederationPolicyInitializationException Description copied from interface:ConfigurableFederationPolicyThis method is invoked to initialize of update the configuration of policies. The implementor should provide try-n-swap semantics, and retain state if possible.- Specified by:
reinitializein interfaceConfigurableFederationPolicy- Overrides:
reinitializein classAbstractConfigurableFederationPolicy- Parameters:
policyContext- the new context to provide to implementor.- Throws:
FederationPolicyInitializationException- in case the initialization fails.
-
splitResourceRequests
public Map<SubClusterId,List<org.apache.hadoop.yarn.api.records.ResourceRequest>> splitResourceRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> resourceRequests, Set<SubClusterId> timedOutSubClusters) throws org.apache.hadoop.yarn.exceptions.YarnException Description copied from interface:FederationAMRMProxyPolicySplits theResourceRequests from the client across one or more sub-clusters based on the policy semantics (e.g., broadcast, load-based).- Parameters:
resourceRequests- the list ofResourceRequests from the AM to be splittimedOutSubClusters- the set of sub-clusters that haven't had a successful heart-beat response for a while.- Returns:
- map of sub-cluster as identified by
SubClusterIdto the list ofResourceRequests that should be forwarded to it - Throws:
org.apache.hadoop.yarn.exceptions.YarnException- in case the request is malformed or no viable sub-clusters can be found.
-