public void cancelRequest(long requestId, String reason) {
    scheduler.scheduleCancellingRequest(requestId, reason);
    scheduler.awake();
  }
Get first or last maxResults requests that are in the specified status

@param status
         Desired request status
@param maxResults
         maximal number of returned id's
@param ascOrder
         defines sorting order for database query result
@return First or last maxResults request id's if ascOrder is true or false,
        respectively
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java