Class NMWebServices
java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.webapp.NMWebServices
-
Constructor Summary
ConstructorsConstructorDescriptionNMWebServices(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) -
Method Summary
Modifier and TypeMethodDescriptionget()getAuxiliaryServices(javax.servlet.http.HttpServletRequest hsr) javax.ws.rs.core.ResponsegetContainerLogFile(String containerIdStr, String filename, String format, String size) Returns the contents of a container's log file in plain text.javax.ws.rs.core.ResponsegetContainerLogsInfo(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.ResponseReturns the contents of a container's log file in plain text.getNMResourceInfo(String resourceName) getNodeApp(String appId) getNodeApps(javax.servlet.http.HttpServletRequest hsr, String stateQuery, String userQuery) getNodeContainer(javax.servlet.http.HttpServletRequest hsr, String id) getNodeContainers(javax.servlet.http.HttpServletRequest hsr) protected BooleanhasAccess(String user, org.apache.hadoop.yarn.api.records.ApplicationId appId, javax.servlet.http.HttpServletRequest hsr) protected BooleanhasAdminAccess(javax.servlet.http.HttpServletRequest hsr) javax.ws.rs.core.ResponseputAuxiliaryServices(javax.servlet.http.HttpServletRequest req, AuxServiceRecords services) javax.ws.rs.core.ResponsesyncYarnSysFS(javax.servlet.http.HttpServletRequest req, String user, String appId, String spec)
-
Constructor Details
-
NMWebServices
@Inject public NMWebServices(@Named("nm") Context nm, @Named("view") ResourceView view, @Named("webapp") org.apache.hadoop.yarn.webapp.WebApp webapp) -
NMWebServices
public NMWebServices(Context nm, ResourceView view, org.apache.hadoop.yarn.webapp.WebApp webapp, javax.servlet.http.HttpServletResponse response)
-
-
Method Details
-
get
@GET @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public NodeInfo get() -
getNodeInfo
@GET @Path("/info") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public NodeInfo getNodeInfo() -
getNodeApps
-
getNodeApp
-
getNodeContainers
@GET @Path("/containers") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public ContainersInfo getNodeContainers(@Context javax.servlet.http.HttpServletRequest hsr) -
getNodeContainer
@GET @Path("/containers/{containerid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public ContainerInfo getNodeContainer(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("containerid") String id) -
getContainerLogsInfo
@GET @Path("/containers/{containerid}/logs") @Produces({"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("containerid") String containerIdStr) Returns log file's name as well as current file size for a container.- Parameters:
hsr- HttpServletRequestres- HttpServletResponsecontainerIdStr- The container ID- Returns:
- The log file's name and current file size
-
getContainerLogFile
@GET @Path("/containers/{containerid}/logs/{filename}") @Produces("text/plain; charset=utf-8") @Public @Unstable public javax.ws.rs.core.Response getContainerLogFile(@PathParam("containerid") String containerIdStr, @PathParam("filename") String filename, @QueryParam("format") String format, @QueryParam("size") String size) Returns the contents of a container's log file in plain text. Only works for containers that are still in the NodeManager's memory, so logs are no longer available after the corresponding application is no longer running.- Parameters:
containerIdStr- The container IDfilename- The name of the log fileformat- The content typesize- the size of the log file- Returns:
- The contents of the container's log file
-
getLogs
@GET @Path("/containerlogs/{containerid}/{filename}") @Produces("text/plain; charset=utf-8") @Public @Unstable public javax.ws.rs.core.Response getLogs(@PathParam("containerid") String containerIdStr, @PathParam("filename") String filename, @QueryParam("format") String format, @QueryParam("size") String size) Returns the contents of a container's log file in plain text. Only works for containers that are still in the NodeManager's memory, so logs are no longer available after the corresponding application is no longer running.- Parameters:
containerIdStr- The container IDfilename- The name of the log fileformat- The content typesize- the size of the log file- Returns:
- The contents of the container's log file
-
getNMResourceInfo
@GET @Path("/resources/{resourcename}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public NMResourceInfo getNMResourceInfo(@PathParam("resourcename") String resourceName) throws org.apache.hadoop.yarn.exceptions.YarnException - Throws:
org.apache.hadoop.yarn.exceptions.YarnException
-
getAuxiliaryServices
@GET @Path("/auxiliaryservices") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AuxiliaryServicesInfo getAuxiliaryServices(@Context javax.servlet.http.HttpServletRequest hsr) -
putAuxiliaryServices
@PUT @Path("/auxiliaryservices") @Produces({"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) -
syncYarnSysFS
-
hasAccess
-
hasAdminAccess
-