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 @@ import org.apache.hadoop.yarn.server.federation.policies.exceptions.FederationPo
/** /**
* This interface provides a general method to reinitialize a policy. The * 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 * 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 { public interface ConfigurableFederationPolicy {

View File

@ -237,7 +237,7 @@ public final class FederationPolicyUtils {
} }
} }
} }
// 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 // float rounding kicks in during subtractions
return lastIndex; return lastIndex;
} }

View File

@ -165,7 +165,7 @@ public class RouterPolicyFacade {
* This method reinitializes a policy and loads it in the policyMap. * This method reinitializes a policy and loads it in the policyMap.
* *
* @param queue the queue to initialize a policy for. * @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. * @throws FederationPolicyInitializationException if initialization fails.
*/ */

View File

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

View File

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

View File

@ -25,14 +25,14 @@ import org.apache.hadoop.yarn.server.federation.store.records.SubClusterPolicyCo
/** /**
* *
* 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 * configuration as a {@link SubClusterPolicyConfiguration}, as well as provide
* (re)initialization mechanics for the underlying * (re)initialization mechanics for the underlying
* {@link FederationAMRMProxyPolicy} and {@link FederationRouterPolicy}. * {@link FederationAMRMProxyPolicy} and {@link FederationRouterPolicy}.
* *
* The serialization aspects are used by admin APIs or a policy engine to store * The serialization aspects are used by admin APIs or a policy engine to store
* a serialized configuration in the {@code FederationStateStore}, while the * 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. * {@code Router} and {@code AMRMProxy} respectively.
* *
* This interface by design binds together {@link FederationAMRMProxyPolicy} and * This interface by design binds together {@link FederationAMRMProxyPolicy} and
@ -71,14 +71,14 @@ public interface FederationPolicyManager {
* 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 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 policyContext the current context
* @param oldInstance the existing (possibly null) instance. * @param oldInstance the existing (possibly null) instance.
* *
* @return an updated {@link FederationRouterPolicy}. * @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 * be completed properly. The oldInstance should be still valid in
* case of failed initialization. * case of failed initialization.
*/ */

View File

@ -24,7 +24,7 @@ import org.apache.hadoop.yarn.server.federation.policies.router.RejectRouterPoli
* This class represents a simple implementation of a {@code * This class represents a simple implementation of a {@code
* FederationPolicyManager}. * 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 * is to be used to prevent applications in a specific queue (or if used as
* default for non-configured queues) from accessing cluster resources. * default for non-configured queues) from accessing cluster resources.
*/ */

View File

@ -116,7 +116,7 @@ public abstract class AbstractRouterPolicy extends
/** /**
* Simply picks from alphabetically-sorted active subclusters based on the * 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 * sub-cluster, as far as the number of active sub-cluster and their names
* remain the same. * remain the same.
* *

View File

@ -816,7 +816,7 @@ public class TestLocalityMulticastAMRMProxyPolicy
// The randomly selected sub-cluster should at least be active // The randomly selected sub-cluster should at least be active
Assert.assertTrue(activeClusters.containsKey(originalResult)); 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(); return getHomeSubCluster();
} }
} }

View File

@ -39,7 +39,7 @@ import org.junit.Test;
/** /**
* Simple test class for the {@link WeightedRandomRouterPolicy}. Generate large * 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. * clusters go inactive.
*/ */
public class TestWeightedRandomRouterPolicy extends BaseRouterPoliciesTest { public class TestWeightedRandomRouterPolicy extends BaseRouterPoliciesTest {