@GET @Path("/apps/{appid}") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo getApp(@Context HttpServletRequest hsr, @PathParam("appid") String appId) { init(); if (appId == null || appId.isEmpty()) { throw new NotFoundException("appId, " + appId + ", is empty or null"); } ApplicationId id; id = ConverterUtils.toApplicationId(recordFactory, appId); if (id == null) { throw new NotFoundException("appId is null"); } RMApp app = rm.getRMContext().getRMApps().get(id); if (app == null) { throw new NotFoundException("app with id: " + appId + " not found"); } return new AppInfo(rm, app, hasAccess(app, hsr), hsr.getScheme() + "://"); }
@GET @Path(RMWSConsts.APPS_APPID) @Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8, MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 }) @Override public AppInfo getApp(@Context HttpServletRequest hsr, @PathParam(RMWSConsts.APPID) String appId, @QueryParam(RMWSConsts.DESELECTS) Set<String> unselectedFields) { initForReadableEndpoints(); ApplicationId id = WebAppUtils.parseApplicationId(recordFactory, appId); RMApp app = rm.getRMContext().getRMApps().get(id); if (app == null) { throw new NotFoundException("app with id: " + appId + " not found"); } DeSelectFields deSelectFields = new DeSelectFields(); deSelectFields.initFields(unselectedFields); return new AppInfo(rm, app, hasAccess(app, hsr), hsr.getScheme() + "://", deSelectFields); }
@GET @Path("/apps/{appid}") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo getApp(@Context HttpServletRequest hsr, @PathParam("appid") String appId) { init(); if (appId == null || appId.isEmpty()) { throw new NotFoundException("appId, " + appId + ", is empty or null"); } ApplicationId id; id = ConverterUtils.toApplicationId(recordFactory, appId); if (id == null) { throw new NotFoundException("appId is null"); } RMApp app = rm.getRMContext().getRMApps().get(id); if (app == null) { throw new NotFoundException("app with id: " + appId + " not found"); } return new AppInfo(rm, app, hasAccess(app, hsr), hsr.getScheme() + "://"); }
continue; AppInfo appInfo = new AppInfo(rm, app, true, WebAppUtils.getHttpSchemePrefix(conf)); String percent = String.format("%.1f", appInfo.getProgress()); ApplicationAttemptId attemptId = app.getCurrentAppAttempt().getAppAttemptId();
continue; AppInfo appInfo = new AppInfo(rm, app, true, WebAppUtils.getHttpSchemePrefix(conf)); String percent = String.format("%.1f", appInfo.getProgress()); ApplicationAttemptId attemptId = app.getCurrentAppAttempt().getAppAttemptId();
continue; AppInfo appInfo = new AppInfo(rm, app, true, WebAppUtils.getHttpSchemePrefix(conf)); String percent = StringUtils.format("%.1f", appInfo.getProgress()); ApplicationAttemptId attemptId = app.getCurrentAppAttempt().getAppAttemptId();
AppInfo app = new AppInfo(rm, rmapp, hasAccess(rmapp, hsr), WebAppUtils.getHttpSchemePrefix(conf)); allApps.add(app);
private void createResourceRequestsTable(Block html) { AppInfo app = new AppInfo(rm, rm.getRMContext().getRMApps() .get(this.appAttemptId.getApplicationId()), true, WebAppUtils.getHttpSchemePrefix(conf));
AppInfo app = new AppInfo(rm, rmapp, hasAccess(rmapp, hsr), WebAppUtils.getHttpSchemePrefix(conf)); allApps.add(app);
AppInfo app = new AppInfo(rm, rmapp, allowAccess, WebAppUtils.getHttpSchemePrefix(conf), deSelectFields); allApps.add(app);
private static AppInfo mergeUAMWithUAM(AppInfo uam1, AppInfo uam2) { AppInfo partialReport = new AppInfo(); partialReport.setAppId(uam1.getAppId()); partialReport.setName(PARTIAL_REPORT + uam1.getAppId()); // We pick the status of the first uam partialReport.setState(uam1.getState()); // Merge the newly partial AM with UAM1 and then with UAM2 mergeAMWithUAM(partialReport, uam1); mergeAMWithUAM(partialReport, uam2); return partialReport; }
private void createResourceRequestsTable(Block html) { AppInfo app = new AppInfo(rm, rm.getRMContext().getRMApps() .get(this.appAttemptId.getApplicationId()), true, WebAppUtils.getHttpSchemePrefix(conf));
private void createResourceRequestsTable(Block html) { AppInfo app = new AppInfo(rm, rm.getRMContext().getRMApps() .get(this.appAttemptId.getApplicationId()), true, WebAppUtils.getHttpSchemePrefix(conf));