Class TimelineCollectorWebService

java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollectorWebService

@Private @Unstable @Singleton @Path("/ws/v2/timeline") public class TimelineCollectorWebService extends Object
The main per-node REST end point for timeline service writes. It is essentially a container service that routes requests to the appropriate per-app services.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Gives information about timeline collector.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    about(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
    Return the description of the timeline web services.
    javax.ws.rs.core.Response
    putDomain(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId, org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain)
     
    javax.ws.rs.core.Response
    putEntities(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String async, String isSubAppEntities, String appId, org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities entities)
    Accepts writes to the collector, and returns a response.

    Methods inherited from class java.lang.Object

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

    • TimelineCollectorWebService

      public TimelineCollectorWebService()
  • Method Details

    • about

      @GET @Produces("application/json; charset=utf-8") public TimelineCollectorWebService.AboutInfo about(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res)
      Return the description of the timeline web services.
      Parameters:
      req - Servlet request.
      res - Servlet response.
      Returns:
      description of timeline web service.
    • putEntities

      @PUT @Path("/entities") @Consumes("application/json") public javax.ws.rs.core.Response putEntities(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @QueryParam("async") String async, @QueryParam("subappwrite") String isSubAppEntities, @QueryParam("appid") String appId, org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities entities)
      Accepts writes to the collector, and returns a response. It simply routes the request to the app level collector. It expects an application as a context.
      Parameters:
      req - Servlet request.
      res - Servlet response.
      async - flag indicating whether its an async put or not. "true" indicates, its an async call. If null, its considered false.
      isSubAppEntities - subappwrite.
      appId - Application Id to which the entities to be put belong to. If appId is not there or it cannot be parsed, HTTP 400 will be sent back.
      entities - timeline entities to be put.
      Returns:
      a Response with appropriate HTTP status.
    • putDomain

      @PUT @Path("/domain") @Consumes("application/json") public javax.ws.rs.core.Response putDomain(@Context javax.servlet.http.HttpServletRequest req, @Context javax.servlet.http.HttpServletResponse res, @QueryParam("appid") String appId, org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain)
      Parameters:
      req - Servlet request.
      res - Servlet response.
      domain - timeline domain to be put.
      appId - Application Id to which the domain to be put belong to. If appId is not there or it cannot be parsed, HTTP 400 will be sent back.
      Returns:
      a Response with appropriate HTTP status.