@Path(value="/ws/v1/node") public class NMWebServices extends Object
Constructor and Description |
---|
NMWebServices(Context nm,
ResourceView view,
org.apache.hadoop.yarn.webapp.WebApp webapp) |
NMWebServices(Context nm,
ResourceView view,
org.apache.hadoop.yarn.webapp.WebApp webapp,
javax.servlet.http.HttpServletResponse response) |
Modifier and Type | Method and Description |
---|---|
NodeInfo |
get() |
AuxiliaryServicesInfo |
getAuxiliaryServices(javax.servlet.http.HttpServletRequest hsr) |
javax.ws.rs.core.Response |
getContainerLogFile(String containerIdStr,
String filename,
String format,
String size)
Returns the contents of a container's log file in plain text.
|
javax.ws.rs.core.Response |
getContainerLogsInfo(javax.servlet.http.HttpServletRequest hsr,
javax.servlet.http.HttpServletResponse res,
String containerIdStr)
Returns log file's name as well as current file size for a container.
|
javax.ws.rs.core.Response |
getLogs(String containerIdStr,
String filename,
String format,
String size)
Returns the contents of a container's log file in plain text.
|
Object |
getNMResourceInfo(String resourceName) |
AppInfo |
getNodeApp(String appId) |
AppsInfo |
getNodeApps(javax.servlet.http.HttpServletRequest hsr,
String stateQuery,
String userQuery) |
ContainerInfo |
getNodeContainer(javax.servlet.http.HttpServletRequest hsr,
String id) |
ContainersInfo |
getNodeContainers(javax.servlet.http.HttpServletRequest hsr) |
NodeInfo |
getNodeInfo() |
protected Boolean |
hasAccess(String user,
org.apache.hadoop.yarn.api.records.ApplicationId appId,
javax.servlet.http.HttpServletRequest hsr) |
protected Boolean |
hasAdminAccess(javax.servlet.http.HttpServletRequest hsr) |
javax.ws.rs.core.Response |
putAuxiliaryServices(javax.servlet.http.HttpServletRequest req,
AuxServiceRecords services) |
javax.ws.rs.core.Response |
syncYarnSysFS(javax.servlet.http.HttpServletRequest req,
String user,
String appId,
String spec) |
@Inject public NMWebServices(Context nm, ResourceView view, org.apache.hadoop.yarn.webapp.WebApp webapp)
public NMWebServices(Context nm, ResourceView view, org.apache.hadoop.yarn.webapp.WebApp webapp, javax.servlet.http.HttpServletResponse response)
@GET @Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"}) public NodeInfo get()
@GET @Path(value="/info") @Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"}) public NodeInfo getNodeInfo()
@GET @Path(value="/apps") @Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AppsInfo getNodeApps(@Context javax.servlet.http.HttpServletRequest hsr, @QueryParam(value="state") String stateQuery, @QueryParam(value="user") String userQuery)
@GET @Path(value="/apps/{appid}") @Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AppInfo getNodeApp(@PathParam(value="appid") String appId)
@GET @Path(value="/containers") @Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"}) public ContainersInfo getNodeContainers(@Context javax.servlet.http.HttpServletRequest hsr)
@GET @Path(value="/containers/{containerid}") @Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"}) public ContainerInfo getNodeContainer(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam(value="containerid") String id)
@GET @Path(value="/containers/{containerid}/logs") @Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response getContainerLogsInfo(@Context javax.servlet.http.HttpServletRequest hsr, @Context javax.servlet.http.HttpServletResponse res, @PathParam(value="containerid") String containerIdStr)
hsr
- HttpServletRequestres
- HttpServletResponsecontainerIdStr
- The container ID@GET @Path(value="/containers/{containerid}/logs/{filename}") @Produces(value="text/plain; charset=utf-8") @InterfaceAudience.Public @InterfaceStability.Unstable public javax.ws.rs.core.Response getContainerLogFile(@PathParam(value="containerid") String containerIdStr, @PathParam(value="filename") String filename, @QueryParam(value="format") String format, @QueryParam(value="size") String size)
containerIdStr
- The container IDfilename
- The name of the log fileformat
- The content typesize
- the size of the log file@GET @Path(value="/containerlogs/{containerid}/{filename}") @Produces(value="text/plain; charset=utf-8") @InterfaceAudience.Public @InterfaceStability.Unstable public javax.ws.rs.core.Response getLogs(@PathParam(value="containerid") String containerIdStr, @PathParam(value="filename") String filename, @QueryParam(value="format") String format, @QueryParam(value="size") String size)
containerIdStr
- The container IDfilename
- The name of the log fileformat
- The content typesize
- the size of the log file@GET @Path(value="/resources/{resourcename}") @Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"}) public Object getNMResourceInfo(@PathParam(value="resourcename") String resourceName) throws org.apache.hadoop.yarn.exceptions.YarnException
org.apache.hadoop.yarn.exceptions.YarnException
@GET @Path(value="/auxiliaryservices") @Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AuxiliaryServicesInfo getAuxiliaryServices(@Context javax.servlet.http.HttpServletRequest hsr)
@PUT @Path(value="/auxiliaryservices") @Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response putAuxiliaryServices(@Context javax.servlet.http.HttpServletRequest req, AuxServiceRecords services)
@PUT @Path(value="/yarn/sysfs/{user}/{appId}") @Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response syncYarnSysFS(@Context javax.servlet.http.HttpServletRequest req, @PathParam(value="user") String user, @PathParam(value="appId") String appId, String spec)
protected Boolean hasAccess(String user, org.apache.hadoop.yarn.api.records.ApplicationId appId, javax.servlet.http.HttpServletRequest hsr)
protected Boolean hasAdminAccess(javax.servlet.http.HttpServletRequest hsr)
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.