YARN-11500. Fix typos in hadoop-yarn-server-common#federation. (#5702)

This commit is contained in:
slfan1989 2023-06-06 06:49:36 +08:00 committed by GitHub
parent d9980ab40f
commit fd3c3ae068
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 14 additions and 14 deletions

View File

@ -22,7 +22,7 @@
/**
* This interface provides a general method to reinitialize a policy. The
* semantics are try-n-swap, so in case of an exception is thrown the
* implmentation must ensure the previous state and configuration is preserved.
* implementation must ensure the previous state and configuration is preserved.
*/
public interface ConfigurableFederationPolicy {

View File

@ -237,7 +237,7 @@ public static int getWeightedRandom(ArrayList<Float> weights) {
}
}
}
// This can only happen if samplePoint is very close to totoalWeight and
// This can only happen if samplePoint is very close to totalWeight and
// float rounding kicks in during subtractions
return lastIndex;
}

View File

@ -165,7 +165,7 @@ public SubClusterId getHomeSubcluster(
* This method reinitializes a policy and loads it in the policyMap.
*
* @param queue the queue to initialize a policy for.
* @param conf the configuration to use for initalization.
* @param conf the configuration to use for initialization.
*
* @throws FederationPolicyInitializationException if initialization fails.
*/

View File

@ -39,7 +39,7 @@ public class RejectAMRMProxyPolicy extends AbstractAMRMProxyPolicy {
@Override
public void reinitialize(FederationPolicyInitializationContext policyContext)
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.
FederationPolicyInitializationContextValidator.validate(policyContext,
this.getClass().getCanonicalName());

View File

@ -44,7 +44,7 @@
import com.sun.jersey.api.json.JSONUnmarshaller;
/**
* This is a DAO class for the configuration of parameteres for federation
* This is a DAO class for the configuration of parameters for federation
* policies. This generalizes several possible configurations as two lists of
* {@link SubClusterIdInfo} and corresponding weights as a {@link Float}. The
* interpretation of the weight is left to the logic in the policy.
@ -85,7 +85,7 @@ private static JSONJAXBContext initContext() {
*
* @return the {@link WeightedPolicyInfo} represented.
*
* @throws FederationPolicyInitializationException if a deserializaiton error
* @throws FederationPolicyInitializationException if a deserialization error
* occurs.
*/
public static WeightedPolicyInfo fromByteBuffer(ByteBuffer bb)

View File

@ -25,14 +25,14 @@
/**
*
* Implementors need to provide the ability to serliaze a policy and its
* Implementors need to provide the ability to serialize a policy and its
* configuration as a {@link SubClusterPolicyConfiguration}, as well as provide
* (re)initialization mechanics for the underlying
* {@link FederationAMRMProxyPolicy} and {@link FederationRouterPolicy}.
*
* The serialization aspects are used by admin APIs or a policy engine to store
* a serialized configuration in the {@code FederationStateStore}, while the
* getters methods are used to obtain a propertly inizialized policy in the
* getters methods are used to obtain a properly initialized policy in the
* {@code Router} and {@code AMRMProxy} respectively.
*
* This interface by design binds together {@link FederationAMRMProxyPolicy} and
@ -71,14 +71,14 @@ FederationAMRMProxyPolicy getAMRMPolicy(
* context, otherwise a new instance initialized with the current context is
* provided. If the instance is compatible with the current class the
* implementors should attempt to reinitalize (retaining state). To affect a
* complete policy reset oldInstance shoulb be set to null.
* complete policy reset oldInstance should be set to null.
*
* @param policyContext the current context
* @param oldInstance the existing (possibly null) instance.
*
* @return an updated {@link FederationRouterPolicy}.
*
* @throws FederationPolicyInitializationException if the initalization cannot
* @throws FederationPolicyInitializationException if the initialization cannot
* be completed properly. The oldInstance should be still valid in
* case of failed initialization.
*/

View File

@ -24,7 +24,7 @@
* This class represents a simple implementation of a {@code
* FederationPolicyManager}.
*
* This policy rejects all reuqests for both router and amrmproxy routing. This
* This policy rejects all requests for both router and amrmproxy routing. This
* is to be used to prevent applications in a specific queue (or if used as
* default for non-configured queues) from accessing cluster resources.
*/

View File

@ -116,7 +116,7 @@ protected Map<SubClusterId, SubClusterInfo> prefilterSubClusters(
/**
* Simply picks from alphabetically-sorted active subclusters based on the
* hash of quey name. Jobs of the same queue will all be routed to the same
* hash of query name. Jobs of the same queue will all be routed to the same
* sub-cluster, as far as the number of active sub-cluster and their names
* remain the same.
*

View File

@ -816,7 +816,7 @@ protected SubClusterId getSubClusterForUnResolvedRequest(
// The randomly selected sub-cluster should at least be active
Assert.assertTrue(activeClusters.containsKey(originalResult));
// Alwasy use home sub-cluster so that unit test is deterministic
// Always use home sub-cluster so that unit test is deterministic
return getHomeSubCluster();
}
}

View File

@ -39,7 +39,7 @@
/**
* Simple test class for the {@link WeightedRandomRouterPolicy}. Generate large
* number of randomized tests to check we are weighiting correctly even if
* number of randomized tests to check we are weighting correctly even if
* clusters go inactive.
*/
public class TestWeightedRandomRouterPolicy extends BaseRouterPoliciesTest {