public ApplicationsRequestBuilder withApplicationTags( Set<String> applicationTags) { if (applicationTags != null) { appTags = parseQueries(applicationTags, false); } return this; }
@GET @Path(RMWSConsts.APPS_APPID_APPATTEMPTS_APPATTEMPTID) @Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8, MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 }) @Override public org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfo getAppAttempt( @Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam(RMWSConsts.APPID) String appId, @PathParam(RMWSConsts.APPATTEMPTID) String appAttemptId) { initForReadableEndpoints(res); return super.getAppAttempt(req, res, appId, appAttemptId); }
@GET @Path("/apps/{appid}/appattempts/{appattemptid}/containers/{containerid}") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override public ContainerInfo getContainer(@Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam("appid") String appId, @PathParam("appattemptid") String appAttemptId, @PathParam("containerid") String containerId) { init(res); return super.getContainer(req, res, appId, appAttemptId, containerId); }
public ContainerInfo getContainer(HttpServletRequest req, HttpServletResponse res, String appId, String appAttemptId, String containerId) { UserGroupInformation callerUGI = getUser(req); ApplicationId aid = parseApplicationId(appId); ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId); final ContainerId cid = parseContainerId(containerId); validateIds(aid, aaid, cid); ContainerReport container = null; try { rewrapAndThrowException(e);
public AppInfo getApp(HttpServletRequest req, HttpServletResponse res, String appId) { UserGroupInformation callerUGI = getUser(req); final ApplicationId id = parseApplicationId(appId); ApplicationReport app = null; try { if (callerUGI == null) { GetApplicationReportRequest request = GetApplicationReportRequest.newInstance(id); app = appBaseProt.getApplicationReport(request).getApplicationReport(); } else { app = callerUGI.doAs( new PrivilegedExceptionAction<ApplicationReport> () { @Override public ApplicationReport run() throws Exception { GetApplicationReportRequest request = GetApplicationReportRequest.newInstance(id); return appBaseProt.getApplicationReport(request).getApplicationReport(); } }); } } catch (Exception e) { rewrapAndThrowException(e); } if (app == null) { throw new NotFoundException("app with id: " + appId + " not found"); } return new AppInfo(app); }
String startedEnd, String finishBegin, String finishEnd, Set<String> applicationTypes) { UserGroupInformation callerUGI = getUser(req); boolean checkEnd = false; boolean checkAppTypes = false; Set<String> appTypes = parseQueries(applicationTypes, false); if (!appTypes.isEmpty()) { checkAppTypes = true; statesQuery.add(stateQuery); Set<String> appStates = parseQueries(statesQuery, true); if (!appStates.isEmpty()) { checkAppStates = true; rewrapAndThrowException(e);
AppInfo appInfo; try { appInfo = super.getApp(req, res, appId.toString()); } catch (Exception ex) { ContainerInfo containerInfo; try { containerInfo = super.getContainer( req, res, appId.toString(), containerId.getApplicationAttemptId().toString(),
@GET @Path("/apps/{appid}/appattempts/{appattemptid}/containers") @Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8, MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 }) @Override public ContainersInfo getContainers(@Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam("appid") String appId, @PathParam("appattemptid") String appAttemptId) { initForReadableEndpoints(res); return super.getContainers(req, res, appId, appAttemptId); }
@GET @Path("/apps/{appid}") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override public AppInfo getApp(@Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam("appid") String appId) { init(res); return super.getApp(req, res, appId); }
@GET @Path("/apps/{appid}/appattempts") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override public AppAttemptsInfo getAppAttempts(@Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam("appid") String appId) { init(res); return super.getAppAttempts(req, res, appId); }
@GET @Path("/apps") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override public AppsInfo getApps(@Context HttpServletRequest req, @Context HttpServletResponse res, @QueryParam("state") String stateQuery, @QueryParam("states") Set<String> statesQuery, @QueryParam("finalStatus") String finalStatusQuery, @QueryParam("user") String userQuery, @QueryParam("queue") String queueQuery, @QueryParam("limit") String count, @QueryParam("startedTimeBegin") String startedBegin, @QueryParam("startedTimeEnd") String startedEnd, @QueryParam("finishedTimeBegin") String finishBegin, @QueryParam("finishedTimeEnd") String finishEnd, @QueryParam("applicationTypes") Set<String> applicationTypes) { init(res); validateStates(stateQuery, statesQuery); return super.getApps(req, res, stateQuery, statesQuery, finalStatusQuery, userQuery, queueQuery, count, startedBegin, startedEnd, finishBegin, finishEnd, applicationTypes); }
public ContainerInfo getContainer(HttpServletRequest req, HttpServletResponse res, String appId, String appAttemptId, String containerId) { UserGroupInformation callerUGI = getUser(req); ApplicationId aid = parseApplicationId(appId); ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId); final ContainerId cid = parseContainerId(containerId); validateIds(aid, aaid, cid); ContainerReport container = null; try { rewrapAndThrowException(e);
public AppInfo getApp(HttpServletRequest req, HttpServletResponse res, String appId) { UserGroupInformation callerUGI = getUser(req); final ApplicationId id = parseApplicationId(appId); ApplicationReport app = null; try { if (callerUGI == null) { GetApplicationReportRequest request = GetApplicationReportRequest.newInstance(id); app = appBaseProt.getApplicationReport(request).getApplicationReport(); } else { app = callerUGI.doAs( new PrivilegedExceptionAction<ApplicationReport> () { @Override public ApplicationReport run() throws Exception { GetApplicationReportRequest request = GetApplicationReportRequest.newInstance(id); return appBaseProt.getApplicationReport(request).getApplicationReport(); } }); } } catch (Exception e) { rewrapAndThrowException(e); } if (app == null) { throw new NotFoundException("app with id: " + appId + " not found"); } return new AppInfo(app); }
String startedEnd, String finishBegin, String finishEnd, Set<String> applicationTypes) { UserGroupInformation callerUGI = getUser(req); boolean checkStart = false; boolean checkEnd = false; Set<String> appTypes = parseQueries(applicationTypes, false); if (!appTypes.isEmpty()) { checkAppTypes = true; statesQuery.add(stateQuery); Set<String> appStates = parseQueries(statesQuery, true); if (!appStates.isEmpty()) { checkAppStates = true; rewrapAndThrowException(e);
AppInfo appInfo; try { appInfo = super.getApp(req, res, appId.toString()); } catch (Exception ex) { ContainerInfo containerInfo; try { containerInfo = super.getContainer( req, res, appId.toString(), containerId.getApplicationAttemptId().toString(),
@GET @Path(RMWSConsts.APPS_APPID_APPATTEMPTS_APPATTEMPTID_CONTAINERS) @Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8, MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 }) @Override public ContainersInfo getContainers(@Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam(RMWSConsts.APPID) String appId, @PathParam(RMWSConsts.APPATTEMPTID) String appAttemptId) { initForReadableEndpoints(res); return super.getContainers(req, res, appId, appAttemptId); }
@GET @Path("/apps/{appid}") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override public AppInfo getApp(@Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam("appid") String appId) { init(res); return super.getApp(req, res, appId); }
@GET @Path("/apps/{appid}/appattempts") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override public AppAttemptsInfo getAppAttempts(@Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam("appid") String appId) { init(res); return super.getAppAttempts(req, res, appId); }
@GET @Path("/apps") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override public AppsInfo getApps(@Context HttpServletRequest req, @Context HttpServletResponse res, @QueryParam("state") String stateQuery, @QueryParam("states") Set<String> statesQuery, @QueryParam("finalStatus") String finalStatusQuery, @QueryParam("user") String userQuery, @QueryParam("queue") String queueQuery, @QueryParam("limit") String count, @QueryParam("startedTimeBegin") String startedBegin, @QueryParam("startedTimeEnd") String startedEnd, @QueryParam("finishedTimeBegin") String finishBegin, @QueryParam("finishedTimeEnd") String finishEnd, @QueryParam("applicationTypes") Set<String> applicationTypes) { init(res); validateStates(stateQuery, statesQuery); return super.getApps(req, res, stateQuery, statesQuery, finalStatusQuery, userQuery, queueQuery, count, startedBegin, startedEnd, finishBegin, finishEnd, applicationTypes); }
public ContainerInfo getContainer(HttpServletRequest req, HttpServletResponse res, String appId, String appAttemptId, String containerId) { UserGroupInformation callerUGI = getUser(req); ApplicationId aid = parseApplicationId(appId); ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId); final ContainerId cid = parseContainerId(containerId); validateIds(aid, aaid, cid); ContainerReport container = null; try { rewrapAndThrowException(e);