@Path(value="/ws/v2/applicationlog") public class LogWebService extends Object implements AppInfoProvider
Constructor and Description |
---|
LogWebService() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.yarn.server.webapp.BasicAppInfo |
getApp(javax.servlet.http.HttpServletRequest req,
String appId,
String clusterId)
Returns
BasicAppInfo object that wraps the collected information
about the application. |
javax.ws.rs.core.Response |
getContainerLogFile(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String containerIdStr,
String filename,
String format,
String size,
String nmId,
boolean redirectedFromNode,
String clusterId,
boolean manualRedirection)
Returns the contents of a container's log file in plain text.
|
javax.ws.rs.core.Response |
getContainerLogsInfo(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String containerIdStr,
String nmId,
boolean redirectedFromNode,
String clusterId,
boolean manualRedirection)
Returns log file's name as well as current file size for a container.
|
protected org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity |
getEntity(String path,
javax.ws.rs.core.MultivaluedMap<String,String> params) |
javax.ws.rs.core.Response |
getLogs(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String containerIdStr,
String filename,
String format,
String size,
String nmId,
boolean redirectedFromNode,
String clusterId,
boolean manualRedirection) |
String |
getNodeHttpAddress(javax.servlet.http.HttpServletRequest req,
String appId,
String appAttemptId,
String containerId,
String clusterId)
Returns the node HTTP address.
|
@GET @Path(value="/containers/{containerid}/logs") @Produces(value={"application/json","application/xml"}) public javax.ws.rs.core.Response getContainerLogsInfo(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam(value="containerid") String containerIdStr, @QueryParam(value="nm.id") String nmId, @QueryParam(value="redirected_from_node") @DefaultValue(value="false") boolean redirectedFromNode, @QueryParam(value="clusterid") String clusterId, @QueryParam(value="manual_redirection") @DefaultValue(value="false") boolean manualRedirection)
req
- HttpServletRequestres
- HttpServletResponsecontainerIdStr
- The container IDnmId
- The Node Manager NodeIdredirectedFromNode
- Whether this is a redirected request from NMpublic String getNodeHttpAddress(javax.servlet.http.HttpServletRequest req, String appId, String appAttemptId, String containerId, String clusterId)
AppInfoProvider
getNodeHttpAddress
in interface AppInfoProvider
req
- HttpServletRequest
associated with the requestappId
- the id of the applicationappAttemptId
- the id of the application attemptcontainerId
- the container idclusterId
- the id of the clusterpublic org.apache.hadoop.yarn.server.webapp.BasicAppInfo getApp(javax.servlet.http.HttpServletRequest req, String appId, String clusterId)
AppInfoProvider
BasicAppInfo
object that wraps the collected information
about the application.getApp
in interface AppInfoProvider
req
- HttpServletRequest
associated with the requestappId
- the id of the applicationclusterId
- the id of the clusterBasicAppInfo
object@GET @Path(value="/containers/{containerid}/logs/{filename}") @Produces(value="text/plain") @InterfaceAudience.Public @InterfaceStability.Unstable public javax.ws.rs.core.Response getContainerLogFile(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam(value="containerid") String containerIdStr, @PathParam(value="filename") String filename, @QueryParam(value="format") String format, @QueryParam(value="size") String size, @QueryParam(value="nm.id") String nmId, @QueryParam(value="redirected_from_node") boolean redirectedFromNode, @QueryParam(value="clusterid") String clusterId, @QueryParam(value="manual_redirection") @DefaultValue(value="false") boolean manualRedirection)
req
- HttpServletRequestres
- HttpServletResponsecontainerIdStr
- The container IDfilename
- The name of the log fileformat
- The content typesize
- the size of the log filenmId
- The Node Manager NodeIdredirectedFromNode
- Whether this is the redirect request from NM@GET @Path(value="/containerlogs/{containerid}/{filename}") @Produces(value="text/plain; charset=utf-8") @InterfaceAudience.Public @InterfaceStability.Unstable public javax.ws.rs.core.Response getLogs(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam(value="containerid") String containerIdStr, @PathParam(value="filename") String filename, @QueryParam(value="format") String format, @QueryParam(value="size") String size, @QueryParam(value="nm.id") String nmId, @QueryParam(value="redirected_from_node") @DefaultValue(value="false") boolean redirectedFromNode, @QueryParam(value="clusterid") String clusterId, @QueryParam(value="manual_redirection") @DefaultValue(value="false") boolean manualRedirection)
protected org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity getEntity(String path, javax.ws.rs.core.MultivaluedMap<String,String> params) throws IOException
IOException
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.