Interface RMWebServiceProtocol

All Known Implementing Classes:
RMWebServices

@Private @Evolving public interface RMWebServiceProtocol

The protocol between clients and the ResourceManager to submit/abort jobs and to get information on applications, cluster metrics, nodes, queues, ACLs and reservations via REST calls.

The WebService is reachable by using RMWSConsts.RM_WEB_SERVICE_PATH
  • Method Details

    • get

      This method retrieves the cluster information, and it is reachable by using RMWSConsts.INFO.
      Returns:
      the cluster information
    • getClusterInfo

      ClusterInfo getClusterInfo()
      This method retrieves the cluster information, and it is reachable by using RMWSConsts.INFO.
      Returns:
      the cluster information
    • getClusterUserInfo

      ClusterUserInfo getClusterUserInfo(javax.servlet.http.HttpServletRequest hsr)
      This method retrieves the cluster user information, and it is reachable by using RMWSConsts.CLUSTER_USER_INFO.
      Parameters:
      hsr - the servlet request
      Returns:
      the cluster user information
    • getClusterMetricsInfo

      ClusterMetricsInfo getClusterMetricsInfo()
      This method retrieves the cluster metrics information, and it is reachable by using RMWSConsts.METRICS.
      Returns:
      the cluster metrics information
      See Also:
      • ApplicationClientProtocol.getClusterMetrics(org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsRequest)
    • getSchedulerInfo

      SchedulerTypeInfo getSchedulerInfo()
      This method retrieves the current scheduler status, and it is reachable by using RMWSConsts.SCHEDULER.
      Returns:
      the current scheduler status
    • dumpSchedulerLogs

      String dumpSchedulerLogs(String time, javax.servlet.http.HttpServletRequest hsr) throws IOException
      This method dumps the scheduler logs for the time got in input, and it is reachable by using RMWSConsts.SCHEDULER_LOGS.
      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

      NodesInfo getNodes(String states)
      This method retrieves all the nodes information in the cluster, and it is reachable by using RMWSConsts.NODES.
      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

      NodeInfo getNode(String nodeId)
      This method retrieves a specific node information, and it is reachable by using RMWSConsts.NODES_NODEID.
      Parameters:
      nodeId - the node we want to retrieve the information. It is a PathParam.
      Returns:
      the information about the node in input
    • updateNodeResource

      ResourceInfo updateNodeResource(javax.servlet.http.HttpServletRequest hsr, String nodeId, ResourceOptionInfo resourceOption) throws org.apache.hadoop.security.authorize.AuthorizationException
      This method changes the resources of a specific node, and it is reachable by using RMWSConsts.NODE_RESOURCE.
      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.
    • getApps

      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)
      This method retrieves all the app reports in the cluster, and it is reachable by using RMWSConsts.APPS.
      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.
      count - 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

      ActivitiesInfo getActivities(javax.servlet.http.HttpServletRequest hsr, String nodeId, String groupBy)
      This method retrieve all the activities in a specific node, and it is reachable by using RMWSConsts.SCHEDULER_ACTIVITIES.
      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

      BulkActivitiesInfo getBulkActivities(javax.servlet.http.HttpServletRequest hsr, String groupBy, int activitiesCount) throws InterruptedException
      This method retrieve the last n activities inside scheduler, and it is reachable by using RMWSConsts.SCHEDULER_BULK_ACTIVITIES.
      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

      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)
      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.
      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

      ApplicationStatisticsInfo getAppStatistics(javax.servlet.http.HttpServletRequest hsr, Set<String> stateQueries, Set<String> typeQueries)
      This method retrieves all the statistics for a specific app, and it is reachable by using RMWSConsts.APP_STATISTICS.
      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

      AppInfo getApp(javax.servlet.http.HttpServletRequest hsr, String appId, Set<String> unselectedFields)
      This method retrieves the report for a specific app, and it is reachable by using RMWSConsts.APPS_APPID.
      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)
    • getAppState

      AppState getAppState(javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      This method retrieves the state for a specific app, and it is reachable by using RMWSConsts.APPS_APPID_STATE.
      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

      javax.ws.rs.core.Response updateAppState(AppState targetState, javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
      This method updates the state of the app in input, and it is reachable by using RMWSConsts.APPS_APPID_STATE.
      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

      NodeToLabelsInfo getNodeToLabels(javax.servlet.http.HttpServletRequest hsr) throws IOException
      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.
      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)
    • getRMNodeLabels

      NodeLabelsInfo getRMNodeLabels(javax.servlet.http.HttpServletRequest hsr) throws IOException
      Throws:
      IOException
    • getLabelsToNodes

      LabelsToNodesInfo getLabelsToNodes(Set<String> labels) throws IOException
      This method retrieves all the node within multiple node labels in the cluster, and it is reachable by using RMWSConsts.LABEL_MAPPINGS.
      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

      javax.ws.rs.core.Response replaceLabelsOnNodes(NodeToLabelsEntryList newNodeToLabels, javax.servlet.http.HttpServletRequest hsr) throws Exception
      This method replaces all the node labels for specific nodes, and it is reachable by using RMWSConsts.REPLACE_NODE_TO_LABELS.
      Parameters:
      newNodeToLabels - the list of new labels. It is a content param.
      hsr - the servlet request
      Returns:
      Response containing the status code
      Throws:
      Exception - if an exception happened
      See Also:
      • ResourceManagerAdministrationProtocol.replaceLabelsOnNode(org.apache.hadoop.yarn.server.api.protocolrecords.ReplaceLabelsOnNodeRequest)
    • replaceLabelsOnNode

      javax.ws.rs.core.Response replaceLabelsOnNode(Set<String> newNodeLabelsName, javax.servlet.http.HttpServletRequest hsr, String nodeId) throws Exception
      This method replaces all the node labels for specific node, and it is reachable by using RMWSConsts.NODES_NODEID_REPLACE_LABELS.
      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

      NodeLabelsInfo getClusterNodeLabels(javax.servlet.http.HttpServletRequest hsr) throws IOException
      This method retrieves all the node labels in the cluster, and it is reachable by using RMWSConsts.GET_NODE_LABELS.
      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)
    • addToClusterNodeLabels

      javax.ws.rs.core.Response addToClusterNodeLabels(NodeLabelsInfo newNodeLabels, javax.servlet.http.HttpServletRequest hsr) throws Exception
      This method adds specific node labels for specific nodes, and it is reachable by using RMWSConsts.ADD_NODE_LABELS.
      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

      javax.ws.rs.core.Response removeFromClusterNodeLabels(Set<String> oldNodeLabels, javax.servlet.http.HttpServletRequest hsr) throws Exception
      This method removes all the node labels for specific nodes, and it is reachable by using RMWSConsts.REMOVE_NODE_LABELS.
      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

      NodeLabelsInfo getLabelsOnNode(javax.servlet.http.HttpServletRequest hsr, String nodeId) throws IOException
      This method retrieves all the node labels for specific node, and it is reachable by using RMWSConsts.NODES_NODEID_GETLABELS.
      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
    • getAppPriority

      AppPriority getAppPriority(javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      This method retrieves the priority for a specific app, and it is reachable by using RMWSConsts.APPS_APPID_PRIORITY.
      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

      javax.ws.rs.core.Response updateApplicationPriority(AppPriority targetPriority, javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
      This method updates the priority for a specific application, and it is reachable by using RMWSConsts.APPS_APPID_PRIORITY.
      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
      IOException - if the update fails.
      InterruptedException - if interrupted.
    • getAppQueue

      AppQueue getAppQueue(javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      This method retrieves the queue for a specific app, and it is reachable by using RMWSConsts.APPS_APPID_QUEUE.
      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

      javax.ws.rs.core.Response updateAppQueue(AppQueue targetQueue, javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
      This method updates the queue for a specific application, and it is reachable by using RMWSConsts.APPS_APPID_QUEUE.
      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
      IOException - if the update fails.
      InterruptedException - if interrupted.
    • createNewApplication

      javax.ws.rs.core.Response createNewApplication(javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Generates a new ApplicationId which is then sent to the client. This method is reachable by using RMWSConsts.APPS_NEW_APPLICATION.
      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

      javax.ws.rs.core.Response submitApplication(ApplicationSubmissionContextInfo newApp, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Function to submit an app to the RM. This method is reachable by using RMWSConsts.APPS.
      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

      javax.ws.rs.core.Response postDelegationToken(DelegationToken tokenData, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException, Exception
      This method posts a delegation token from the client, and it is reachable by using RMWSConsts.DELEGATION_TOKEN.
      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

      javax.ws.rs.core.Response postDelegationTokenExpiration(javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, Exception
      This method updates the expiration for a delegation token from the client, and it is reachable by using RMWSConsts.DELEGATION_TOKEN_EXPIRATION.
      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
      See Also:
      • ApplicationBaseProtocol.renewDelegationToken(org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenRequest)
    • cancelDelegationToken

      javax.ws.rs.core.Response cancelDelegationToken(javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException, Exception
      This method cancel the delegation token from the client, and it is reachable by using RMWSConsts.DELEGATION_TOKEN.
      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

      javax.ws.rs.core.Response createNewReservation(javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Generates a new ReservationId which is then sent to the client. This method is reachable by using RMWSConsts.RESERVATION_NEW.
      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

      javax.ws.rs.core.Response submitReservation(ReservationSubmissionRequestInfo resContext, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Function to submit a Reservation to the RM.This method is reachable by using RMWSConsts.RESERVATION_SUBMIT.
      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

      javax.ws.rs.core.Response updateReservation(ReservationUpdateRequestInfo resContext, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Function to update a Reservation to the RM. This method is reachable by using RMWSConsts.RESERVATION_UPDATE.
      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

      javax.ws.rs.core.Response deleteReservation(ReservationDeleteRequestInfo resContext, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
      Function to delete a Reservation to the RM. This method is reachable by using RMWSConsts.RESERVATION_DELETE.
      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

      javax.ws.rs.core.Response listReservation(String queue, String reservationId, long startTime, long endTime, boolean includeResourceAllocations, javax.servlet.http.HttpServletRequest hsr) throws Exception
      Function to retrieve a list of all the reservations. This method is reachable by using RMWSConsts.RESERVATION_LIST.
      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

      AppTimeoutInfo getAppTimeout(javax.servlet.http.HttpServletRequest hsr, String appId, String type) throws org.apache.hadoop.security.authorize.AuthorizationException
      This method retrieves the timeout information for a specific app with a specific type, and it is reachable by using RMWSConsts.APPS_TIMEOUTS_TYPE.
      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

      AppTimeoutsInfo getAppTimeouts(javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
      This method retrieves the timeout information for a specific app, and it is reachable by using RMWSConsts.APPS_TIMEOUTS.
      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

      javax.ws.rs.core.Response updateApplicationTimeout(AppTimeoutInfo appTimeout, javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
      This method updates the timeout information for a specific app, and it is reachable by using RMWSConsts.APPS_TIMEOUT.
      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
      IOException - if the operation failed
      InterruptedException - if interrupted
      See Also:
      • ApplicationClientProtocol.updateApplicationTimeouts(org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsRequest)
    • getAppAttempts

      AppAttemptsInfo getAppAttempts(javax.servlet.http.HttpServletRequest hsr, String appId)
      This method retrieves all the attempts information for a specific app, and it is reachable by using RMWSConsts.APPS_APPID_APPATTEMPTS.
      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)
    • checkUserAccessToQueue

      RMQueueAclInfo checkUserAccessToQueue(String queue, String username, String queueAclType, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException
      This method verifies if a user has access to a specified queue.
      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

      javax.ws.rs.core.Response signalToContainer(String containerId, String command, javax.servlet.http.HttpServletRequest req) throws org.apache.hadoop.security.authorize.AuthorizationException
      This method sends a signal to container.
      Parameters:
      containerId - containerId
      command - signal command, it could be OUTPUT_THREAD_DUMP/ GRACEFUL_SHUTDOWN/FORCEFUL_SHUTDOWN
      req - request
      Returns:
      Response containing the status code
      Throws:
      org.apache.hadoop.security.authorize.AuthorizationException - if the user is not authorized to invoke this method.
    • updateSchedulerConfiguration

      javax.ws.rs.core.Response updateSchedulerConfiguration(org.apache.hadoop.yarn.webapp.dao.SchedConfUpdateInfo mutationInfo, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, InterruptedException
      This method updates the Scheduler configuration, and it is reachable by using RMWSConsts.SCHEDULER_CONF.
      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

      javax.ws.rs.core.Response getSchedulerConfiguration(javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException
      This method retrieves all the Scheduler configuration, and it is reachable by using RMWSConsts.SCHEDULER_CONF.
      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.