Class HsWebServices

java.lang.Object
org.apache.hadoop.yarn.server.webapp.WebServices
org.apache.hadoop.mapreduce.v2.hs.webapp.HsWebServices
All Implemented Interfaces:
org.apache.hadoop.yarn.server.webapp.AppInfoProvider

@Singleton @Path("/ws/v1/history") public class HsWebServices 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
    HsWebServices(HistoryContext ctx, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.webapp.WebApp webapp, org.apache.hadoop.yarn.api.ApplicationClientProtocol appBaseProto)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
     
    javax.ws.rs.core.Response
    getAggregatedLogsMeta(javax.servlet.http.HttpServletRequest hsr, String appIdStr, String appAttemptIdStr, String containerIdStr, String nmId, boolean redirectedFromNode, boolean manualRedirection)
     
    javax.ws.rs.core.Response
    getAggregatedLogsMeta(javax.servlet.http.HttpServletRequest hsr, String fileName, Set<String> fileSize, Set<String> modificationTime, String appIdStr, String containerIdStr, String nmId)
     
    javax.ws.rs.core.Response
    getContainerLogFile(javax.servlet.http.HttpServletRequest req, String containerIdStr, String filename, String format, String size, String nmId, boolean redirectedFromNode, boolean manualRedirection)
     
    javax.ws.rs.core.Response
    getContainerLogs(javax.servlet.http.HttpServletRequest hsr, String containerIdStr, String nmId, boolean redirectedFromNode, boolean manualRedirection)
     
     
    getJob(javax.servlet.http.HttpServletRequest hsr, String jid)
     
     
    org.apache.hadoop.mapreduce.v2.app.webapp.dao.ConfInfo
    getJobConf(javax.servlet.http.HttpServletRequest hsr, String jid)
     
    org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobCounterInfo
    getJobCounters(javax.servlet.http.HttpServletRequest hsr, String jid)
     
    getJobs(String userQuery, String count, String stateQuery, String queueQuery, String startedBegin, String startedEnd, String finishBegin, String finishEnd)
     
    org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskInfo
    getJobTask(javax.servlet.http.HttpServletRequest hsr, String jid, String tid)
     
    org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo
    getJobTaskAttemptId(javax.servlet.http.HttpServletRequest hsr, String jid, String tid, String attId)
     
    org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskAttemptCounterInfo
    getJobTaskAttemptIdCounters(javax.servlet.http.HttpServletRequest hsr, String jid, String tid, String attId)
     
    org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptsInfo
    getJobTaskAttempts(javax.servlet.http.HttpServletRequest hsr, String jid, String tid)
     
    org.apache.hadoop.mapreduce.v2.app.webapp.dao.TasksInfo
    getJobTasks(javax.servlet.http.HttpServletRequest hsr, String jid, String type)
     
    javax.ws.rs.core.Response
    getRemoteLogDirPath(javax.servlet.http.HttpServletRequest req, String user, String appIdStr)
    Returns the user qualified path name of the remote log directory for each pre-configured log aggregation file controller.
    org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskCounterInfo
    getSingleTaskCounters(javax.servlet.http.HttpServletRequest hsr, String jid, String tid)
     
    void
    setHttpServletResponse(javax.servlet.http.HttpServletResponse resp)
     
    void
    setLogServlet(org.apache.hadoop.yarn.server.webapp.LogServlet logServlet)
     

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

    getApp, getApp, getApp, getAppAttempt, getAppAttempts, getApplicationAttemptReport, getApplicationAttemptsReport, getApplicationReport, getApplicationsReport, getApps, getContainer, getContainer, getContainerReport, getContainers, 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

    • HsWebServices

      @Inject public HsWebServices(@Named("ctx") HistoryContext ctx, @Named("conf") org.apache.hadoop.conf.Configuration conf, @Named("hsWebApp") org.apache.hadoop.yarn.webapp.WebApp webapp, @Named("appClient") @Nullable org.apache.hadoop.yarn.api.ApplicationClientProtocol appBaseProto)
  • Method Details

    • get

      @GET @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public HistoryInfo get()
    • getHistoryInfo

      @GET @Path("/info") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public HistoryInfo getHistoryInfo()
    • getJobs

      @GET @Path("/mapreduce/jobs") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public JobsInfo getJobs(@QueryParam("user") String userQuery, @QueryParam("limit") String count, @QueryParam("state") String stateQuery, @QueryParam("queue") String queueQuery, @QueryParam("startedTimeBegin") String startedBegin, @QueryParam("startedTimeEnd") String startedEnd, @QueryParam("finishedTimeBegin") String finishBegin, @QueryParam("finishedTimeEnd") String finishEnd)
    • getJob

      @GET @Path("/mapreduce/jobs/{jobid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public JobInfo getJob(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("jobid") String jid)
    • getJobAttempts

      @GET @Path("/mapreduce/jobs/{jobid}/jobattempts") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AMAttemptsInfo getJobAttempts(@PathParam("jobid") String jid)
    • getJobCounters

      @GET @Path("/mapreduce/jobs/{jobid}/counters") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobCounterInfo getJobCounters(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("jobid") String jid)
    • getJobConf

      @GET @Path("/mapreduce/jobs/{jobid}/conf") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.mapreduce.v2.app.webapp.dao.ConfInfo getJobConf(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("jobid") String jid)
    • getJobTasks

      @GET @Path("/mapreduce/jobs/{jobid}/tasks") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.mapreduce.v2.app.webapp.dao.TasksInfo getJobTasks(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("jobid") String jid, @QueryParam("type") String type)
    • getJobTask

      @GET @Path("/mapreduce/jobs/{jobid}/tasks/{taskid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskInfo getJobTask(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("jobid") String jid, @PathParam("taskid") String tid)
    • getSingleTaskCounters

      @GET @Path("/mapreduce/jobs/{jobid}/tasks/{taskid}/counters") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskCounterInfo getSingleTaskCounters(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("jobid") String jid, @PathParam("taskid") String tid)
    • getJobTaskAttempts

      @GET @Path("/mapreduce/jobs/{jobid}/tasks/{taskid}/attempts") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptsInfo getJobTaskAttempts(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("jobid") String jid, @PathParam("taskid") String tid)
    • getJobTaskAttemptId

      @GET @Path("/mapreduce/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo getJobTaskAttemptId(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("jobid") String jid, @PathParam("taskid") String tid, @PathParam("attemptid") String attId)
    • getJobTaskAttemptIdCounters

      @GET @Path("/mapreduce/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}/counters") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobTaskAttemptCounterInfo getJobTaskAttemptIdCounters(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("jobid") String jid, @PathParam("taskid") String tid, @PathParam("attemptid") String attId)
    • getRemoteLogDirPath

      @GET @Path("/remote-log-dir") @Produces({"application/json;charset=utf-8","application/xml;charset=utf-8"}) public javax.ws.rs.core.Response getRemoteLogDirPath(@Context javax.servlet.http.HttpServletRequest req, @QueryParam("user") String user, @QueryParam("appid") String appIdStr) throws IOException
      Returns the user qualified path name of the remote log directory for each pre-configured log aggregation file controller.
      Parameters:
      req - HttpServletRequest
      Returns:
      Path names grouped by file controller name
      Throws:
      IOException
    • getAggregatedLogsMeta

      @GET @Path("/extended-log-query") @Produces({"application/json","application/xml"}) @Public @Unstable public javax.ws.rs.core.Response getAggregatedLogsMeta(@Context javax.servlet.http.HttpServletRequest hsr, @QueryParam("filename") String fileName, @QueryParam("file_size") Set<String> fileSize, @QueryParam("modification_time") Set<String> modificationTime, @QueryParam("appid") String appIdStr, @QueryParam("containerid") String containerIdStr, @QueryParam("nm.id") String nmId) throws IOException
      Throws:
      IOException
    • getAggregatedLogsMeta

      @GET @Path("/aggregatedlogs") @Produces({"application/json","application/xml"}) @Public @Unstable public javax.ws.rs.core.Response getAggregatedLogsMeta(@Context javax.servlet.http.HttpServletRequest hsr, @QueryParam("appid") String appIdStr, @QueryParam("appattemptid") String appAttemptIdStr, @QueryParam("containerid") String containerIdStr, @QueryParam("nm.id") String nmId, @QueryParam("redirected_from_node") @DefaultValue("false") boolean redirectedFromNode, @QueryParam("manual_redirection") @DefaultValue("false") boolean manualRedirection)
    • getContainerLogs

      @GET @Path("/containers/{containerid}/logs") @Produces({"application/json;charset=utf-8","application/xml;charset=utf-8"}) @Public @Unstable public javax.ws.rs.core.Response getContainerLogs(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("containerid") String containerIdStr, @QueryParam("nm.id") String nmId, @QueryParam("redirected_from_node") @DefaultValue("false") boolean redirectedFromNode, @QueryParam("manual_redirection") @DefaultValue("false") boolean manualRedirection)
    • getContainerLogFile

      @GET @Path("/containerlogs/{containerid}/{filename}") @Produces("text/plain; charset=utf-8") @Public @Unstable public javax.ws.rs.core.Response getContainerLogFile(@Context javax.servlet.http.HttpServletRequest req, @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)
    • setLogServlet

      @VisibleForTesting public void setLogServlet(org.apache.hadoop.yarn.server.webapp.LogServlet logServlet)
    • setHttpServletResponse

      @VisibleForTesting public void setHttpServletResponse(javax.servlet.http.HttpServletResponse resp)