Przeglądaj źródła

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

slfan1989 2 lat temu
rodzic
commit
fd3c3ae068
10 zmienionych plików z 14 dodań i 14 usunięć
  1. 1 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/ConfigurableFederationPolicy.java
  2. 1 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/FederationPolicyUtils.java
  3. 1 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/RouterPolicyFacade.java
  4. 1 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/amrmproxy/RejectAMRMProxyPolicy.java
  5. 2 2
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/dao/WeightedPolicyInfo.java
  6. 4 4
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/manager/FederationPolicyManager.java
  7. 1 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/manager/RejectAllPolicyManager.java
  8. 1 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/router/AbstractRouterPolicy.java
  9. 1 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/policies/amrmproxy/TestLocalityMulticastAMRMProxyPolicy.java
  10. 1 1
      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/policies/router/TestWeightedRandomRouterPolicy.java

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/ConfigurableFederationPolicy.java

@@ -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
  * 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 {
 

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/FederationPolicyUtils.java

@@ -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
     return lastIndex;
   }

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/RouterPolicyFacade.java

@@ -165,7 +165,7 @@ public class RouterPolicyFacade {
    * 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.
    */

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/amrmproxy/RejectAMRMProxyPolicy.java

@@ -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());

+ 2 - 2
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/dao/WeightedPolicyInfo.java

@@ -44,7 +44,7 @@ import com.sun.jersey.api.json.JSONMarshaller;
 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 @@ public class WeightedPolicyInfo {
    *
    * @return the {@link WeightedPolicyInfo} represented.
    *
-   * @throws FederationPolicyInitializationException if a deserializaiton error
+   * @throws FederationPolicyInitializationException if a deserialization error
    *           occurs.
    */
   public static WeightedPolicyInfo fromByteBuffer(ByteBuffer bb)

+ 4 - 4
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/manager/FederationPolicyManager.java

@@ -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
  * (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 @@ public interface FederationPolicyManager {
    * 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.
    */

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/manager/RejectAllPolicyManager.java

@@ -24,7 +24,7 @@ import org.apache.hadoop.yarn.server.federation.policies.router.RejectRouterPoli
  * 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.
  */

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/policies/router/AbstractRouterPolicy.java

@@ -116,7 +116,7 @@ public abstract class AbstractRouterPolicy extends
 
   /**
    * 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.
    *

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/policies/amrmproxy/TestLocalityMulticastAMRMProxyPolicy.java

@@ -816,7 +816,7 @@ public class TestLocalityMulticastAMRMProxyPolicy
       // 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();
     }
   }

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/policies/router/TestWeightedRandomRouterPolicy.java

@@ -39,7 +39,7 @@ import org.junit.Test;
 
 /**
  * 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 {