java.lang.Object
org.apache.hadoop.yarn.server.webapp.WebServices
org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.AHSWebServices
All Implemented Interfaces:
org.apache.hadoop.yarn.server.webapp.AppInfoProvider

@Singleton @Path("/ws/v1/applicationhistory") public class AHSWebServices extends org.apache.hadoop.yarn.server.webapp.WebServices
  • Field Summary

    Fields inherited from class org.apache.hadoop.yarn.server.webapp.WebServices

    appBaseProt
  • Constructor Summary

    Constructors
    Constructor
    Description
    AHSWebServices(org.apache.hadoop.yarn.api.ApplicationBaseProtocol appBaseProt, org.apache.hadoop.conf.Configuration conf)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.yarn.api.records.timeline.TimelineAbout
    about(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
     
    org.apache.hadoop.yarn.server.webapp.dao.AppsInfo
    get(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
     
    org.apache.hadoop.yarn.server.webapp.dao.AppInfo
    getApp(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId)
     
    org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfo
    getAppAttempt(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId, String appAttemptId)
     
    org.apache.hadoop.yarn.server.webapp.dao.AppAttemptsInfo
    getAppAttempts(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId)
     
    org.apache.hadoop.yarn.server.webapp.dao.AppsInfo
    getApps(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String stateQuery, Set<String> statesQuery, String finalStatusQuery, String userQuery, String queueQuery, String count, String startedBegin, String startedEnd, String finishBegin, String finishEnd, String name, Set<String> applicationTypes)
     
    org.apache.hadoop.yarn.server.webapp.dao.ContainerInfo
    getContainer(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId, String appAttemptId, String containerId)
     
    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, 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, boolean manualRedirection)
    Returns log file's name as well as current file size for a container.
    org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo
    getContainers(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId, String appAttemptId)
     
    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, boolean manualRedirection)
     

    Methods inherited from class org.apache.hadoop.yarn.server.webapp.WebServices

    getApp, getApp, getApplicationAttemptReport, getApplicationAttemptsReport, getApplicationReport, getApplicationsReport, getContainer, getContainerReport, getContainersReport, getNodeHttpAddress, getUser, initForReadableEndpoints, parseApplicationAttemptId, parseApplicationId, parseContainerId, parseQueries, validateIds

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AHSWebServices

      @Inject public AHSWebServices(@Named("appBaseProt") org.apache.hadoop.yarn.api.ApplicationBaseProtocol appBaseProt, @Named("conf") org.apache.hadoop.conf.Configuration conf)
  • Method Details

    • about

      @GET @Path("/about") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.api.records.timeline.TimelineAbout about(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res)
    • get

      @GET @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.AppsInfo get(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res)
    • getApps

      @GET @Path("/apps") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.AppsInfo getApps(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @QueryParam("state") String stateQuery, @QueryParam("states") Set<String> statesQuery, @QueryParam("finalStatus") String finalStatusQuery, @QueryParam("user") String userQuery, @QueryParam("queue") String queueQuery, @QueryParam("limit") String count, @QueryParam("startedTimeBegin") String startedBegin, @QueryParam("startedTimeEnd") String startedEnd, @QueryParam("finishedTimeBegin") String finishBegin, @QueryParam("finishedTimeEnd") String finishEnd, @QueryParam("name") String name, @QueryParam("applicationTypes") Set<String> applicationTypes)
      Overrides:
      getApps in class org.apache.hadoop.yarn.server.webapp.WebServices
    • getApp

      @GET @Path("/apps/{appid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.AppInfo getApp(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("appid") String appId)
      Overrides:
      getApp in class org.apache.hadoop.yarn.server.webapp.WebServices
    • getAppAttempts

      @GET @Path("/apps/{appid}/appattempts") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.AppAttemptsInfo getAppAttempts(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("appid") String appId)
      Overrides:
      getAppAttempts in class org.apache.hadoop.yarn.server.webapp.WebServices
    • getAppAttempt

      @GET @Path("/apps/{appid}/appattempts/{appattemptid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfo getAppAttempt(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("appid") String appId, @PathParam("appattemptid") String appAttemptId)
      Overrides:
      getAppAttempt in class org.apache.hadoop.yarn.server.webapp.WebServices
    • getContainers

      @GET @Path("/apps/{appid}/appattempts/{appattemptid}/containers") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo getContainers(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("appid") String appId, @PathParam("appattemptid") String appAttemptId)
      Overrides:
      getContainers in class org.apache.hadoop.yarn.server.webapp.WebServices
    • getContainer

      @GET @Path("/apps/{appid}/appattempts/{appattemptid}/containers/{containerid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.webapp.dao.ContainerInfo getContainer(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("appid") String appId, @PathParam("appattemptid") String appAttemptId, @PathParam("containerid") String containerId)
      Overrides:
      getContainer in class org.apache.hadoop.yarn.server.webapp.WebServices
    • getContainerLogsInfo

      @GET @Path("/containers/{containerid}/logs") @Produces({"application/json","application/xml"}) public javax.ws.rs.core.Response getContainerLogsInfo(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("containerid") String containerIdStr, @QueryParam("nm.id") String nmId, @QueryParam("redirected_from_node") @DefaultValue("false") boolean redirectedFromNode, @QueryParam("manual_redirection") @DefaultValue("false") boolean manualRedirection)
      Returns log file's name as well as current file size for a container.
      Parameters:
      req - HttpServletRequest
      res - HttpServletResponse
      containerIdStr - The container ID
      nmId - The Node Manager NodeId
      redirectedFromNode - Whether this is a redirected request from NM
      Returns:
      The log file's name and current file size
    • getContainerLogFile

      @GET @Path("/containers/{containerid}/logs/{filename}") @Produces("text/plain") @Public @Unstable public javax.ws.rs.core.Response getContainerLogFile(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("containerid") String containerIdStr, @PathParam("filename") String filename, @QueryParam("format") String format, @QueryParam("size") String size, @QueryParam("nm.id") String nmId, @QueryParam("redirected_from_node") boolean redirectedFromNode, @QueryParam("manual_redirection") @DefaultValue("false") boolean manualRedirection)
      Returns the contents of a container's log file in plain text.
      Parameters:
      req - HttpServletRequest
      res - HttpServletResponse
      containerIdStr - The container ID
      filename - The name of the log file
      format - The content type
      size - the size of the log file
      nmId - The Node Manager NodeId
      redirectedFromNode - Whether this is the redirect request from NM
      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(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @PathParam("containerid") String containerIdStr, @PathParam("filename") String filename, @QueryParam("format") String format, @QueryParam("size") String size, @QueryParam("nm.id") String nmId, @QueryParam("redirected_from_node") @DefaultValue("false") boolean redirectedFromNode, @QueryParam("manual_redirection") @DefaultValue("false") boolean manualRedirection)