java.lang.Object
org.apache.hadoop.yarn.server.webapp.WebServices
org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServices
All Implemented Interfaces:
RMWebServiceProtocol, org.apache.hadoop.yarn.server.webapp.AppInfoProvider

@Singleton @Path("/ws/v1/cluster") public class RMWebServices extends org.apache.hadoop.yarn.server.webapp.WebServices implements RMWebServiceProtocol
  • Field Details

  • Constructor Details

    • RMWebServices

      @Inject public RMWebServices(@Named("rm") ResourceManager rm, @Named("conf") org.apache.hadoop.conf.Configuration conf)
  • Method Details

    • hasAccess

      protected Boolean hasAccess(RMApp app, javax.servlet.http.HttpServletRequest hsr)
    • get

      @GET @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public ClusterInfo get()
      Description copied from interface: RMWebServiceProtocol
      This method retrieves the cluster information, and it is reachable by using RMWSConsts.INFO.
      Specified by:
      get in interface RMWebServiceProtocol
      Returns:
      the cluster information
    • getClusterInfo

      @GET @Path("/info") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public ClusterInfo getClusterInfo()
      Description copied from interface: RMWebServiceProtocol
      This method retrieves the cluster information, and it is reachable by using RMWSConsts.INFO.
      Specified by:
      getClusterInfo in interface RMWebServiceProtocol
      Returns:
      the cluster information
    • getClusterUserInfo

      @GET @Path("/userinfo") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public ClusterUserInfo getClusterUserInfo(@Context javax.servlet.http.HttpServletRequest hsr)
      Description copied from interface: RMWebServiceProtocol
      This method retrieves the cluster user information, and it is reachable by using RMWSConsts.CLUSTER_USER_INFO.
      Specified by:
      getClusterUserInfo in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      Returns:
      the cluster user information
    • getClusterMetricsInfo

      @GET @Path("/metrics") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public ClusterMetricsInfo getClusterMetricsInfo()
      Description copied from interface: RMWebServiceProtocol
      This method retrieves the cluster metrics information, and it is reachable by using RMWSConsts.METRICS.
      Specified by:
      getClusterMetricsInfo in interface RMWebServiceProtocol
      Returns:
      the cluster metrics information
      See Also:
      • ApplicationClientProtocol.getClusterMetrics(org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsRequest)
    • getSchedulerInfo

      @GET @Path("/scheduler") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public SchedulerTypeInfo getSchedulerInfo()
      Description copied from interface: RMWebServiceProtocol
      This method retrieves the current scheduler status, and it is reachable by using RMWSConsts.SCHEDULER.
      Specified by:
      getSchedulerInfo in interface RMWebServiceProtocol
      Returns:
      the current scheduler status
    • 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
      Description copied from interface: RMWebServiceProtocol
      This method dumps the scheduler logs for the time got in input, and it is reachable by using RMWSConsts.SCHEDULER_LOGS.
      Specified by:
      dumpSchedulerLogs in interface RMWebServiceProtocol
      Parameters:
      time - the period of time. It is a FormParam.
      hsr - the servlet request
      Returns:
      the result of the operation
      Throws:
      IOException - when it cannot create dump log file
    • getNodes

      @GET @Path("/nodes") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public NodesInfo getNodes(@QueryParam("states") String states)
      Description copied from interface: RMWebServiceProtocol
      This method retrieves all the nodes information in the cluster, and it is reachable by using RMWSConsts.NODES.
      Specified by:
      getNodes in interface RMWebServiceProtocol
      Parameters:
      states - the states we want to filter. It is a QueryParam.
      Returns:
      all nodes in the cluster. If the states param is given, returns all nodes that are in the comma-separated list of states
      See Also:
      • ApplicationClientProtocol.getClusterNodes(org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesRequest)
    • getNode

      @GET @Path("/nodes/{nodeId}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public NodeInfo getNode(@PathParam("nodeId") String nodeId)
      Description copied from interface: RMWebServiceProtocol
      This method retrieves a specific node information, and it is reachable by using RMWSConsts.NODES_NODEID.
      Specified by:
      getNode in interface RMWebServiceProtocol
      Parameters:
      nodeId - the node we want to retrieve the information. It is a PathParam.
      Returns:
      the information about the node in input
    • updateNodeResource

      @POST @Path("/nodes/{nodeId}/resource") @Consumes({"application/json","application/xml"}) @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public ResourceInfo updateNodeResource(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("nodeId") String nodeId, ResourceOptionInfo resourceOption) throws org.apache.hadoop.security.authorize.AuthorizationException
      Description copied from interface: RMWebServiceProtocol
      This method changes the resources of a specific node, and it is reachable by using RMWSConsts.NODE_RESOURCE.
      Specified by:
      updateNodeResource in interface RMWebServiceProtocol
      Parameters:
      hsr - The servlet request.
      nodeId - The node we want to retrieve the information for. It is a PathParam.
      resourceOption - The resource change.
      Returns:
      the resources of a specific node.
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - If the user is not authorized.
    • escapeInvalidXMLCharacters

      public static String escapeInvalidXMLCharacters(String str)
      This method ensures that the output String has only valid XML unicode characters as specified by the XML 1.0 standard. For reference, please see the standard.
      Parameters:
      str - The String whose invalid xml characters we want to escape.
      Returns:
      The str String after escaping invalid xml characters.
    • getApps

      @GET @Path("/apps") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public 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 limit, @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)
      Description copied from interface: RMWebServiceProtocol
      This method retrieves all the app reports in the cluster, and it is reachable by using RMWSConsts.APPS.
      Specified by:
      getApps in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      stateQuery - right now the stateQuery is deprecated. It is a QueryParam.
      statesQuery - filter the result by states. It is a QueryParam.
      finalStatusQuery - filter the result by final states. It is a QueryParam.
      userQuery - filter the result by user. It is a QueryParam.
      queueQuery - filter the result by queue. It is a QueryParam.
      limit - set a limit of the result. It is a QueryParam.
      startedBegin - filter the result by started begin time. It is a QueryParam.
      startedEnd - filter the result by started end time. It is a QueryParam.
      finishBegin - filter the result by finish begin time. It is a QueryParam.
      finishEnd - filter the result by finish end time. It is a QueryParam.
      applicationTypes - filter the result by types. It is a QueryParam.
      applicationTags - filter the result by tags. It is a QueryParam.
      name - filter the name of the application. It is a QueryParam.
      unselectedFields - De-selected params to avoid from report. It is a QueryParam.
      Returns:
      all apps in the cluster
      See Also:
      • ApplicationBaseProtocol.getApplications(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsRequest)
    • getActivities

      @GET @Path("/scheduler/activities") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public ActivitiesInfo getActivities(@Context javax.servlet.http.HttpServletRequest hsr, @QueryParam("nodeId") String nodeId, @QueryParam("groupBy") String groupBy)
      Description copied from interface: RMWebServiceProtocol
      This method retrieve all the activities in a specific node, and it is reachable by using RMWSConsts.SCHEDULER_ACTIVITIES.
      Specified by:
      getActivities in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      nodeId - the node we want to retrieve the activities. It is a QueryParam.
      groupBy - the groupBy type by which the activities should be aggregated. It is a QueryParam.
      Returns:
      all the activities in the specific node
    • getBulkActivities

      @GET @Path("/scheduler/bulk-activities") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public BulkActivitiesInfo getBulkActivities(@Context javax.servlet.http.HttpServletRequest hsr, @QueryParam("groupBy") String groupBy, @QueryParam("activitiesCount") @DefaultValue("10") int activitiesCount) throws InterruptedException
      Description copied from interface: RMWebServiceProtocol
      This method retrieve the last n activities inside scheduler, and it is reachable by using RMWSConsts.SCHEDULER_BULK_ACTIVITIES.
      Specified by:
      getBulkActivities in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      groupBy - the groupBy type by which the activities should be aggregated. It is a QueryParam.
      activitiesCount - number of activities
      Returns:
      last n activities
      Throws:
      InterruptedException - if interrupted.
    • getAppActivities

      @GET @Path("/scheduler/app-activities/{appid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public 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)
      Description copied from interface: RMWebServiceProtocol
      This method retrieves all the activities for a specific app for a specific period of time, and it is reachable by using RMWSConsts.SCHEDULER_APP_ACTIVITIES.
      Specified by:
      getAppActivities in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      appId - the applicationId we want to retrieve the activities. It is a QueryParam.
      time - for how long we want to retrieve the activities. It is a QueryParam.
      requestPriorities - the request priorities we want to retrieve the activities. It is a QueryParam.
      allocationRequestIds - the allocation request ids we want to retrieve the activities. It is a QueryParam.
      groupBy - the groupBy type by which the activities should be aggregated. It is a QueryParam.
      limit - set a limit of the result. It is a QueryParam.
      actions - the required actions of app activities. It is a QueryParam.
      summarize - whether app activities in multiple scheduling processes need to be summarized. It is a QueryParam.
      Returns:
      all the activities about a specific app for a specific time
    • getAppStatistics

      @GET @Path("/appstatistics") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public ApplicationStatisticsInfo getAppStatistics(@Context javax.servlet.http.HttpServletRequest hsr, @QueryParam("states") Set<String> stateQueries, @QueryParam("applicationTypes") Set<String> typeQueries)
      Description copied from interface: RMWebServiceProtocol
      This method retrieves all the statistics for a specific app, and it is reachable by using RMWSConsts.APP_STATISTICS.
      Specified by:
      getAppStatistics in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      stateQueries - filter the result by states. It is a QueryParam.
      typeQueries - filter the result by type names. It is a QueryParam.
      Returns:
      the application's statistics for specific states and types
    • getApp

      @GET @Path("/apps/{appid}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AppInfo getApp(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId, @QueryParam("deSelects") Set<String> unselectedFields)
      Description copied from interface: RMWebServiceProtocol
      This method retrieves the report for a specific app, and it is reachable by using RMWSConsts.APPS_APPID.
      Specified by:
      getApp in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      appId - the Id of the application we want the report. It is a PathParam.
      unselectedFields - De-selected param list to avoid from report. It is a QueryParam.
      Returns:
      the app report for a specific application
      See Also:
      • ApplicationBaseProtocol.getApplicationReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest)
    • getAppAttempts

      @GET @Path("/apps/{appid}/appattempts") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AppAttemptsInfo getAppAttempts(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId)
      Description copied from interface: RMWebServiceProtocol
      This method retrieves all the attempts information for a specific app, and it is reachable by using RMWSConsts.APPS_APPID_APPATTEMPTS.
      Specified by:
      getAppAttempts in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      appId - the application we want to get the attempts. It is a PathParam.
      Returns:
      all the attempts info for a specific application
      See Also:
      • ApplicationBaseProtocol.getApplicationAttempts(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptsRequest)
    • 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
    • getAppState

      @GET @Path("/apps/{appid}/state") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AppState getAppState(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      Description copied from interface: RMWebServiceProtocol
      This method retrieves the state for a specific app, and it is reachable by using RMWSConsts.APPS_APPID_STATE.
      Specified by:
      getAppState in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      appId - the Id of the application we want the state. It is a PathParam.
      Returns:
      the state for a specific application
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized
    • updateAppState

      @PUT @Path("/apps/{appid}/state") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response updateAppState(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
      Description copied from interface: RMWebServiceProtocol
      This method updates the state of the app in input, and it is reachable by using RMWSConsts.APPS_APPID_STATE.
      Specified by:
      updateAppState in interface RMWebServiceProtocol
      Parameters:
      targetState - the target state for the app. It is a content param.
      hsr - the servlet request
      appId - the Id of the application we want to update the state. It is a PathParam.
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method
      org.apache.hadoop.yarn.exceptions.YarnException - if app does not exist
      InterruptedException - if interrupted
      IOException - if doAs action throws an IOException
    • getNodeToLabels

      @GET @Path("/get-node-to-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public NodeToLabelsInfo getNodeToLabels(@Context javax.servlet.http.HttpServletRequest hsr) throws IOException
      Description copied from interface: RMWebServiceProtocol
      This method retrieves all the node labels with the respective nodes in the cluster, and it is reachable by using RMWSConsts.GET_NODE_TO_LABELS.
      Specified by:
      getNodeToLabels in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      Returns:
      all the nodes within a node label
      Throws:
      IOException - if an IOException happened
      See Also:
      • ApplicationClientProtocol.getNodeToLabels(org.apache.hadoop.yarn.api.protocolrecords.GetNodesToLabelsRequest)
    • getLabelsToNodes

      @GET @Path("/label-mappings") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public LabelsToNodesInfo getLabelsToNodes(@QueryParam("labels") Set<String> labels) throws IOException
      Description copied from interface: RMWebServiceProtocol
      This method retrieves all the node within multiple node labels in the cluster, and it is reachable by using RMWSConsts.LABEL_MAPPINGS.
      Specified by:
      getLabelsToNodes in interface RMWebServiceProtocol
      Parameters:
      labels - filter the result by node labels. It is a QueryParam.
      Returns:
      all the nodes within multiple node labels
      Throws:
      IOException - if an IOException happened
      See Also:
      • ApplicationClientProtocol.getLabelsToNodes(org.apache.hadoop.yarn.api.protocolrecords.GetLabelsToNodesRequest)
    • 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(NodeToLabelsEntryList newNodeToLabels, @Context javax.servlet.http.HttpServletRequest hsr) throws IOException
      Description copied from interface: RMWebServiceProtocol
      This method replaces all the node labels for specific nodes, and it is reachable by using RMWSConsts.REPLACE_NODE_TO_LABELS.
      Specified by:
      replaceLabelsOnNodes in interface RMWebServiceProtocol
      Parameters:
      newNodeToLabels - the list of new labels. It is a content param.
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      IOException
      See Also:
      • ResourceManagerAdministrationProtocol.replaceLabelsOnNode(org.apache.hadoop.yarn.server.api.protocolrecords.ReplaceLabelsOnNodeRequest)
    • 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
      Description copied from interface: RMWebServiceProtocol
      This method replaces all the node labels for specific node, and it is reachable by using RMWSConsts.NODES_NODEID_REPLACE_LABELS.
      Specified by:
      replaceLabelsOnNode in interface RMWebServiceProtocol
      Parameters:
      newNodeLabelsName - the list of new labels. It is a QueryParam.
      hsr - the servlet request
      nodeId - the node we want to replace the node labels. It is a PathParam.
      Returns:
      Response containing the status code
      Throws:
      Exception - if an exception happened
      See Also:
      • ResourceManagerAdministrationProtocol.replaceLabelsOnNode(org.apache.hadoop.yarn.server.api.protocolrecords.ReplaceLabelsOnNodeRequest)
    • getClusterNodeLabels

      @GET @Path("/get-node-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public NodeLabelsInfo getClusterNodeLabels(@Context javax.servlet.http.HttpServletRequest hsr) throws IOException
      Description copied from interface: RMWebServiceProtocol
      This method retrieves all the node labels in the cluster, and it is reachable by using RMWSConsts.GET_NODE_LABELS.
      Specified by:
      getClusterNodeLabels in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      Returns:
      all the node labels in the cluster
      Throws:
      IOException - if an IOException happened
      See Also:
      • ApplicationClientProtocol.getClusterNodeLabels(org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodeLabelsRequest)
    • getRMNodeLabels

      @GET @Path("/get-rm-node-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public NodeLabelsInfo getRMNodeLabels(@Context javax.servlet.http.HttpServletRequest hsr) throws IOException
      Specified by:
      getRMNodeLabels in interface 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(NodeLabelsInfo newNodeLabels, @Context javax.servlet.http.HttpServletRequest hsr) throws Exception
      Description copied from interface: RMWebServiceProtocol
      This method adds specific node labels for specific nodes, and it is reachable by using RMWSConsts.ADD_NODE_LABELS.
      Specified by:
      addToClusterNodeLabels in interface RMWebServiceProtocol
      Parameters:
      newNodeLabels - the node labels to add. It is a content param.
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      Exception - in case of bad request
      See Also:
      • ResourceManagerAdministrationProtocol.addToClusterNodeLabels(org.apache.hadoop.yarn.server.api.protocolrecords.AddToClusterNodeLabelsRequest)
    • 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
      Description copied from interface: RMWebServiceProtocol
      This method removes all the node labels for specific nodes, and it is reachable by using RMWSConsts.REMOVE_NODE_LABELS.
      Specified by:
      removeFromClusterNodeLabels in interface RMWebServiceProtocol
      Parameters:
      oldNodeLabels - the node labels to remove. It is a QueryParam.
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      Exception - in case of bad request
      See Also:
      • ResourceManagerAdministrationProtocol.removeFromClusterNodeLabels(org.apache.hadoop.yarn.server.api.protocolrecords.RemoveFromClusterNodeLabelsRequest)
    • getLabelsOnNode

      @GET @Path("/nodes/{nodeId}/get-labels") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public NodeLabelsInfo getLabelsOnNode(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("nodeId") String nodeId) throws IOException
      Description copied from interface: RMWebServiceProtocol
      This method retrieves all the node labels for specific node, and it is reachable by using RMWSConsts.NODES_NODEID_GETLABELS.
      Specified by:
      getLabelsOnNode in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      nodeId - the node we want to get all the node labels. It is a PathParam.
      Returns:
      all the labels for a specific node.
      Throws:
      IOException - if an IOException happened
    • killApp

      protected javax.ws.rs.core.Response killApp(RMApp app, org.apache.hadoop.security.UserGroupInformation callerUGI, javax.servlet.http.HttpServletRequest hsr, String diagnostic) throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • getAppPriority

      @GET @Path("/apps/{appid}/priority") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AppPriority getAppPriority(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      Description copied from interface: RMWebServiceProtocol
      This method retrieves the priority for a specific app, and it is reachable by using RMWSConsts.APPS_APPID_PRIORITY.
      Specified by:
      getAppPriority in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      appId - the app we want to get the priority. It is a PathParam.
      Returns:
      the priority for a specific application
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - in case of the user is not authorized
    • updateApplicationPriority

      @PUT @Path("/apps/{appid}/priority") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response updateApplicationPriority(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
      Description copied from interface: RMWebServiceProtocol
      This method updates the priority for a specific application, and it is reachable by using RMWSConsts.APPS_APPID_PRIORITY.
      Specified by:
      updateApplicationPriority in interface RMWebServiceProtocol
      Parameters:
      targetPriority - the priority we want to set for the app. It is a content param.
      hsr - the servlet request
      appId - the application we want to update its priority. It is a PathParam.
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authenticated
      org.apache.hadoop.yarn.exceptions.YarnException - if the target is null
      InterruptedException - if interrupted.
      IOException - if the update fails.
    • getAppQueue

      @GET @Path("/apps/{appid}/queue") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AppQueue getAppQueue(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      Description copied from interface: RMWebServiceProtocol
      This method retrieves the queue for a specific app, and it is reachable by using RMWSConsts.APPS_APPID_QUEUE.
      Specified by:
      getAppQueue in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      appId - the application we want to retrieve its queue. It is a PathParam.
      Returns:
      the Queue for a specific application.
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authenticated
    • updateAppQueue

      @PUT @Path("/apps/{appid}/queue") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response updateAppQueue(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
      Description copied from interface: RMWebServiceProtocol
      This method updates the queue for a specific application, and it is reachable by using RMWSConsts.APPS_APPID_QUEUE.
      Specified by:
      updateAppQueue in interface RMWebServiceProtocol
      Parameters:
      targetQueue - the queue we want to set. It is a content param.
      hsr - the servlet request
      appId - the application we want to change its queue. It is a PathParam.
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authenticated
      org.apache.hadoop.yarn.exceptions.YarnException - if the app is not found
      InterruptedException - if interrupted.
      IOException - if the update fails.
    • moveApp

      protected javax.ws.rs.core.Response moveApp(RMApp app, org.apache.hadoop.security.UserGroupInformation callerUGI, String targetQueue) throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • 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
      Description copied from interface: RMWebServiceProtocol
      Generates a new ApplicationId which is then sent to the client. This method is reachable by using RMWSConsts.APPS_NEW_APPLICATION.
      Specified by:
      createNewApplication in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      Returns:
      Response containing the app id and the maximum resource capabilities
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method
      IOException - if the creation fails
      InterruptedException - if interrupted
      See Also:
      • ApplicationClientProtocol.getNewApplication(org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationRequest)
    • submitApplication

      @POST @Path("/apps") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response submitApplication(ApplicationSubmissionContextInfo newApp, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Description copied from interface: RMWebServiceProtocol
      Function to submit an app to the RM. This method is reachable by using RMWSConsts.APPS.
      Specified by:
      submitApplication in interface RMWebServiceProtocol
      Parameters:
      newApp - structure containing information to construct the ApplicationSubmissionContext. It is a content param.
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method
      IOException - if the submission failed
      InterruptedException - if interrupted
      See Also:
      • ApplicationClientProtocol.submitApplication(org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationRequest)
    • postDelegationToken

      @POST @Path("/delegation-token") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response postDelegationToken(DelegationToken tokenData, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException, Exception
      Description copied from interface: RMWebServiceProtocol
      This method posts a delegation token from the client, and it is reachable by using RMWSConsts.DELEGATION_TOKEN.
      Specified by:
      postDelegationToken in interface RMWebServiceProtocol
      Parameters:
      tokenData - the token to delegate. It is a content param.
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if Kerberos auth failed
      IOException - if the delegation failed
      InterruptedException - if interrupted
      Exception - in case of bad request
      See Also:
      • ApplicationBaseProtocol.getDelegationToken(org.apache.hadoop.yarn.api.protocolrecords.GetDelegationTokenRequest)
    • postDelegationTokenExpiration

      @POST @Path("/delegation-token/expiration") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response postDelegationTokenExpiration(@Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException, Exception
      Description copied from interface: RMWebServiceProtocol
      This method updates the expiration for a delegation token from the client, and it is reachable by using RMWSConsts.DELEGATION_TOKEN_EXPIRATION.
      Specified by:
      postDelegationTokenExpiration in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if Kerberos auth failed
      IOException - if the delegation failed
      Exception - in case of bad request
      InterruptedException
      See Also:
      • ApplicationBaseProtocol.renewDelegationToken(org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenRequest)
    • 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
      Description copied from interface: RMWebServiceProtocol
      This method cancel the delegation token from the client, and it is reachable by using RMWSConsts.DELEGATION_TOKEN.
      Specified by:
      cancelDelegationToken in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if Kerberos auth failed
      IOException - if the delegation failed
      InterruptedException - if interrupted
      Exception - in case of bad request
      See Also:
      • ApplicationBaseProtocol.cancelDelegationToken(org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenRequest)
    • 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
      Description copied from interface: RMWebServiceProtocol
      Generates a new ReservationId which is then sent to the client. This method is reachable by using RMWSConsts.RESERVATION_NEW.
      Specified by:
      createNewReservation in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      Returns:
      Response containing the app id and the maximum resource capabilities
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method.
      IOException - if creation failed
      InterruptedException - if interrupted
      See Also:
      • ApplicationClientProtocol.getNewReservation(org.apache.hadoop.yarn.api.protocolrecords.GetNewReservationRequest)
    • submitReservation

      @POST @Path("/reservation/submit") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response submitReservation(ReservationSubmissionRequestInfo resContext, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Description copied from interface: RMWebServiceProtocol
      Function to submit a Reservation to the RM.This method is reachable by using RMWSConsts.RESERVATION_SUBMIT.
      Specified by:
      submitReservation in interface RMWebServiceProtocol
      Parameters:
      resContext - provides information to construct the ReservationSubmissionRequest. It is a content param.
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method
      IOException - if creation failed
      InterruptedException - if interrupted
      See Also:
      • ApplicationClientProtocol.submitReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest)
    • updateReservation

      @POST @Path("/reservation/update") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response updateReservation(ReservationUpdateRequestInfo resContext, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Description copied from interface: RMWebServiceProtocol
      Function to update a Reservation to the RM. This method is reachable by using RMWSConsts.RESERVATION_UPDATE.
      Specified by:
      updateReservation in interface RMWebServiceProtocol
      Parameters:
      resContext - provides information to construct the ReservationUpdateRequest. It is a content param.
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method
      IOException - if the operation failed
      InterruptedException - if interrupted
      See Also:
      • ApplicationClientProtocol.updateReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest)
    • deleteReservation

      @POST @Path("/reservation/delete") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response deleteReservation(ReservationDeleteRequestInfo resContext, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Description copied from interface: RMWebServiceProtocol
      Function to delete a Reservation to the RM. This method is reachable by using RMWSConsts.RESERVATION_DELETE.
      Specified by:
      deleteReservation in interface RMWebServiceProtocol
      Parameters:
      resContext - provides information to construct the ReservationDeleteRequest. It is a content param.
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - when the user group information cannot be retrieved.
      IOException - when a ReservationDeleteRequest cannot be created from the ReservationDeleteRequestInfo. This exception is also thrown on ClientRMService.deleteReservation invocation failure.
      InterruptedException - if doAs action throws an InterruptedException.
      See Also:
      • ApplicationClientProtocol.deleteReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest)
    • 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
      Description copied from interface: RMWebServiceProtocol
      Function to retrieve a list of all the reservations. This method is reachable by using RMWSConsts.RESERVATION_LIST.
      Specified by:
      listReservation in interface RMWebServiceProtocol
      Parameters:
      queue - filter the result by queue. It is a QueryParam.
      reservationId - filter the result by reservationId. It is a QueryParam.
      startTime - filter the result by start time. It is a QueryParam.
      endTime - filter the result by end time. It is a QueryParam.
      includeResourceAllocations - true if the resource allocation should be in the result, false otherwise. It is a QueryParam.
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      Exception - in case of bad request
      See Also:
      • ApplicationClientProtocol.listReservations(org.apache.hadoop.yarn.api.protocolrecords.ReservationListRequest)
    • getAppTimeout

      @GET @Path("/apps/{appid}/timeouts/{type}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AppTimeoutInfo getAppTimeout(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId, @PathParam("type") String type) throws org.apache.hadoop.security.authorize.AuthorizationException
      Description copied from interface: RMWebServiceProtocol
      This method retrieves the timeout information for a specific app with a specific type, and it is reachable by using RMWSConsts.APPS_TIMEOUTS_TYPE.
      Specified by:
      getAppTimeout in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      appId - the application we want to get the timeout. It is a PathParam.
      type - the type of the timeouts. It is a PathParam.
      Returns:
      the timeout for a specific application with a specific type.
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized
    • getAppTimeouts

      @GET @Path("/apps/{appid}/timeouts") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public AppTimeoutsInfo getAppTimeouts(@Context javax.servlet.http.HttpServletRequest hsr, @PathParam("appid") String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      Description copied from interface: RMWebServiceProtocol
      This method retrieves the timeout information for a specific app, and it is reachable by using RMWSConsts.APPS_TIMEOUTS.
      Specified by:
      getAppTimeouts in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      appId - the application we want to get the timeouts. It is a PathParam.
      Returns:
      the timeouts for a specific application
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized
    • updateApplicationTimeout

      @PUT @Path("/apps/{appid}/timeout") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response updateApplicationTimeout(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
      Description copied from interface: RMWebServiceProtocol
      This method updates the timeout information for a specific app, and it is reachable by using RMWSConsts.APPS_TIMEOUT.
      Specified by:
      updateApplicationTimeout in interface RMWebServiceProtocol
      Parameters:
      appTimeout - the appTimeoutInfo. It is a content param.
      hsr - the servlet request
      appId - the application we want to update. It is a PathParam.
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method
      org.apache.hadoop.yarn.exceptions.YarnException - in case of bad request
      InterruptedException - if interrupted
      IOException - if the operation failed
      See Also:
      • ApplicationClientProtocol.updateApplicationTimeouts(org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsRequest)
    • getApplicationReport

      protected org.apache.hadoop.yarn.api.records.ApplicationReport getApplicationReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Overrides:
      getApplicationReport in class org.apache.hadoop.yarn.server.webapp.WebServices
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getApplicationsReport

      protected List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplicationsReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Overrides:
      getApplicationsReport in class org.apache.hadoop.yarn.server.webapp.WebServices
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getApplicationAttemptReport

      protected org.apache.hadoop.yarn.api.records.ApplicationAttemptReport getApplicationAttemptReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Overrides:
      getApplicationAttemptReport in class org.apache.hadoop.yarn.server.webapp.WebServices
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getApplicationAttemptsReport

      protected List<org.apache.hadoop.yarn.api.records.ApplicationAttemptReport> getApplicationAttemptsReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Overrides:
      getApplicationAttemptsReport in class org.apache.hadoop.yarn.server.webapp.WebServices
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getContainerReport

      protected org.apache.hadoop.yarn.api.records.ContainerReport getContainerReport(org.apache.hadoop.yarn.api.protocolrecords.GetContainerReportRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Overrides:
      getContainerReport in class org.apache.hadoop.yarn.server.webapp.WebServices
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getContainersReport

      protected List<org.apache.hadoop.yarn.api.records.ContainerReport> getContainersReport(org.apache.hadoop.yarn.api.protocolrecords.GetContainersRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Overrides:
      getContainersReport in class org.apache.hadoop.yarn.server.webapp.WebServices
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • formatSchedulerConfiguration

      @GET @Path("/scheduler-conf/format") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response formatSchedulerConfiguration(@Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • validateAndGetSchedulerConfiguration

      @POST @Path("/scheduler-conf/validate") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response validateAndGetSchedulerConfiguration(org.apache.hadoop.yarn.webapp.dao.SchedConfUpdateInfo mutationInfo, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • 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
      Description copied from interface: RMWebServiceProtocol
      This method updates the Scheduler configuration, and it is reachable by using RMWSConsts.SCHEDULER_CONF.
      Specified by:
      updateSchedulerConfiguration in interface RMWebServiceProtocol
      Parameters:
      mutationInfo - th information for making scheduler configuration changes (supports adding, removing, or updating a queue, as well as global scheduler conf changes)
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method
      InterruptedException - if interrupted
    • getSchedulerConfiguration

      @GET @Path("/scheduler-conf") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response getSchedulerConfiguration(@Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException
      Description copied from interface: RMWebServiceProtocol
      This method retrieves all the Scheduler configuration, and it is reachable by using RMWSConsts.SCHEDULER_CONF.
      Specified by:
      getSchedulerConfiguration in interface RMWebServiceProtocol
      Parameters:
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method.
    • getSchedulerConfigurationVersion

      @GET @Path("/scheduler-conf/version") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public javax.ws.rs.core.Response getSchedulerConfigurationVersion(@Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException
    • checkUserAccessToQueue

      @GET @Path("/queues/{queue}/access") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public 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
      Description copied from interface: RMWebServiceProtocol
      This method verifies if a user has access to a specified queue.
      Specified by:
      checkUserAccessToQueue in interface RMWebServiceProtocol
      Parameters:
      queue - queue
      username - user
      queueAclType - acl type of queue, it could be SUBMIT_APPLICATIONS/ADMINISTER_QUEUE
      hsr - request
      Returns:
      Response containing the status code.
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method.
    • signalToContainer

      @POST @Path("/containers/{containerid}/signal/{command}") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) @Consumes({"application/json","application/xml"}) public javax.ws.rs.core.Response signalToContainer(@PathParam("containerid") String containerId, @PathParam("command") String command, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException
      Description copied from interface: RMWebServiceProtocol
      This method sends a signal to container.
      Specified by:
      signalToContainer in interface RMWebServiceProtocol
      Parameters:
      containerId - containerId
      command - signal command, it could be OUTPUT_THREAD_DUMP/ GRACEFUL_SHUTDOWN/FORCEFUL_SHUTDOWN
      hsr - request
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method.
    • getSchedulerOverview

      @GET @Path("/scheduler-overview") @Produces({"application/json; charset=utf-8","application/xml; charset=utf-8"}) public SchedulerOverviewInfo getSchedulerOverview()
    • getAppsLRUCache

      @VisibleForTesting public org.apache.hadoop.yarn.util.LRUCache<org.apache.hadoop.yarn.util.AppsCacheKey,AppsInfo> getAppsLRUCache()
    • setResponse

      @VisibleForTesting public void setResponse(javax.servlet.http.HttpServletResponse response)