YARN-11050 (#3805)
This commit is contained in:
parent
4483607a4e
commit
07141426e0
@ -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}. */
|
||||
|
@ -398,7 +398,7 @@ Response addToClusterNodeLabels(NodeLabelsInfo newNodeLabels,
|
||||
* @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;
|
||||
|
||||
/**
|
||||
|
@ -1435,7 +1435,7 @@ public Response addToClusterNodeLabels(final NodeLabelsInfo newNodeLabels,
|
||||
@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);
|
||||
|
@ -330,7 +330,7 @@ public Response addToClusterNodeLabels(NodeLabelsInfo newNodeLabels,
|
||||
}
|
||||
|
||||
@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,
|
||||
|
@ -1205,7 +1205,7 @@ public Response addToClusterNodeLabels(NodeLabelsInfo newNodeLabels,
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response removeFromCluserNodeLabels(Set<String> oldNodeLabels,
|
||||
public Response removeFromClusterNodeLabels(Set<String> oldNodeLabels,
|
||||
HttpServletRequest hsr) throws Exception {
|
||||
throw new NotImplementedException("Code is not implemented");
|
||||
}
|
||||
|
@ -637,13 +637,13 @@ public Response addToClusterNodeLabels(NodeLabelsInfo newNodeLabels,
|
||||
@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
|
||||
|
@ -245,8 +245,8 @@ protected Response addToClusterNodeLabels(String user) throws Exception {
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ public Response addToClusterNodeLabels(NodeLabelsInfo newNodeLabels,
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response removeFromCluserNodeLabels(Set<String> oldNodeLabels,
|
||||
public Response removeFromClusterNodeLabels(Set<String> oldNodeLabels,
|
||||
HttpServletRequest hsr) throws Exception {
|
||||
return Response.status(Status.OK).build();
|
||||
}
|
||||
|
@ -248,9 +248,9 @@ public Response addToClusterNodeLabels(NodeLabelsInfo newNodeLabels,
|
||||
}
|
||||
|
||||
@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
|
||||
|
@ -132,7 +132,7 @@ public void testRouterWebServicesE2E() throws Exception {
|
||||
Response response4 = addToClusterNodeLabels(user);
|
||||
Assert.assertNotNull(response4);
|
||||
|
||||
Response response5 = removeFromCluserNodeLabels(user);
|
||||
Response response5 = removeFromClusterNodeLabels(user);
|
||||
Assert.assertNotNull(response5);
|
||||
|
||||
NodeLabelsInfo nodeLabelsInfo2 = getLabelsOnNode(user);
|
||||
|
@ -1203,10 +1203,10 @@ public void testAddToClusterNodeLabelsXML() throws Exception {
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user