YARN-8502. Use path strings consistently for webservice endpoints in RMWebServices. Contributed by Szilard Nemeth.

This commit is contained in:
Giovanni Matteo Fumarola 2018-07-10 10:36:17 -07:00
parent d503f65b66
commit 82ac3aa6d0
2 changed files with 6 additions and 3 deletions

View File

@ -42,6 +42,9 @@ public final class RMWSConsts {
/** Path for {@code RMWebServiceProtocol#getSchedulerInfo}. */
public static final String SCHEDULER = "/scheduler";
/** Path for {@code RMWebServices#updateSchedulerConfiguration}. */
public static final String SCHEDULER_CONF = "/scheduler-conf";
/** Path for {@code RMWebServiceProtocol#dumpSchedulerLogs}. */
public static final String SCHEDULER_LOGS = "/scheduler/logs";

View File

@ -955,7 +955,7 @@ public ContainersInfo getContainers(@Context HttpServletRequest req,
}
@GET
@Path("/apps/{appid}/appattempts/{appattemptid}/containers/{containerid}")
@Path(RMWSConsts.GET_CONTAINER)
@Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 })
@Override
@ -969,7 +969,7 @@ public ContainerInfo getContainer(@Context HttpServletRequest req,
}
@GET
@Path("/apps/{appid}/state")
@Path(RMWSConsts.APPS_APPID_STATE)
@Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 })
@Override
@ -2422,7 +2422,7 @@ protected List<ContainerReport> getContainersReport(
}
@PUT
@Path("/scheduler-conf")
@Path(RMWSConsts.SCHEDULER_CONF)
@Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 })
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })