public class DefaultRequestInterceptorREST extends AbstractRESTRequestInterceptor
Constructor and Description |
---|
DefaultRequestInterceptorREST() |
Modifier and Type | Method and 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) |
javax.ws.rs.core.Response |
deleteReservation(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationDeleteRequestInfo resContext,
javax.servlet.http.HttpServletRequest hsr) |
String |
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.ClusterInfo |
getClusterInfo() |
org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo |
getClusterMetricsInfo() |
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) |
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 |
getLabelsToNodes(Set<String> labels) |
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) |
org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.SchedulerTypeInfo |
getSchedulerInfo() |
protected org.apache.hadoop.yarn.server.federation.store.records.SubClusterId |
getSubClusterId() |
protected String |
getWebAppAddress() |
void |
init(String user)
Initializes the
RESTRequestInterceptor . |
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 |
removeFromCluserNodeLabels(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) |
void |
setNextInterceptor(RESTRequestInterceptor next)
Sets the
RESTRequestInterceptor in the chain. |
protected void |
setSubClusterId(org.apache.hadoop.yarn.server.federation.store.records.SubClusterId scId) |
void |
setWebAppAddress(String webAppAddress) |
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) |
getConf, getNextInterceptor, setConf, shutdown
public void setWebAppAddress(String webAppAddress)
protected String getWebAppAddress()
protected void setSubClusterId(org.apache.hadoop.yarn.server.federation.store.records.SubClusterId scId)
protected org.apache.hadoop.yarn.server.federation.store.records.SubClusterId getSubClusterId()
public void init(String user)
AbstractRESTRequestInterceptor
RESTRequestInterceptor
.init
in interface RESTRequestInterceptor
init
in class AbstractRESTRequestInterceptor
user
- the name of the clientpublic org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterInfo get()
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterInfo getClusterInfo()
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterUserInfo getClusterUserInfo(javax.servlet.http.HttpServletRequest hsr)
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo getClusterMetricsInfo()
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.SchedulerTypeInfo getSchedulerInfo()
public String dumpSchedulerLogs(String time, javax.servlet.http.HttpServletRequest hsr) throws IOException
IOException
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodesInfo getNodes(String states)
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeInfo getNode(String nodeId)
public 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)
public 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)
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ActivitiesInfo getActivities(javax.servlet.http.HttpServletRequest hsr, String nodeId, String groupBy)
public 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)
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ApplicationStatisticsInfo getAppStatistics(javax.servlet.http.HttpServletRequest hsr, Set<String> stateQueries, Set<String> typeQueries)
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo getApp(javax.servlet.http.HttpServletRequest hsr, String appId, Set<String> unselectedFields)
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState getAppState(javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
org.apache.hadoop.security.authorize.AuthorizationException
public javax.ws.rs.core.Response updateAppState(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState targetState, javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
org.apache.hadoop.security.authorize.AuthorizationException
org.apache.hadoop.yarn.exceptions.YarnException
InterruptedException
IOException
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeToLabelsInfo getNodeToLabels(javax.servlet.http.HttpServletRequest hsr) throws IOException
IOException
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.LabelsToNodesInfo getLabelsToNodes(Set<String> labels) throws IOException
IOException
public javax.ws.rs.core.Response replaceLabelsOnNodes(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeToLabelsEntryList newNodeToLabels, javax.servlet.http.HttpServletRequest hsr) throws IOException
IOException
public javax.ws.rs.core.Response replaceLabelsOnNode(Set<String> newNodeLabelsName, javax.servlet.http.HttpServletRequest hsr, String nodeId) throws Exception
Exception
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo getClusterNodeLabels(javax.servlet.http.HttpServletRequest hsr) throws IOException
IOException
public javax.ws.rs.core.Response addToClusterNodeLabels(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo newNodeLabels, javax.servlet.http.HttpServletRequest hsr) throws Exception
Exception
public javax.ws.rs.core.Response removeFromCluserNodeLabels(Set<String> oldNodeLabels, javax.servlet.http.HttpServletRequest hsr) throws Exception
Exception
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo getLabelsOnNode(javax.servlet.http.HttpServletRequest hsr, String nodeId) throws IOException
IOException
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppPriority getAppPriority(javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
org.apache.hadoop.security.authorize.AuthorizationException
public javax.ws.rs.core.Response updateApplicationPriority(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppPriority targetPriority, javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
org.apache.hadoop.security.authorize.AuthorizationException
org.apache.hadoop.yarn.exceptions.YarnException
InterruptedException
IOException
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppQueue getAppQueue(javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
org.apache.hadoop.security.authorize.AuthorizationException
public javax.ws.rs.core.Response updateAppQueue(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppQueue targetQueue, javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
org.apache.hadoop.security.authorize.AuthorizationException
org.apache.hadoop.yarn.exceptions.YarnException
InterruptedException
IOException
public javax.ws.rs.core.Response createNewApplication(javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
org.apache.hadoop.security.authorize.AuthorizationException
IOException
InterruptedException
public javax.ws.rs.core.Response submitApplication(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ApplicationSubmissionContextInfo newApp, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
org.apache.hadoop.security.authorize.AuthorizationException
IOException
InterruptedException
public javax.ws.rs.core.Response postDelegationToken(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.DelegationToken tokenData, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException, Exception
org.apache.hadoop.security.authorize.AuthorizationException
IOException
InterruptedException
Exception
public javax.ws.rs.core.Response postDelegationTokenExpiration(javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException, Exception
org.apache.hadoop.security.authorize.AuthorizationException
IOException
InterruptedException
Exception
public javax.ws.rs.core.Response cancelDelegationToken(javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException, Exception
org.apache.hadoop.security.authorize.AuthorizationException
IOException
InterruptedException
Exception
public javax.ws.rs.core.Response createNewReservation(javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
org.apache.hadoop.security.authorize.AuthorizationException
IOException
InterruptedException
public javax.ws.rs.core.Response submitReservation(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationSubmissionRequestInfo resContext, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
org.apache.hadoop.security.authorize.AuthorizationException
IOException
InterruptedException
public javax.ws.rs.core.Response updateReservation(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationUpdateRequestInfo resContext, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
org.apache.hadoop.security.authorize.AuthorizationException
IOException
InterruptedException
public javax.ws.rs.core.Response deleteReservation(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ReservationDeleteRequestInfo resContext, javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
org.apache.hadoop.security.authorize.AuthorizationException
IOException
InterruptedException
public javax.ws.rs.core.Response listReservation(String queue, String reservationId, long startTime, long endTime, boolean includeResourceAllocations, javax.servlet.http.HttpServletRequest hsr) throws Exception
Exception
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppTimeoutInfo getAppTimeout(javax.servlet.http.HttpServletRequest hsr, String appId, String type) throws org.apache.hadoop.security.authorize.AuthorizationException
org.apache.hadoop.security.authorize.AuthorizationException
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppTimeoutsInfo getAppTimeouts(javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
org.apache.hadoop.security.authorize.AuthorizationException
public javax.ws.rs.core.Response updateApplicationTimeout(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppTimeoutInfo appTimeout, javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException, org.apache.hadoop.yarn.exceptions.YarnException, InterruptedException, IOException
org.apache.hadoop.security.authorize.AuthorizationException
org.apache.hadoop.yarn.exceptions.YarnException
InterruptedException
IOException
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppAttemptsInfo getAppAttempts(javax.servlet.http.HttpServletRequest hsr, String appId)
public org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.RMQueueAclInfo checkUserAccessToQueue(String queue, String username, String queueAclType, javax.servlet.http.HttpServletRequest hsr)
public org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfo getAppAttempt(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId, String appAttemptId)
req
- the servlet requestres
- the servlet responseappId
- the application we want to get the appAttempt. It is a
PathParam.appAttemptId
- the AppAttempt we want to get the info. It is a
PathParam.WebServices.getAppAttempt(HttpServletRequest, HttpServletResponse,
String, String)
public org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo getContainers(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String appId, String appAttemptId)
req
- the servlet requestres
- the servlet responseappId
- the application we want to get the containers info. It is a
PathParam.appAttemptId
- the AppAttempt we want to get the info. It is a
PathParam.WebServices.getContainers(HttpServletRequest, HttpServletResponse,
String, String)
public 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)
req
- the servlet requestres
- the servlet responseappId
- the application we want to get the containers info. It is a
PathParam.appAttemptId
- the AppAttempt we want to get the info. It is a
PathParam.containerId
- the container we want to get the info. It is a
PathParam.WebServices.getContainer(HttpServletRequest, HttpServletResponse,
String, String, String)
public void setNextInterceptor(RESTRequestInterceptor next)
AbstractRESTRequestInterceptor
RESTRequestInterceptor
in the chain.setNextInterceptor
in interface RESTRequestInterceptor
setNextInterceptor
in class AbstractRESTRequestInterceptor
next
- the RESTRequestInterceptor to set in the pipelineCopyright © 2008–2020 Apache Software Foundation. All rights reserved.