YARN-11050 (#3805)

This commit is contained in:
Szilard Nemeth 2021-12-18 04:52:03 +01:00 committed by GitHub
parent 4483607a4e
commit 07141426e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 15 additions and 15 deletions

View File

@ -126,7 +126,7 @@ public final class RMWSConsts {
/** Path for {@code RMWebServiceProtocol#addToClusterNodeLabels}. */
public static final String ADD_NODE_LABELS = "/add-node-labels";
/** Path for {@code RMWebServiceProtocol#removeFromCluserNodeLabels}. */
/** Path for {@code RMWebServiceProtocol#removeFromClusterNodeLabels}. */
public static final String REMOVE_NODE_LABELS = "/remove-node-labels";
/** Path for {@code RMWebServiceProtocol#getLabelsOnNode}. */

View File

@ -398,7 +398,7 @@ public interface RMWebServiceProtocol {
* @return Response containing the status code
* @throws Exception in case of bad request
*/
Response removeFromCluserNodeLabels(Set<String> oldNodeLabels,
Response removeFromClusterNodeLabels(Set<String> oldNodeLabels,
HttpServletRequest hsr) throws Exception;
/**

View File

@ -1435,7 +1435,7 @@ public class RMWebServices extends WebServices implements RMWebServiceProtocol {
@Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 })
@Override
public Response removeFromCluserNodeLabels(
public Response removeFromClusterNodeLabels(
@QueryParam(RMWSConsts.LABELS) Set<String> oldNodeLabels,
@Context HttpServletRequest hsr) throws Exception {
UserGroupInformation callerUGI = getCallerUserGroupInformation(hsr, true);

View File

@ -330,7 +330,7 @@ public class DefaultRequestInterceptorREST
}
@Override
public Response removeFromCluserNodeLabels(Set<String> oldNodeLabels,
public Response removeFromClusterNodeLabels(Set<String> oldNodeLabels,
HttpServletRequest hsr) throws Exception {
// oldNodeLabels is specified inside hsr
return RouterWebServiceUtil.genericForward(webAppAddress, hsr,

View File

@ -1205,7 +1205,7 @@ public class FederationInterceptorREST extends AbstractRESTRequestInterceptor {
}
@Override
public Response removeFromCluserNodeLabels(Set<String> oldNodeLabels,
public Response removeFromClusterNodeLabels(Set<String> oldNodeLabels,
HttpServletRequest hsr) throws Exception {
throw new NotImplementedException("Code is not implemented");
}

View File

@ -637,13 +637,13 @@ public class RouterWebServices implements RMWebServiceProtocol {
@Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 })
@Override
public Response removeFromCluserNodeLabels(
public Response removeFromClusterNodeLabels(
@QueryParam(RMWSConsts.LABELS) Set<String> oldNodeLabels,
@Context HttpServletRequest hsr) throws Exception {
init();
RequestInterceptorChainWrapper pipeline = getInterceptorChain(hsr);
return pipeline.getRootInterceptor()
.removeFromCluserNodeLabels(oldNodeLabels, hsr);
.removeFromClusterNodeLabels(oldNodeLabels, hsr);
}
@GET

View File

@ -245,8 +245,8 @@ public abstract class BaseRouterWebServicesTest {
null, createHttpServletRequest(user));
}
protected Response removeFromCluserNodeLabels(String user) throws Exception {
return routerWebService.removeFromCluserNodeLabels(
protected Response removeFromClusterNodeLabels(String user) throws Exception {
return routerWebService.removeFromClusterNodeLabels(
null, createHttpServletRequest(user));
}

View File

@ -215,7 +215,7 @@ public class MockRESTRequestInterceptor extends AbstractRESTRequestInterceptor {
}
@Override
public Response removeFromCluserNodeLabels(Set<String> oldNodeLabels,
public Response removeFromClusterNodeLabels(Set<String> oldNodeLabels,
HttpServletRequest hsr) throws Exception {
return Response.status(Status.OK).build();
}

View File

@ -248,9 +248,9 @@ public class PassThroughRESTRequestInterceptor
}
@Override
public Response removeFromCluserNodeLabels(Set<String> oldNodeLabels,
public Response removeFromClusterNodeLabels(Set<String> oldNodeLabels,
HttpServletRequest hsr) throws Exception {
return getNextInterceptor().removeFromCluserNodeLabels(oldNodeLabels, hsr);
return getNextInterceptor().removeFromClusterNodeLabels(oldNodeLabels, hsr);
}
@Override

View File

@ -132,7 +132,7 @@ public class TestRouterWebServices extends BaseRouterWebServicesTest {
Response response4 = addToClusterNodeLabels(user);
Assert.assertNotNull(response4);
Response response5 = removeFromCluserNodeLabels(user);
Response response5 = removeFromClusterNodeLabels(user);
Assert.assertNotNull(response5);
NodeLabelsInfo nodeLabelsInfo2 = getLabelsOnNode(user);

View File

@ -1203,10 +1203,10 @@ public class TestRouterWebServicesREST {
/**
* This test validates the correctness of
* {@link RMWebServiceProtocol#removeFromCluserNodeLabels()} inside Router.
* {@link RMWebServiceProtocol#removeFromClusterNodeLabels} inside Router.
*/
@Test(timeout = 2000)
public void testRemoveFromCluserNodeLabelsXML()
public void testRemoveFromClusterNodeLabelsXML()
throws Exception {
// Test with a wrong HTTP method