public class LogServlet
extends org.apache.hadoop.conf.Configured
Constructor and Description |
---|
LogServlet(org.apache.hadoop.conf.Configuration conf,
AppInfoProvider appInfoProvider) |
Modifier and Type | Method and Description |
---|---|
static WrappedLogMetaRequest.Builder |
createRequestFromContainerId(String containerIdStr) |
javax.ws.rs.core.Response |
getContainerLogsInfo(javax.servlet.http.HttpServletRequest req,
WrappedLogMetaRequest.Builder builder,
String nmId,
boolean redirectedFromNode,
String clusterId)
Returns information about the logs for a specific container.
|
javax.ws.rs.core.Response |
getLogFile(javax.servlet.http.HttpServletRequest req,
String containerIdStr,
String filename,
String format,
String size,
String nmId,
boolean redirectedFromNode,
String clusterId)
Returns an aggregated log file belonging to a container.
|
javax.ws.rs.core.Response |
getLogsInfo(javax.servlet.http.HttpServletRequest hsr,
String appIdStr,
String appAttemptIdStr,
String containerIdStr,
String nmId,
boolean redirectedFromNode) |
String |
getNMWebAddressFromRM(String nodeId) |
public LogServlet(org.apache.hadoop.conf.Configuration conf, AppInfoProvider appInfoProvider)
public String getNMWebAddressFromRM(String nodeId) throws com.sun.jersey.api.client.ClientHandlerException, com.sun.jersey.api.client.UniformInterfaceException, org.codehaus.jettison.json.JSONException
com.sun.jersey.api.client.ClientHandlerException
com.sun.jersey.api.client.UniformInterfaceException
org.codehaus.jettison.json.JSONException
public javax.ws.rs.core.Response getLogsInfo(javax.servlet.http.HttpServletRequest hsr, String appIdStr, String appAttemptIdStr, String containerIdStr, String nmId, boolean redirectedFromNode)
public javax.ws.rs.core.Response getContainerLogsInfo(javax.servlet.http.HttpServletRequest req, WrappedLogMetaRequest.Builder builder, String nmId, boolean redirectedFromNode, String clusterId)
req
- the HttpServletRequest
builder
- builder instance for the log meta requestnmId
- NodeManager idredirectedFromNode
- whether the request was redirectedclusterId
- the id of the clusterResponse
object containing information about the logspublic javax.ws.rs.core.Response getLogFile(javax.servlet.http.HttpServletRequest req, String containerIdStr, String filename, String format, String size, String nmId, boolean redirectedFromNode, String clusterId)
req
- the HttpServletRequest
containerIdStr
- container idfilename
- the name of the fileformat
- the format of the responsesize
- the size of bytes of the log file that should be returnednmId
- NodeManager idredirectedFromNode
- whether the request was redirectedclusterId
- the id of the clusterResponse
object containing information about the logspublic static WrappedLogMetaRequest.Builder createRequestFromContainerId(String containerIdStr)
Copyright © 2008–2020 Apache Software Foundation. All rights reserved.