YARN-11500. [Addendum] Fix typos in hadoop-yarn-server-common#federation. (#6212) Contributed by Shilun Fan.
Reviewed-by: Inigo Goiri <inigoiri@apache.org> Signed-off-by: Shilun Fan <slfan1989@apache.org>
This commit is contained in:
parent
9d48af8d70
commit
80a22a736e
@ -53,7 +53,7 @@ public void reinitialize(
|
|||||||
initializationContext.getSubClusterPolicyConfiguration().getParams());
|
initializationContext.getSubClusterPolicyConfiguration().getParams());
|
||||||
|
|
||||||
// if nothing has changed skip the rest of initialization
|
// if nothing has changed skip the rest of initialization
|
||||||
// and signal to childs that the reinit is free via isDirty var.
|
// and signal to children that the reinit is free via isDirty var.
|
||||||
if (policyInfo != null && policyInfo.equals(newPolicyInfo)) {
|
if (policyInfo != null && policyInfo.equals(newPolicyInfo)) {
|
||||||
isDirty = false;
|
isDirty = false;
|
||||||
return;
|
return;
|
||||||
|
@ -40,25 +40,25 @@ public static void validate(
|
|||||||
if (policyContext == null) {
|
if (policyContext == null) {
|
||||||
throw new FederationPolicyInitializationException(
|
throw new FederationPolicyInitializationException(
|
||||||
"The FederationPolicyInitializationContext provided is null. Cannot"
|
"The FederationPolicyInitializationContext provided is null. Cannot"
|
||||||
+ " reinitalize " + "successfully.");
|
+ " reinitialize " + "successfully.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (policyContext.getFederationStateStoreFacade() == null) {
|
if (policyContext.getFederationStateStoreFacade() == null) {
|
||||||
throw new FederationPolicyInitializationException(
|
throw new FederationPolicyInitializationException(
|
||||||
"The FederationStateStoreFacade provided is null. Cannot"
|
"The FederationStateStoreFacade provided is null. Cannot"
|
||||||
+ " reinitalize successfully.");
|
+ " reinitialize successfully.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (policyContext.getFederationSubclusterResolver() == null) {
|
if (policyContext.getFederationSubclusterResolver() == null) {
|
||||||
throw new FederationPolicyInitializationException(
|
throw new FederationPolicyInitializationException(
|
||||||
"The FederationSubclusterResolver provided is null. Cannot"
|
"The FederationSubclusterResolver provided is null. Cannot"
|
||||||
+ " reinitalize successfully.");
|
+ " reinitialize successfully.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (policyContext.getSubClusterPolicyConfiguration() == null) {
|
if (policyContext.getSubClusterPolicyConfiguration() == null) {
|
||||||
throw new FederationPolicyInitializationException(
|
throw new FederationPolicyInitializationException(
|
||||||
"The SubClusterPolicyConfiguration provided is null. Cannot "
|
"The SubClusterPolicyConfiguration provided is null. Cannot "
|
||||||
+ "reinitalize successfully.");
|
+ "reinitialize successfully.");
|
||||||
}
|
}
|
||||||
|
|
||||||
String intendedType =
|
String intendedType =
|
||||||
|
@ -41,7 +41,7 @@ public class BroadcastAMRMProxyPolicy extends AbstractAMRMProxyPolicy {
|
|||||||
public void reinitialize(
|
public void reinitialize(
|
||||||
FederationPolicyInitializationContext policyContext)
|
FederationPolicyInitializationContext policyContext)
|
||||||
throws FederationPolicyInitializationException {
|
throws FederationPolicyInitializationException {
|
||||||
// overrides initialize to avoid weight checks that do no apply for
|
// overrides initialize to avoid weight checks that do not apply for
|
||||||
// this policy.
|
// this policy.
|
||||||
FederationPolicyInitializationContextValidator
|
FederationPolicyInitializationContextValidator
|
||||||
.validate(policyContext, this.getClass().getCanonicalName());
|
.validate(policyContext, this.getClass().getCanonicalName());
|
||||||
|
@ -394,7 +394,7 @@ private void splitAnyRequests(List<ResourceRequest> originalResourceRequests,
|
|||||||
targetSubclusters = allocationBookkeeper.getActiveAndEnabledSC();
|
targetSubclusters = allocationBookkeeper.getActiveAndEnabledSC();
|
||||||
}
|
}
|
||||||
|
|
||||||
// SECOND: pick how much to ask to each RM for each request
|
// SECOND: pick how much to ask each RM for each request
|
||||||
splitIndividualAny(resourceRequest, targetSubclusters,
|
splitIndividualAny(resourceRequest, targetSubclusters,
|
||||||
allocationBookkeeper);
|
allocationBookkeeper);
|
||||||
}
|
}
|
||||||
|
@ -53,10 +53,10 @@ public abstract class AbstractPolicyManager implements
|
|||||||
* @param federationPolicyContext the current context
|
* @param federationPolicyContext the current context
|
||||||
* @param oldInstance the existing (possibly null) instance.
|
* @param oldInstance the existing (possibly null) instance.
|
||||||
*
|
*
|
||||||
* @return a valid and fully reinitalized {@link FederationAMRMProxyPolicy}
|
* @return a valid and fully reinitialized {@link FederationAMRMProxyPolicy}
|
||||||
* instance
|
* instance
|
||||||
*
|
*
|
||||||
* @throws FederationPolicyInitializationException if the reinitalization is
|
* @throws FederationPolicyInitializationException if the reinitialization is
|
||||||
* not valid, and ensure
|
* not valid, and ensure
|
||||||
* previous state is preserved
|
* previous state is preserved
|
||||||
*/
|
*/
|
||||||
@ -89,10 +89,10 @@ public FederationAMRMProxyPolicy getAMRMPolicy(
|
|||||||
* @param federationPolicyContext the current context
|
* @param federationPolicyContext the current context
|
||||||
* @param oldInstance the existing (possibly null) instance.
|
* @param oldInstance the existing (possibly null) instance.
|
||||||
*
|
*
|
||||||
* @return a valid and fully reinitalized {@link FederationRouterPolicy}
|
* @return a valid and fully reinitialized {@link FederationRouterPolicy}
|
||||||
* instance
|
* instance
|
||||||
*
|
*
|
||||||
* @throws FederationPolicyInitializationException if the reinitalization is
|
* @throws FederationPolicyInitializationException if the reinitialization is
|
||||||
* not valid, and ensure
|
* not valid, and ensure
|
||||||
* previous state is preserved
|
* previous state is preserved
|
||||||
*/
|
*/
|
||||||
|
@ -48,7 +48,7 @@ public interface FederationPolicyManager {
|
|||||||
* instance of {@link FederationAMRMProxyPolicy} reinitialized with the
|
* instance of {@link FederationAMRMProxyPolicy} reinitialized with the
|
||||||
* current context, otherwise a new instance initialized with the current
|
* current context, otherwise a new instance initialized with the current
|
||||||
* context is provided. If the instance is compatible with the current class
|
* context is provided. If the instance is compatible with the current class
|
||||||
* the implementors should attempt to reinitalize (retaining state). To affect
|
* the implementors should attempt to reinitialize (retaining state). To affect
|
||||||
* a complete policy reset oldInstance should be null.
|
* a complete policy reset oldInstance should be null.
|
||||||
*
|
*
|
||||||
* @param policyContext the current context
|
* @param policyContext the current context
|
||||||
@ -70,7 +70,7 @@ FederationAMRMProxyPolicy getAMRMPolicy(
|
|||||||
* instance of {@link FederationRouterPolicy} reinitialized with the current
|
* instance of {@link FederationRouterPolicy} reinitialized with the current
|
||||||
* context, otherwise a new instance initialized with the current context is
|
* context, otherwise a new instance initialized with the current context is
|
||||||
* provided. If the instance is compatible with the current class the
|
* provided. If the instance is compatible with the current class the
|
||||||
* implementors should attempt to reinitalize (retaining state). To affect a
|
* implementors should attempt to reinitialize (retaining state). To affect a
|
||||||
* complete policy reset oldInstance should be set to null.
|
* complete policy reset oldInstance should be set to null.
|
||||||
*
|
*
|
||||||
* @param policyContext the current context
|
* @param policyContext the current context
|
||||||
|
Loading…
Reference in New Issue
Block a user