public class RMWebServices extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DELEGATION_TOKEN_HEADER |
| Constructor and Description |
|---|
RMWebServices(ResourceManager rm,
org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
cancelDelegationToken(javax.servlet.http.HttpServletRequest hsr) |
protected org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext |
createAppSubmissionContext(ApplicationSubmissionContextInfo newApp)
Create the actual ApplicationSubmissionContext to be submitted to the RM
from the information provided by the user.
|
protected org.apache.hadoop.yarn.api.records.Resource |
createAppSubmissionContextResource(ApplicationSubmissionContextInfo newApp) |
protected org.apache.hadoop.yarn.api.records.ContainerLaunchContext |
createContainerLaunchContext(ApplicationSubmissionContextInfo newApp)
Create the ContainerLaunchContext required for the
ApplicationSubmissionContext.
|
javax.ws.rs.core.Response |
createNewApplication(javax.servlet.http.HttpServletRequest hsr)
Generates a new ApplicationId which is then sent to the client
|
ClusterInfo |
get() |
AppInfo |
getApp(javax.servlet.http.HttpServletRequest hsr,
String appId) |
AppAttemptsInfo |
getAppAttempts(String appId) |
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) |
AppState |
getAppState(javax.servlet.http.HttpServletRequest hsr,
String appId) |
ApplicationStatisticsInfo |
getAppStatistics(javax.servlet.http.HttpServletRequest hsr,
Set<String> stateQueries,
Set<String> typeQueries) |
ClusterInfo |
getClusterInfo() |
ClusterMetricsInfo |
getClusterMetricsInfo() |
NodeInfo |
getNode(String nodeId) |
NodesInfo |
getNodes(String states)
Returns all nodes in the cluster.
|
SchedulerTypeInfo |
getSchedulerInfo() |
protected Boolean |
hasAccess(RMApp app,
javax.servlet.http.HttpServletRequest hsr) |
protected javax.ws.rs.core.Response |
killApp(RMApp app,
org.apache.hadoop.security.UserGroupInformation callerUGI,
javax.servlet.http.HttpServletRequest hsr) |
javax.ws.rs.core.Response |
postDelegationToken(DelegationToken tokenData,
javax.servlet.http.HttpServletRequest hsr) |
javax.ws.rs.core.Response |
postDelegationTokenExpiration(javax.servlet.http.HttpServletRequest hsr) |
javax.ws.rs.core.Response |
submitApplication(ApplicationSubmissionContextInfo newApp,
javax.servlet.http.HttpServletRequest hsr)
Function to submit an app to the RM
|
javax.ws.rs.core.Response |
updateAppState(AppState targetState,
javax.servlet.http.HttpServletRequest hsr,
String appId) |
public static final String DELEGATION_TOKEN_HEADER
@Inject public RMWebServices(ResourceManager rm, org.apache.hadoop.conf.Configuration conf)
public ClusterInfo get()
public ClusterInfo getClusterInfo()
public ClusterMetricsInfo getClusterMetricsInfo()
public SchedulerTypeInfo getSchedulerInfo()
public NodesInfo getNodes(String states)
public AppsInfo getApps(@Context 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)
public ApplicationStatisticsInfo getAppStatistics(@Context javax.servlet.http.HttpServletRequest hsr, Set<String> stateQueries, Set<String> typeQueries)
public AppAttemptsInfo getAppAttempts(String appId)
public AppState getAppState(@Context javax.servlet.http.HttpServletRequest hsr, String appId) throws org.apache.hadoop.security.authorize.AuthorizationException
org.apache.hadoop.security.authorize.AuthorizationExceptionpublic javax.ws.rs.core.Response updateAppState(AppState targetState, @Context 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.AuthorizationExceptionorg.apache.hadoop.yarn.exceptions.YarnExceptionInterruptedExceptionIOExceptionprotected javax.ws.rs.core.Response killApp(RMApp app, org.apache.hadoop.security.UserGroupInformation callerUGI, javax.servlet.http.HttpServletRequest hsr) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic javax.ws.rs.core.Response createNewApplication(@Context
javax.servlet.http.HttpServletRequest hsr)
throws org.apache.hadoop.security.authorize.AuthorizationException,
IOException,
InterruptedException
hsr - the servlet requestorg.apache.hadoop.security.authorize.AuthorizationExceptionIOExceptionInterruptedExceptionpublic javax.ws.rs.core.Response submitApplication(ApplicationSubmissionContextInfo newApp, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException
newApp - structure containing information to construct the
ApplicationSubmissionContexthsr - the servlet requestorg.apache.hadoop.security.authorize.AuthorizationExceptionIOExceptionInterruptedExceptionprotected org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext createAppSubmissionContext(ApplicationSubmissionContextInfo newApp) throws IOException
newApp - the information provided by the userIOExceptionprotected org.apache.hadoop.yarn.api.records.Resource createAppSubmissionContextResource(ApplicationSubmissionContextInfo newApp) throws org.apache.hadoop.yarn.webapp.BadRequestException
org.apache.hadoop.yarn.webapp.BadRequestExceptionprotected org.apache.hadoop.yarn.api.records.ContainerLaunchContext createContainerLaunchContext(ApplicationSubmissionContextInfo newApp) throws org.apache.hadoop.yarn.webapp.BadRequestException, IOException
newApp - the information provided by the userorg.apache.hadoop.yarn.webapp.BadRequestExceptionIOExceptionpublic javax.ws.rs.core.Response postDelegationToken(DelegationToken tokenData, @Context javax.servlet.http.HttpServletRequest hsr) throws org.apache.hadoop.security.authorize.AuthorizationException, IOException, InterruptedException, Exception
org.apache.hadoop.security.authorize.AuthorizationExceptionIOExceptionInterruptedExceptionExceptionpublic javax.ws.rs.core.Response postDelegationTokenExpiration(@Context
javax.servlet.http.HttpServletRequest hsr)
throws org.apache.hadoop.security.authorize.AuthorizationException,
IOException,
InterruptedException,
Exception
org.apache.hadoop.security.authorize.AuthorizationExceptionIOExceptionInterruptedExceptionExceptionpublic javax.ws.rs.core.Response cancelDelegationToken(@Context
javax.servlet.http.HttpServletRequest hsr)
throws org.apache.hadoop.security.authorize.AuthorizationException,
IOException,
InterruptedException,
Exception
org.apache.hadoop.security.authorize.AuthorizationExceptionIOExceptionInterruptedExceptionExceptionCopyright © 2014 Apache Software Foundation. All Rights Reserved.