Class RouterWebServices

java.lang.Object
org.apache.hadoop.yarn.server.router.webapp.RouterWebServices
All Implemented Interfaces:
org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol

@Singleton @Path("/ws/v1/cluster") public class RouterWebServices extends Object implements org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
RouterWebServices is a service that runs on each router that can be used to intercept and inspect RMWebServiceProtocol messages from client to the cluster resource manager. It listens RMWebServiceProtocol REST messages from the client and creates a request intercepting pipeline instance for each client. The pipeline is a chain of RESTRequestInterceptor instances that can inspect and modify the request/response as needed. The main difference with AMRMProxyService is the protocol they implement.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Private structure for encapsulating RequestInterceptor and user instances.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RouterWebServices(Router router, org.apache.hadoop.conf.Configuration conf)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.ws.rs.core.Response
    addToClusterNodeLabels(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo newNodeLabels, javax.servlet.http.HttpServletRequest hsr)
     
    javax.ws.rs.core.Response
    cancelDelegationToken(javax.servlet.http.HttpServletRequest hsr)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.RMQueueAclInfo
    checkUserAccessToQueue(String queue, String username, String queueAclType, javax.servlet.http.HttpServletRequest hsr)
     
    javax.ws.rs.core.Response
    createNewApplication(javax.servlet.http.HttpServletRequest hsr)
     
    javax.ws.rs.core.Response
    createNewReservation(javax.servlet.http.HttpServletRequest hsr)
     
    This method creates and returns reference of the first interceptor in the chain of request interceptor instances.
    javax.ws.rs.core.Response
    deleteReservation(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationDeleteRequestInfo resContext, javax.servlet.http.HttpServletRequest hsr)
     
    dumpSchedulerLogs(String time, javax.servlet.http.HttpServletRequest hsr)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterInfo
    get()
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ActivitiesInfo
    getActivities(javax.servlet.http.HttpServletRequest hsr, String nodeId, String groupBy)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo
    getApp(javax.servlet.http.HttpServletRequest hsr, String appId, Set<String> unselectedFields)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppActivitiesInfo
    getAppActivities(javax.servlet.http.HttpServletRequest hsr, String appId, String time, Set<String> requestPriorities, Set<String> allocationRequestIds, String groupBy, String limit, Set<String> actions, boolean summarize)
     
    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.resourcemanager.webapp.dao.AppAttemptsInfo
    getAppAttempts(javax.servlet.http.HttpServletRequest hsr, String appId)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppPriority
    getAppPriority(javax.servlet.http.HttpServletRequest hsr, String appId)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppQueue
    getAppQueue(javax.servlet.http.HttpServletRequest hsr, String appId)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppsInfo
    getApps(javax.servlet.http.HttpServletRequest hsr, String stateQuery, Set<String> statesQuery, String finalStatusQuery, String userQuery, String queueQuery, String count, String startedBegin, String startedEnd, String finishBegin, String finishEnd, Set<String> applicationTypes, Set<String> applicationTags, String name, Set<String> unselectedFields)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState
    getAppState(javax.servlet.http.HttpServletRequest hsr, String appId)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ApplicationStatisticsInfo
    getAppStatistics(javax.servlet.http.HttpServletRequest hsr, Set<String> stateQueries, Set<String> typeQueries)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppTimeoutInfo
    getAppTimeout(javax.servlet.http.HttpServletRequest hsr, String appId, String type)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppTimeoutsInfo
    getAppTimeouts(javax.servlet.http.HttpServletRequest hsr, String appId)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.BulkActivitiesInfo
    getBulkActivities(javax.servlet.http.HttpServletRequest hsr, String groupBy, int activitiesCount)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterInfo
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo
    getClusterNodeLabels(javax.servlet.http.HttpServletRequest hsr)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterUserInfo
    getClusterUserInfo(javax.servlet.http.HttpServletRequest hsr)
     
    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)
     
    org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo
    getContainers(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId, String appAttemptId)
     
    getInterceptorChain(javax.servlet.http.HttpServletRequest hsr)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo
    getLabelsOnNode(javax.servlet.http.HttpServletRequest hsr, String nodeId)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.LabelsToNodesInfo
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeInfo
    getNode(String nodeId)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodesInfo
    getNodes(String states)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeToLabelsInfo
    getNodeToLabels(javax.servlet.http.HttpServletRequest hsr)
     
    Gets the Request interceptor chains for all the users.
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo
    getRMNodeLabels(javax.servlet.http.HttpServletRequest hsr)
     
     
    javax.ws.rs.core.Response
    getSchedulerConfiguration(javax.servlet.http.HttpServletRequest hsr)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.SchedulerTypeInfo
     
    javax.ws.rs.core.Response
    listReservation(String queue, String reservationId, long startTime, long endTime, boolean includeResourceAllocations, javax.servlet.http.HttpServletRequest hsr)
     
    javax.ws.rs.core.Response
    postDelegationToken(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.DelegationToken tokenData, javax.servlet.http.HttpServletRequest hsr)
     
    javax.ws.rs.core.Response
    postDelegationTokenExpiration(javax.servlet.http.HttpServletRequest hsr)
     
    javax.ws.rs.core.Response
    removeFromClusterNodeLabels(Set<String> oldNodeLabels, javax.servlet.http.HttpServletRequest hsr)
     
    javax.ws.rs.core.Response
    replaceLabelsOnNode(Set<String> newNodeLabelsName, javax.servlet.http.HttpServletRequest hsr, String nodeId)
     
    javax.ws.rs.core.Response
    replaceLabelsOnNodes(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeToLabelsEntryList newNodeToLabels, javax.servlet.http.HttpServletRequest hsr)
     
    protected void
    setResponse(javax.servlet.http.HttpServletResponse response)
     
    javax.ws.rs.core.Response
    signalToContainer(String containerId, String command, javax.servlet.http.HttpServletRequest req)
     
    javax.ws.rs.core.Response
    submitApplication(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ApplicationSubmissionContextInfo newApp, javax.servlet.http.HttpServletRequest hsr)
     
    javax.ws.rs.core.Response
    submitReservation(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationSubmissionRequestInfo resContext, javax.servlet.http.HttpServletRequest hsr)
     
    javax.ws.rs.core.Response
    updateApplicationPriority(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppPriority targetPriority, javax.servlet.http.HttpServletRequest hsr, String appId)
     
    javax.ws.rs.core.Response
    updateApplicationTimeout(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppTimeoutInfo appTimeout, javax.servlet.http.HttpServletRequest hsr, String appId)
     
    javax.ws.rs.core.Response
    updateAppQueue(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppQueue targetQueue, javax.servlet.http.HttpServletRequest hsr, String appId)
     
    javax.ws.rs.core.Response
    updateAppState(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState targetState, javax.servlet.http.HttpServletRequest hsr, String appId)
     
    org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ResourceInfo
    updateNodeResource(javax.servlet.http.HttpServletRequest hsr, String nodeId, org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ResourceOptionInfo resourceOption)
     
    javax.ws.rs.core.Response
    updateReservation(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationUpdateRequestInfo resContext, javax.servlet.http.HttpServletRequest hsr)
     
    javax.ws.rs.core.Response
    updateSchedulerConfiguration(org.apache.hadoop.yarn.webapp.dao.SchedConfUpdateInfo mutationInfo, javax.servlet.http.HttpServletRequest hsr)
     

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • RouterWebServices

      @Inject public RouterWebServices(@Named("router") Router router, @Named("conf") org.apache.hadoop.conf.Configuration conf)
  • Method Details

    • getInterceptorChain

      @VisibleForTesting protected RouterWebServices.RequestInterceptorChainWrapper getInterceptorChain(javax.servlet.http.HttpServletRequest hsr)
    • getPipelines

      @VisibleForTesting protected Map<String,RouterWebServices.RequestInterceptorChainWrapper> getPipelines()
      Gets the Request interceptor chains for all the users.
      Returns:
      the request interceptor chains.
    • createRequestInterceptorChain

      @VisibleForTesting protected RESTRequestInterceptor createRequestInterceptorChain()
      This method creates and returns reference of the first interceptor in the chain of request interceptor instances.
      Returns:
      the reference of the first interceptor in the chain
    • get

      @GET @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterInfo get()
      Specified by:
      get in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • getClusterInfo

      @GET @Path("/info") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterInfo getClusterInfo()
      Specified by:
      getClusterInfo in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • getClusterUserInfo

      @GET @Path("/userinfo") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterUserInfo getClusterUserInfo(@Context javax.servlet.http.HttpServletRequest hsr)
      Specified by:
      getClusterUserInfo in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • getClusterMetricsInfo

      @GET @Path("/metrics") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo getClusterMetricsInfo()
      Specified by:
      getClusterMetricsInfo in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • getSchedulerInfo

      @GET @Path("/scheduler") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.SchedulerTypeInfo getSchedulerInfo()
      Specified by:
      getSchedulerInfo in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • dumpSchedulerLogs

      @POST @Path("/scheduler/logs") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public String dumpSchedulerLogs(@FormParam("time") String time, @Context javax.servlet.http.HttpServletRequest hsr) throws IOException
      Specified by:
      dumpSchedulerLogs in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      IOException
    • getNodes

      @GET @Path("/nodes") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodesInfo getNodes(@QueryParam("states") String states)
      Specified by:
      getNodes in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • getNode

      @GET @Path("/nodes/{nodeId}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeInfo getNode(@PathParam("nodeId") String nodeId)
      Specified by:
      getNode in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • updateNodeResource

      @POST @Path("/nodes/{nodeId}/resource") @Consumes({"application/json","application/xml"}) @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ResourceInfo updateNodeResource(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("nodeId") String nodeId, org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ResourceOptionInfo resourceOption) throws org.apache.hadoop.security.authorize.AuthorizationException
      Specified by:
      updateNodeResource in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • getApps

      @GET @Path("/apps") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppsInfo getApps(@Context javax.servlet.http.HttpServletRequest hsr, @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("applicationTypes") Set<String> applicationTypes, @QueryParam("applicationTags") Set<String> applicationTags, @QueryParam("name") String name, @QueryParam("deSelects") Set<String> unselectedFields)
      Specified by:
      getApps in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • getActivities

      @GET @Path("/scheduler/activities") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ActivitiesInfo getActivities(@Context javax.servlet.http.HttpServletRequest hsr, @QueryParam("nodeId") String nodeId, @QueryParam("groupBy") String groupBy)
      Specified by:
      getActivities in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • getBulkActivities

      @GET @Path("/scheduler/bulk-activities") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.BulkActivitiesInfo getBulkActivities(@Context javax.servlet.http.HttpServletRequest hsr, @QueryParam("groupBy") String groupBy, @QueryParam("activitiesCount") @DefaultValue("10") int activitiesCount) throws InterruptedException
      Specified by:
      getBulkActivities in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      InterruptedException
    • getAppActivities

      @GET @Path("/scheduler/app-activities/{appid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppActivitiesInfo getAppActivities(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId, @QueryParam("maxTime") String time, @QueryParam("requestPriorities") Set<String> requestPriorities, @QueryParam("allocationRequestIds") Set<String> allocationRequestIds, @QueryParam("groupBy") String groupBy, @QueryParam("limit") String limit, @QueryParam("actions") Set<String> actions, @QueryParam("summarize") @DefaultValue("false") boolean summarize)
      Specified by:
      getAppActivities in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • getAppStatistics

      @GET @Path("/appstatistics") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ApplicationStatisticsInfo getAppStatistics(@Context javax.servlet.http.HttpServletRequest hsr, @QueryParam("states") Set<String> stateQueries, @QueryParam("applicationTypes") Set<String> typeQueries)
      Specified by:
      getAppStatistics in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • getApp

      @GET @Path("/apps/{appid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo getApp(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId, @QueryParam("deSelects") Set<String> unselectedFields)
      Specified by:
      getApp in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • getAppState

      @GET @Path("/apps/{appid}/state") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState getAppState(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      Specified by:
      getAppState in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • updateAppState

      @PUT @Path("/apps/{appid}/state") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response updateAppState(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState targetState, @Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
      Specified by:
      updateAppState in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      org.apache.hadoop.yarn.exceptions.YarnException
      InterruptedException
      IOException
    • getNodeToLabels

      @GET @Path("/get-node-to-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeToLabelsInfo getNodeToLabels(@Context javax.servlet.http.HttpServletRequest hsr) throws IOException
      Specified by:
      getNodeToLabels in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      IOException
    • getLabelsToNodes

      @GET @Path("/label-mappings") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.LabelsToNodesInfo getLabelsToNodes(@QueryParam("labels") Set<String> labels) throws IOException
      Specified by:
      getLabelsToNodes in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      IOException
    • replaceLabelsOnNodes

      @POST @Path("/replace-node-to-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response replaceLabelsOnNodes(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeToLabelsEntryList newNodeToLabels, @Context javax.servlet.http.HttpServletRequest hsr) throws Exception
      Specified by:
      replaceLabelsOnNodes in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      Exception
    • replaceLabelsOnNode

      @POST @Path("/nodes/{nodeId}/replace-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response replaceLabelsOnNode(@QueryParam("labels") Set<String> newNodeLabelsName, @Context javax.servlet.http.HttpServletRequest hsr, @PathParam("nodeId") String nodeId) throws Exception
      Specified by:
      replaceLabelsOnNode in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      Exception
    • getClusterNodeLabels

      @GET @Path("/get-node-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo getClusterNodeLabels(@Context javax.servlet.http.HttpServletRequest hsr) throws IOException
      Specified by:
      getClusterNodeLabels in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      IOException
    • addToClusterNodeLabels

      @POST @Path("/add-node-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response addToClusterNodeLabels(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo newNodeLabels, @Context javax.servlet.http.HttpServletRequest hsr) throws Exception
      Specified by:
      addToClusterNodeLabels in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      Exception
    • removeFromClusterNodeLabels

      @POST @Path("/remove-node-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response removeFromClusterNodeLabels(@QueryParam("labels") Set<String> oldNodeLabels, @Context javax.servlet.http.HttpServletRequest hsr) throws Exception
      Specified by:
      removeFromClusterNodeLabels in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      Exception
    • getLabelsOnNode

      @GET @Path("/nodes/{nodeId}/get-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo getLabelsOnNode(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("nodeId") String nodeId) throws IOException
      Specified by:
      getLabelsOnNode in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      IOException
    • getAppPriority

      @GET @Path("/apps/{appid}/priority") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppPriority getAppPriority(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      Specified by:
      getAppPriority in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • updateApplicationPriority

      @PUT @Path("/apps/{appid}/priority") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response updateApplicationPriority(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppPriority targetPriority, @Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
      Specified by:
      updateApplicationPriority in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      org.apache.hadoop.yarn.exceptions.YarnException
      InterruptedException
      IOException
    • getAppQueue

      @GET @Path("/apps/{appid}/queue") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppQueue getAppQueue(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      Specified by:
      getAppQueue in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • updateAppQueue

      @PUT @Path("/apps/{appid}/queue") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response updateAppQueue(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppQueue targetQueue, @Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
      Specified by:
      updateAppQueue in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      org.apache.hadoop.yarn.exceptions.YarnException
      InterruptedException
      IOException
    • createNewApplication

      @POST @Path("/apps/new-application") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response createNewApplication(@Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Specified by:
      createNewApplication in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      IOException
      InterruptedException
    • submitApplication

      @POST @Path("/apps") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response submitApplication(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ApplicationSubmissionContextInfo newApp, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Specified by:
      submitApplication in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      IOException
      InterruptedException
    • postDelegationToken

      @POST @Path("/delegation-token") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response postDelegationToken(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.DelegationToken tokenData, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException, Exception
      Specified by:
      postDelegationToken in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      IOException
      InterruptedException
      Exception
    • postDelegationTokenExpiration

      @POST @Path("/delegation-token/expiration") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response postDelegationTokenExpiration(@Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, Exception
      Specified by:
      postDelegationTokenExpiration in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      IOException
      Exception
    • cancelDelegationToken

      @DELETE @Path("/delegation-token") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response cancelDelegationToken(@Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException, Exception
      Specified by:
      cancelDelegationToken in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      IOException
      InterruptedException
      Exception
    • createNewReservation

      @POST @Path("/reservation/new-reservation") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response createNewReservation(@Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Specified by:
      createNewReservation in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      IOException
      InterruptedException
    • submitReservation

      @POST @Path("/reservation/submit") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response submitReservation(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationSubmissionRequestInfo resContext, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Specified by:
      submitReservation in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      IOException
      InterruptedException
    • updateReservation

      @POST @Path("/reservation/update") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response updateReservation(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationUpdateRequestInfo resContext, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Specified by:
      updateReservation in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      IOException
      InterruptedException
    • deleteReservation

      @POST @Path("/reservation/delete") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response deleteReservation(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationDeleteRequestInfo resContext, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Specified by:
      deleteReservation in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      IOException
      InterruptedException
    • listReservation

      @GET @Path("/reservation/list") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response listReservation(@QueryParam("queue") @DefaultValue("default") String queue, @QueryParam("reservation-id") @DefaultValue("") String reservationId, @QueryParam("start-time") @DefaultValue("0") long startTime, @QueryParam("end-time") @DefaultValue("-1") long endTime, @QueryParam("include-resource-allocations") @DefaultValue("false") boolean includeResourceAllocations, @Context javax.servlet.http.HttpServletRequest hsr) throws Exception
      Specified by:
      listReservation in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      Exception
    • getAppTimeout

      @GET @Path("/apps/{appid}/timeouts/{type}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppTimeoutInfo getAppTimeout(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId, @PathParam("type") String type) throws org.apache.hadoop.security.authorize.AuthorizationException
      Specified by:
      getAppTimeout in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • getAppTimeouts

      @GET @Path("/apps/{appid}/timeouts") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppTimeoutsInfo getAppTimeouts(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      Specified by:
      getAppTimeouts in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • updateApplicationTimeout

      @PUT @Path("/apps/{appid}/timeout") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response updateApplicationTimeout(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppTimeoutInfo appTimeout, @Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
      Specified by:
      updateApplicationTimeout in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      org.apache.hadoop.yarn.exceptions.YarnException
      InterruptedException
      IOException
    • getAppAttempts

      @GET @Path("/apps/{appid}/appattempts") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppAttemptsInfo getAppAttempts(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId)
      Specified by:
      getAppAttempts in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
    • checkUserAccessToQueue

      @GET @Path("/queues/{queue}/access") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.RMQueueAclInfo checkUserAccessToQueue(@PathParam("queue") String queue, @QueryParam("user") String username, @QueryParam("queue-acl-type") @DefaultValue("SUBMIT_APPLICATIONS") String queueAclType, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException
      Specified by:
      checkUserAccessToQueue in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • 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)
    • 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)
    • 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)
    • updateSchedulerConfiguration

      @PUT @Path("/scheduler-conf") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response updateSchedulerConfiguration(org.apache.hadoop.yarn.webapp.dao.SchedConfUpdateInfo mutationInfo, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, InterruptedException
      Specified by:
      updateSchedulerConfiguration in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
      InterruptedException
    • getSchedulerConfiguration

      @GET @Path("/scheduler-conf") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response getSchedulerConfiguration(javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException
      Specified by:
      getSchedulerConfiguration in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • setResponse

      @VisibleForTesting protected void setResponse(javax.servlet.http.HttpServletResponse response)
    • signalToContainer

      @POST @Path("/containers/{containerid}/signal/{command}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response signalToContainer(@PathParam("containerid") String containerId, @PathParam("command") String command, @Context javax.servlet.http.HttpServletRequest req) throws org.apache.hadoop.security.authorize.AuthorizationException
      Specified by:
      signalToContainer in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • getRMNodeLabels

      @GET @Path("/get-rm-node-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo getRMNodeLabels(@Context javax.servlet.http.HttpServletRequest hsr) throws IOException
      Specified by:
      getRMNodeLabels in interface org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServiceProtocol
      Throws:
      IOException
    • getRouter

      public Router getRouter()