YARN-11500. Fix typos in hadoop-yarn-server-common#federation. (#5702)
This commit is contained in:
parent
d9980ab40f
commit
fd3c3ae068
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue