Skip to content

Commit

Permalink
YARN-11203. Fix typo in hadoop-yarn-server-router module. (#4510). Co…
Browse files Browse the repository at this point in the history
…ntributed by fanshilun.

Reviewed-by: Fei Hui <[email protected]>
Signed-off-by: Ayush Saxena <[email protected]>
  • Loading branch information
slfan1989 authored Jul 23, 2022
1 parent 2c96357 commit 63db1a8
Show file tree
Hide file tree
Showing 25 changed files with 98 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,43 @@
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
*/
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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
* 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 {
Expand Down Expand Up @@ -662,7 +662,7 @@ public GetApplicationReportResponse getApplicationReport(
* 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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ public Server getServer() {
}

/**
* 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<String> getInterceptorClassNames(Configuration conf) {
String configuredInterceptorClassNames =
Expand Down Expand Up @@ -489,20 +489,20 @@ void refreshServiceAcls(Configuration configuration,
}

/**
* 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<String, RequestInterceptorChainWrapper> getPipelines() {
return this.userPipelineMap;
}

/**
* 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() {
Expand Down Expand Up @@ -548,7 +548,7 @@ protected ClientRequestInterceptor createRequestInterceptorChain() {
}

/**
* Initializes the request intercepter pipeline for the specified application.
* Initializes the request interceptor pipeline for the specified application.
*
* @param user
*/
Expand Down Expand Up @@ -600,9 +600,9 @@ public synchronized void init(ClientRequestInterceptor interceptor) {
}

/**
* 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,43 @@
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
*/
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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
* 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.
*/
Expand Down Expand Up @@ -165,10 +165,10 @@ public Server getServer() {
}

/**
* 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<String> getInterceptorClassNames(Configuration conf) {
String configuredInterceptorClassNames =
Expand Down Expand Up @@ -197,20 +197,20 @@ protected RequestInterceptorChainWrapper getInterceptorChain()
}

/**
* 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<String, RequestInterceptorChainWrapper> getPipelines() {
return this.userPipelineMap;
}

/**
* 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() {
Expand Down Expand Up @@ -257,7 +257,7 @@ protected RMAdminRequestInterceptor createRequestInterceptorChain() {
}

/**
* Initializes the request intercepter pipeline for the specified user.
* Initializes the request interceptor pipeline for the specified user.
*
* @param user
*/
Expand Down Expand Up @@ -308,9 +308,9 @@ public synchronized void init(RMAdminRequestInterceptor interceptor) {
}

/**
* 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
* 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
* 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 {

Expand Down Expand Up @@ -406,7 +406,7 @@ public Response submitApplication(ApplicationSubmissionContextInfo newApp,
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)
Expand Down Expand Up @@ -667,7 +667,7 @@ public Response updateAppState(AppState targetState, HttpServletRequest hsr,
* <p>
* 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.
* <p>
* State Store: the Router will timeout and it will retry depending on the
Expand Down Expand Up @@ -942,7 +942,7 @@ private SubClusterInfo getNodeSubcluster(String nodeId)
* <p>
* 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.
* <p>
* State Store: the Router will timeout and it will retry depending on the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
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.
*
Expand All @@ -42,36 +42,36 @@ 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
*/
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();

Expand Down
Loading

0 comments on commit 63db1a8

Please sign in to comment.