YARN-8502. Use path strings consistently for webservice endpoints in RMWebServices. Contributed by Szilard Nemeth.
This commit is contained in:
parent
d503f65b66
commit
82ac3aa6d0
@ -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";
|
||||
|
||||
|
@ -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 })
|
||||
|
Loading…
Reference in New Issue
Block a user