diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/AbstractClientRequestInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/AbstractClientRequestInterceptor.java index 01ba3bdcadf..f8dc4f54b9f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/AbstractClientRequestInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/AbstractClientRequestInterceptor.java @@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory; /** * Implements the {@link ClientRequestInterceptor} interface and provides common * functionality which can can be used and/or extended by other concrete - * intercepter classes. + * interceptor classes. * */ public abstract class AbstractClientRequestInterceptor diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/ClientRequestInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/ClientRequestInterceptor.java index 2f8fb936345..3e3ffce5f4b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/ClientRequestInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/ClientRequestInterceptor.java @@ -22,14 +22,14 @@ import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.yarn.api.ApplicationClientProtocol; /** - * Defines the contract to be implemented by the request intercepter classes, + * Defines the contract to be implemented by the request interceptor classes, * that can be used to intercept and inspect messages sent from the client to * the resource manager. */ public interface ClientRequestInterceptor extends ApplicationClientProtocol, Configurable { /** - * This method is called for initializing the intercepter. This is guaranteed + * This method is called for initializing the interceptor. This is guaranteed * to be called only once in the lifetime of this instance. * * @param user the name of the client @@ -37,28 +37,28 @@ public interface ClientRequestInterceptor void init(String user); /** - * This method is called to release the resources held by the intercepter. + * This method is called to release the resources held by the interceptor. * This will be called when the application pipeline is being destroyed. The * concrete implementations should dispose the resources and forward the - * request to the next intercepter, if any. + * request to the next interceptor, if any. */ void shutdown(); /** - * Sets the next intercepter in the pipeline. The concrete implementation of + * Sets the next interceptor in the pipeline. The concrete implementation of * this interface should always pass the request to the nextInterceptor after - * inspecting the message. The last intercepter in the chain is responsible to + * inspecting the message. The last interceptor in the chain is responsible to * send the messages to the resource manager service and so the last - * intercepter will not receive this method call. + * interceptor will not receive this method call. * * @param nextInterceptor the ClientRequestInterceptor to set in the pipeline */ void setNextInterceptor(ClientRequestInterceptor nextInterceptor); /** - * Returns the next intercepter in the chain. + * Returns the next interceptor in the chain. * - * @return the next intercepter in the chain + * @return the next interceptor in the chain */ ClientRequestInterceptor getNextInterceptor(); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java index 7e7bd5afcf5..45cec641502 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/FederationClientInterceptor.java @@ -141,7 +141,7 @@ import org.apache.hadoop.classification.VisibleForTesting; * Extends the {@code AbstractRequestInterceptorClient} class and provides an * implementation for federation of YARN RM and scaling an application across * multiple YARN SubClusters. All the federation specific implementation is - * encapsulated in this class. This is always the last intercepter in the chain. + * encapsulated in this class. This is always the last interceptor in the chain. */ public class FederationClientInterceptor extends AbstractClientRequestInterceptor { @@ -662,7 +662,7 @@ public class FederationClientInterceptor * Router: the Client will timeout and resubmit the request. * * ResourceManager: the Router calls each Yarn RM in parallel. In case a - * Yarn RM fails, a single call will timeout. However the Router will + * Yarn RM fails, a single call will timeout. However, the Router will * merge the ApplicationReports it got, and provides a partial list to * the client. * diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/RouterClientRMService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/RouterClientRMService.java index 955c48fd953..acf5bfa8fb9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/RouterClientRMService.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/RouterClientRMService.java @@ -202,10 +202,10 @@ public class RouterClientRMService extends AbstractService } /** - * Returns the comma separated intercepter class names from the configuration. + * Returns the comma separated interceptor class names from the configuration. * * @param conf - * @return the intercepter class names as an instance of ArrayList + * @return the interceptor class names as an instance of ArrayList */ private List getInterceptorClassNames(Configuration conf) { String configuredInterceptorClassNames = @@ -489,9 +489,9 @@ public class RouterClientRMService extends AbstractService } /** - * Gets the Request intercepter chains for all the users. + * Gets the Request interceptor chains for all the users. * - * @return the request intercepter chains. + * @return the request interceptor chains. */ @VisibleForTesting protected Map getPipelines() { @@ -499,10 +499,10 @@ public class RouterClientRMService extends AbstractService } /** - * This method creates and returns reference of the first intercepter in the - * chain of request intercepter instances. + * This method creates and returns reference of the first interceptor in the + * chain of request interceptor instances. * - * @return the reference of the first intercepter in the chain + * @return the reference of the first interceptor in the chain */ @VisibleForTesting protected ClientRequestInterceptor createRequestInterceptorChain() { @@ -548,7 +548,7 @@ public class RouterClientRMService extends AbstractService } /** - * Initializes the request intercepter pipeline for the specified application. + * Initializes the request interceptor pipeline for the specified application. * * @param user */ @@ -600,9 +600,9 @@ public class RouterClientRMService extends AbstractService } /** - * Gets the root request intercepter. + * Gets the root request interceptor. * - * @return the root request intercepter + * @return the root request interceptor */ public synchronized ClientRequestInterceptor getRootInterceptor() { return rootInterceptor; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/AbstractRMAdminRequestInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/AbstractRMAdminRequestInterceptor.java index a4972fcb9ad..f789aa2b47e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/AbstractRMAdminRequestInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/AbstractRMAdminRequestInterceptor.java @@ -23,7 +23,7 @@ import org.apache.hadoop.conf.Configuration; /** * Implements the {@link RMAdminRequestInterceptor} interface and provides * common functionality which can can be used and/or extended by other concrete - * intercepter classes. + * interceptor classes. * */ public abstract class AbstractRMAdminRequestInterceptor diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/RMAdminRequestInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/RMAdminRequestInterceptor.java index dc4bda01b90..29ab9e6add2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/RMAdminRequestInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/RMAdminRequestInterceptor.java @@ -22,14 +22,14 @@ import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.yarn.server.api.ResourceManagerAdministrationProtocol; /** - * Defines the contract to be implemented by the request intercepter classes, + * Defines the contract to be implemented by the request interceptor classes, * that can be used to intercept and inspect messages sent from the client to * the resource manager. */ public interface RMAdminRequestInterceptor extends ResourceManagerAdministrationProtocol, Configurable { /** - * This method is called for initializing the intercepter. This is guaranteed + * This method is called for initializing the interceptor. This is guaranteed * to be called only once in the lifetime of this instance. * * @param user the name of the client @@ -37,28 +37,28 @@ public interface RMAdminRequestInterceptor void init(String user); /** - * This method is called to release the resources held by the intercepter. + * This method is called to release the resources held by the interceptor. * This will be called when the application pipeline is being destroyed. The * concrete implementations should dispose the resources and forward the - * request to the next intercepter, if any. + * request to the next interceptor, if any. */ void shutdown(); /** - * Sets the next intercepter in the pipeline. The concrete implementation of + * Sets the next interceptor in the pipeline. The concrete implementation of * this interface should always pass the request to the nextInterceptor after - * inspecting the message. The last intercepter in the chain is responsible to + * inspecting the message. The last interceptor in the chain is responsible to * send the messages to the resource manager service and so the last - * intercepter will not receive this method call. + * interceptor will not receive this method call. * * @param nextInterceptor the RMAdminRequestInterceptor to set in the pipeline */ void setNextInterceptor(RMAdminRequestInterceptor nextInterceptor); /** - * Returns the next intercepter in the chain. + * Returns the next interceptor in the chain. * - * @return the next intercepter in the chain + * @return the next interceptor in the chain */ RMAdminRequestInterceptor getNextInterceptor(); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/RouterRMAdminService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/RouterRMAdminService.java index e05de7a8994..3e23d6fcf9c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/RouterRMAdminService.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/rmadmin/RouterRMAdminService.java @@ -82,7 +82,7 @@ import org.apache.hadoop.classification.VisibleForTesting; * messages from client to the cluster resource manager. It listens * {@code ResourceManagerAdministrationProtocol} messages from the client and * creates a request intercepting pipeline instance for each client. The - * pipeline is a chain of intercepter instances that can inspect and modify the + * pipeline is a chain of interceptor instances that can inspect and modify the * request/response as needed. The main difference with AMRMProxyService is the * protocol they implement. */ @@ -165,10 +165,10 @@ public class RouterRMAdminService extends AbstractService } /** - * Returns the comma separated intercepter class names from the configuration. + * Returns the comma separated interceptor class names from the configuration. * * @param conf - * @return the intercepter class names as an instance of ArrayList + * @return the interceptor class names as an instance of ArrayList */ private List getInterceptorClassNames(Configuration conf) { String configuredInterceptorClassNames = @@ -197,9 +197,9 @@ public class RouterRMAdminService extends AbstractService } /** - * Gets the Request intercepter chains for all the users. + * Gets the Request interceptor chains for all the users. * - * @return the request intercepter chains. + * @return the request interceptor chains. */ @VisibleForTesting protected Map getPipelines() { @@ -207,10 +207,10 @@ public class RouterRMAdminService extends AbstractService } /** - * This method creates and returns reference of the first intercepter in the - * chain of request intercepter instances. + * This method creates and returns reference of the first interceptor in the + * chain of request interceptor instances. * - * @return the reference of the first intercepter in the chain + * @return the reference of the first interceptor in the chain */ @VisibleForTesting protected RMAdminRequestInterceptor createRequestInterceptorChain() { @@ -257,7 +257,7 @@ public class RouterRMAdminService extends AbstractService } /** - * Initializes the request intercepter pipeline for the specified user. + * Initializes the request interceptor pipeline for the specified user. * * @param user */ @@ -308,9 +308,9 @@ public class RouterRMAdminService extends AbstractService } /** - * Gets the root request intercepter. + * Gets the root request interceptor. * - * @return the root request intercepter + * @return the root request interceptor */ public synchronized RMAdminRequestInterceptor getRootInterceptor() { return rootInterceptor; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/AbstractRESTRequestInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/AbstractRESTRequestInterceptor.java index a2d78a479ab..f1919c2e5a1 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/AbstractRESTRequestInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/AbstractRESTRequestInterceptor.java @@ -22,7 +22,7 @@ import org.apache.hadoop.conf.Configuration; /** * Extends the RequestInterceptor class and provides common functionality which - * can be used and/or extended by other concrete intercepter classes. + * can be used and/or extended by other concrete interceptor classes. */ public abstract class AbstractRESTRequestInterceptor implements RESTRequestInterceptor { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationInterceptorREST.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationInterceptorREST.java index 10b15775af1..690715c9b3d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationInterceptorREST.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationInterceptorREST.java @@ -111,7 +111,7 @@ import org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ThreadFact * Extends the {@code AbstractRESTRequestInterceptor} class and provides an * implementation for federation of YARN RM and scaling an application across * multiple YARN SubClusters. All the federation specific implementation is - * encapsulated in this class. This is always the last intercepter in the chain. + * encapsulated in this class. This is always the last interceptor in the chain. */ public class FederationInterceptorREST extends AbstractRESTRequestInterceptor { @@ -406,7 +406,7 @@ public class FederationInterceptorREST extends AbstractRESTRequestInterceptor { if (newApp == null || newApp.getApplicationId() == null) { routerMetrics.incrAppsFailedSubmitted(); String errMsg = "Missing ApplicationSubmissionContextInfo or " - + "applicationSubmissionContex information."; + + "applicationSubmissionContext information."; return Response .status(Status.BAD_REQUEST) .entity(errMsg) @@ -667,7 +667,7 @@ public class FederationInterceptorREST extends AbstractRESTRequestInterceptor { *

* ResourceManager: the Router calls each YARN RM in parallel by using one * thread for each YARN RM. In case a YARN RM fails, a single call will - * timeout. However the Router will merge the ApplicationReports it got, and + * timeout. However, the Router will merge the ApplicationReports it got, and * provides a partial list to the client. *

* State Store: the Router will timeout and it will retry depending on the @@ -942,7 +942,7 @@ public class FederationInterceptorREST extends AbstractRESTRequestInterceptor { *

* ResourceManager: the Router calls each YARN RM in parallel by using one * thread for each YARN RM. In case a YARN RM fails, a single call will - * timeout. However the Router will use the NodesInfo it got, and provides a + * timeout. However, the Router will use the NodesInfo it got, and provides a * partial list to the client. *

* State Store: the Router will timeout and it will retry depending on the diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RESTRequestInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RESTRequestInterceptor.java index 06f39b5e393..917809ad6cd 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RESTRequestInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RESTRequestInterceptor.java @@ -29,7 +29,7 @@ import org.apache.hadoop.yarn.server.webapp.dao.ContainerInfo; import org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo; /** - * Defines the contract to be implemented by the request intercepter classes, + * Defines the contract to be implemented by the request interceptor classes, * that can be used to intercept and inspect messages sent from the client to * the resource manager server. * @@ -42,7 +42,7 @@ public interface RESTRequestInterceptor extends RMWebServiceProtocol, Configurable { /** - * This method is called for initializing the intercepter. This is guaranteed + * This method is called for initializing the interceptor. This is guaranteed * to be called only once in the lifetime of this instance. * * @param user the name of the client @@ -50,28 +50,28 @@ public interface RESTRequestInterceptor void init(String user); /** - * This method is called to release the resources held by the intercepter. + * This method is called to release the resources held by the interceptor. * This will be called when the application pipeline is being destroyed. The * concrete implementations should dispose the resources and forward the - * request to the next intercepter, if any. + * request to the next interceptor, if any. */ void shutdown(); /** - * Sets the next intercepter in the pipeline. The concrete implementation of + * Sets the next interceptor in the pipeline. The concrete implementation of * this interface should always pass the request to the nextInterceptor after - * inspecting the message. The last intercepter in the chain is responsible to + * inspecting the message. The last interceptor in the chain is responsible to * send the messages to the resource manager service and so the last - * intercepter will not receive this method call. + * interceptor will not receive this method call. * * @param nextInterceptor the RESTRequestInterceptor to set in the pipeline */ void setNextInterceptor(RESTRequestInterceptor nextInterceptor); /** - * Returns the next intercepter in the chain. + * Returns the next interceptor in the chain. * - * @return the next intercepter in the chain + * @return the next interceptor in the chain */ RESTRequestInterceptor getNextInterceptor(); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RouterWebServiceUtil.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RouterWebServiceUtil.java index 6d7dc5f5c19..7f595069239 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RouterWebServiceUtil.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RouterWebServiceUtil.java @@ -83,7 +83,7 @@ public final class RouterWebServiceUtil { /** * Creates and performs a REST call to a specific WebService. * - * @param webApp the address of the remote webap + * @param webApp the address of the remote webapp * @param hsr the servlet request * @param returnType the return type of the REST call * @param Type of return object. @@ -170,7 +170,7 @@ public final class RouterWebServiceUtil { /** * Performs an invocation of a REST call on a remote RMWebService. - * @param webApp the address of the remote webap + * @param webApp the address of the remote webapp * @param path to add to the webapp address * @param method the HTTP method of the REST call * @param additionalPath the servlet request path @@ -280,7 +280,7 @@ public final class RouterWebServiceUtil { /** * Merges a list of AppInfo grouping by ApplicationId. Our current policy is - * to merge the application reports from the reacheable SubClusters. Via + * to merge the application reports from the reachable SubClusters. Via * configuration parameter, we decide whether to return applications for which * the primary AM is missing or to omit them. * @@ -494,7 +494,7 @@ public final class RouterWebServiceUtil { protected static String getMediaTypeFromHttpServletRequest( HttpServletRequest request, final Class returnType) { if (request == null) { - // By default we return XML for REST call without HttpServletRequest + // By default, we return XML for REST call without HttpServletRequest return MediaType.APPLICATION_XML; } // TODO @@ -503,7 +503,7 @@ public final class RouterWebServiceUtil { } String header = request.getHeader(HttpHeaders.ACCEPT); if (header == null || header.equals("*")) { - // By default we return JSON + // By default, we return JSON return MediaType.APPLICATION_JSON; } return header; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RouterWebServices.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RouterWebServices.java index c221b86e984..6beafc8183f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RouterWebServices.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/RouterWebServices.java @@ -141,10 +141,10 @@ public class RouterWebServices implements RMWebServiceProtocol { } /** - * Returns the comma separated intercepter class names from the configuration. + * Returns the comma separated interceptor class names from the configuration. * * @param conf - * @return the intercepter class names as an instance of ArrayList + * @return the interceptor class names as an instance of ArrayList */ private List getInterceptorClassNames(Configuration config) { String configuredInterceptorClassNames = @@ -189,9 +189,9 @@ public class RouterWebServices implements RMWebServiceProtocol { } /** - * Gets the Request intercepter chains for all the users. + * Gets the Request interceptor chains for all the users. * - * @return the request intercepter chains. + * @return the request interceptor chains. */ @VisibleForTesting protected Map getPipelines() { @@ -199,10 +199,10 @@ public class RouterWebServices implements RMWebServiceProtocol { } /** - * This method creates and returns reference of the first intercepter in the - * chain of request intercepter instances. + * This method creates and returns reference of the first interceptor in the + * chain of request interceptor instances. * - * @return the reference of the first intercepter in the chain + * @return the reference of the first interceptor in the chain */ @VisibleForTesting protected RESTRequestInterceptor createRequestInterceptorChain() { @@ -247,7 +247,7 @@ public class RouterWebServices implements RMWebServiceProtocol { } /** - * Initializes the request intercepter pipeline for the specified user. + * Initializes the request interceptor pipeline for the specified user. * * @param user */ @@ -298,9 +298,9 @@ public class RouterWebServices implements RMWebServiceProtocol { } /** - * Gets the root request intercepter. + * Gets the root request interceptor. * - * @return the root request intercepter + * @return the root request interceptor */ public synchronized RESTRequestInterceptor getRootInterceptor() { return rootInterceptor; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/BaseRouterClientRMTest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/BaseRouterClientRMTest.java index 1d726d3ff16..905b60f31ee 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/BaseRouterClientRMTest.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/BaseRouterClientRMTest.java @@ -134,7 +134,7 @@ public abstract class BaseRouterClientRMTest { String mockPassThroughInterceptorClass = PassThroughClientRequestInterceptor.class.getName(); - // Create a request intercepter pipeline for testing. The last one in the + // Create a request interceptor pipeline for testing. The last one in the // chain will call the mock resource manager. The others in the chain will // simply forward it to the next one in the chain config.set(YarnConfiguration.ROUTER_CLIENTRM_INTERCEPTOR_CLASS_PIPELINE, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/PassThroughClientRequestInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/PassThroughClientRequestInterceptor.java index a35feaeaa31..d4820fc12b5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/PassThroughClientRequestInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/PassThroughClientRequestInterceptor.java @@ -93,8 +93,8 @@ import org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsRespo import org.apache.hadoop.yarn.exceptions.YarnException; /** - * Mock intercepter that does not do anything other than forwarding it to the - * next intercepter in the chain. + * Mock interceptor that does not do anything other than forwarding it to the + * next interceptor in the chain. */ public class PassThroughClientRequestInterceptor extends AbstractClientRequestInterceptor { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptor.java index 64995ca1dac..49872e5a41b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptor.java @@ -121,7 +121,7 @@ import org.slf4j.LoggerFactory; * use the {@code RouterClientRMService} pipeline test cases for testing the * {@code FederationInterceptor} class. The tests for * {@code RouterClientRMService} has been written cleverly so that it can be - * reused to validate different request intercepter chains. + * reused to validate different request interceptor chains. */ public class TestFederationClientInterceptor extends BaseRouterClientRMTest { private static final Logger LOG = @@ -180,8 +180,8 @@ public class TestFederationClientInterceptor extends BaseRouterClientRMTest { String mockPassThroughInterceptorClass = PassThroughClientRequestInterceptor.class.getName(); - // Create a request intercepter pipeline for testing. The last one in the - // chain is the federation intercepter that calls the mock resource manager. + // Create a request interceptor pipeline for testing. The last one in the + // chain is the federation interceptor that calls the mock resource manager. // The others in the chain will simply forward it to the next one in the // chain conf.set(YarnConfiguration.ROUTER_CLIENTRM_INTERCEPTOR_CLASS_PIPELINE, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptorRetry.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptorRetry.java index 37278861afa..096fa063907 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptorRetry.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestFederationClientInterceptorRetry.java @@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory; * use the {@code RouterClientRMService} pipeline test cases for testing the * {@code FederationInterceptor} class. The tests for * {@code RouterClientRMService} has been written cleverly so that it can be - * reused to validate different request intercepter chains. + * reused to validate different request interceptor chains. * * It tests the case with SubClusters down and the Router logic of retries. We * have 1 good SubCluster and 2 bad ones for all the tests. @@ -137,8 +137,8 @@ public class TestFederationClientInterceptorRetry String mockPassThroughInterceptorClass = PassThroughClientRequestInterceptor.class.getName(); - // Create a request intercepter pipeline for testing. The last one in the - // chain is the federation intercepter that calls the mock resource manager. + // Create a request interceptor pipeline for testing. The last one in the + // chain is the federation interceptor that calls the mock resource manager. // The others in the chain will simply forward it to the next one in the // chain conf.set(YarnConfiguration.ROUTER_CLIENTRM_INTERCEPTOR_CLASS_PIPELINE, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestRouterYarnClientUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestRouterYarnClientUtils.java index 0ab2e8a7e5c..d586c4827e0 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestRouterYarnClientUtils.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/clientrm/TestRouterYarnClientUtils.java @@ -424,7 +424,7 @@ public class TestRouterYarnClientUtils { GetQueueUserAclsInfoResponse response3 = Records.newRecord( GetQueueUserAclsInfoResponse.class); - // null responce + // null response GetQueueUserAclsInfoResponse response4 = null; List responses = new ArrayList<>(); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/BaseRouterRMAdminTest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/BaseRouterRMAdminTest.java index d3eba618028..79fd03ca7eb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/BaseRouterRMAdminTest.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/BaseRouterRMAdminTest.java @@ -91,7 +91,7 @@ public abstract class BaseRouterRMAdminTest { String mockPassThroughInterceptorClass = PassThroughRMAdminRequestInterceptor.class.getName(); - // Create a request intercepter pipeline for testing. The last one in the + // Create a request interceptor pipeline for testing. The last one in the // chain will call the mock resource manager. The others in the chain will // simply forward it to the next one in the chain this.conf.set(YarnConfiguration.ROUTER_RMADMIN_INTERCEPTOR_CLASS_PIPELINE, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/MockRMAdminRequestInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/MockRMAdminRequestInterceptor.java index ee55b63ac40..f9adbfdec82 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/MockRMAdminRequestInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/MockRMAdminRequestInterceptor.java @@ -27,7 +27,7 @@ import org.apache.hadoop.yarn.server.resourcemanager.AdminService; import org.apache.hadoop.yarn.server.resourcemanager.MockRM; /** - * This class mocks the RMAmdinRequestInterceptor. + * This class mocks the RMAdminRequestInterceptor. */ public class MockRMAdminRequestInterceptor extends DefaultRMAdminRequestInterceptor { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/PassThroughRMAdminRequestInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/PassThroughRMAdminRequestInterceptor.java index 4d6a3eaf52b..e3be25009fc 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/PassThroughRMAdminRequestInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/rmadmin/PassThroughRMAdminRequestInterceptor.java @@ -52,8 +52,8 @@ import org.apache.hadoop.yarn.server.api.protocolrecords.UpdateNodeResourceReque import org.apache.hadoop.yarn.server.api.protocolrecords.UpdateNodeResourceResponse; /** - * Mock intercepter that does not do anything other than forwarding it to the - * next intercepter in the chain. + * Mock interceptor that does not do anything other than forwarding it to the + * next interceptor in the chain. */ public class PassThroughRMAdminRequestInterceptor extends AbstractRMAdminRequestInterceptor { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/BaseRouterWebServicesTest.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/BaseRouterWebServicesTest.java index e24ad47bf7c..025f44d4bd2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/BaseRouterWebServicesTest.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/BaseRouterWebServicesTest.java @@ -94,7 +94,7 @@ public abstract class BaseRouterWebServicesTest { String mockPassThroughInterceptorClass = PassThroughRESTRequestInterceptor.class.getName(); - // Create a request intercepter pipeline for testing. The last one in the + // Create a request interceptor pipeline for testing. The last one in the // chain will call the mock resource manager. The others in the chain will // simply forward it to the next one in the chain config.set(YarnConfiguration.ROUTER_WEBAPP_INTERCEPTOR_CLASS_PIPELINE, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/JavaProcess.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/JavaProcess.java index e2611d91ba7..180cb5536b6 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/JavaProcess.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/JavaProcess.java @@ -34,15 +34,15 @@ public class JavaProcess { this(clazz, null, output); } - public JavaProcess(Class clazz, List addClasspaths, File output) + public JavaProcess(Class clazz, List addClassPaths, File output) throws IOException, InterruptedException { String javaHome = System.getProperty("java.home"); String javaBin = javaHome + File.separator + "bin" + File.separator + "java"; String classpath = System.getProperty("java.class.path"); classpath = classpath.concat("./src/test/resources"); - if (addClasspaths != null) { - for (String addClasspath : addClasspaths) { + if (addClassPaths != null) { + for (String addClasspath : addClassPaths) { classpath = classpath.concat(File.pathSeparatorChar + addClasspath); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/PassThroughRESTRequestInterceptor.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/PassThroughRESTRequestInterceptor.java index 31f8b8b990f..219020f2bbd 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/PassThroughRESTRequestInterceptor.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/PassThroughRESTRequestInterceptor.java @@ -62,8 +62,8 @@ import org.apache.hadoop.yarn.server.webapp.dao.ContainerInfo; import org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo; /** - * Mock intercepter that does not do anything other than forwarding it to the - * next intercepter in the chain. + * Mock interceptor that does not do anything other than forwarding it to the + * next interceptor in the chain. */ public class PassThroughRESTRequestInterceptor extends AbstractRESTRequestInterceptor { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/TestFederationInterceptorREST.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/TestFederationInterceptorREST.java index 2e099f54e0c..03215e4f87f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/TestFederationInterceptorREST.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/TestFederationInterceptorREST.java @@ -61,7 +61,7 @@ import org.slf4j.LoggerFactory; * use the {@code RouterClientRMService} pipeline test cases for testing the * {@code FederationInterceptor} class. The tests for * {@code RouterClientRMService} has been written cleverly so that it can be - * reused to validate different request intercepter chains. + * reused to validate different request interceptor chains. */ public class TestFederationInterceptorREST extends BaseRouterWebServicesTest { private static final Logger LOG = @@ -119,8 +119,8 @@ public class TestFederationInterceptorREST extends BaseRouterWebServicesTest { String mockPassThroughInterceptorClass = PassThroughRESTRequestInterceptor.class.getName(); - // Create a request intercepter pipeline for testing. The last one in the - // chain is the federation intercepter that calls the mock resource manager. + // Create a request interceptor pipeline for testing. The last one in the + // chain is the federation interceptor that calls the mock resource manager. // The others in the chain will simply forward it to the next one in the // chain conf.set(YarnConfiguration.ROUTER_CLIENTRM_INTERCEPTOR_CLASS_PIPELINE, @@ -239,7 +239,7 @@ public class TestFederationInterceptorREST extends BaseRouterWebServicesTest { } /** - * This test validates the correctness of SubmitApplication in case of of + * This test validates the correctness of SubmitApplication in case of * application in wrong format. */ @Test diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/TestFederationInterceptorRESTRetry.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/TestFederationInterceptorRESTRetry.java index e563d5a5820..b2f421e25ae 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/TestFederationInterceptorRESTRetry.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/TestFederationInterceptorRESTRetry.java @@ -139,8 +139,8 @@ public class TestFederationInterceptorRESTRetry String mockPassThroughInterceptorClass = PassThroughClientRequestInterceptor.class.getName(); - // Create a request intercepter pipeline for testing. The last one in the - // chain is the federation intercepter that calls the mock resource manager. + // Create a request interceptor pipeline for testing. The last one in the + // chain is the federation interceptor that calls the mock resource manager. // The others in the chain will simply forward it to the next one in the // chain conf.set(YarnConfiguration.ROUTER_CLIENTRM_INTERCEPTOR_CLASS_PIPELINE,