AppInfo app = new AppInfo(appReport); String percent = String.format("%.1f", app.getProgress()); appsTableData .append("[\"<a href='") .append(url("app", app.getAppId())) .append("'>") .append(app.getAppId()) .append("</a>\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getUser()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getName()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getType()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getQueue()))).append("\",\"").append(app.getStartedTime()) .append("\",\"").append(app.getFinishedTime()) .append("\",\"") .append(app.getAppState() == null ? UNAVAILABLE : app.getAppState()) .append("\",\"") .append(app.getFinalAppStatus()) .append("\",\"")
AppInfo app = new AppInfo(appReport); ApplicationAttemptId appAttemptId = ApplicationAttemptId.fromString( app.getCurrentAppAttemptId()); String queuePercent = "N/A"; String clusterPercent = "N/A"; String percent = StringUtils.format("%.1f", app.getProgress()); appsTableData .append("[\"<a href='") .append(url("app", app.getAppId())) .append("'>") .append(app.getAppId()) .append("</a>\",\"") .append( StringEscapeUtils.escapeEcmaScript( StringEscapeUtils.escapeHtml4(app.getUser()))) .append("\",\"") .append( StringEscapeUtils.escapeEcmaScript( StringEscapeUtils.escapeHtml4(app.getName()))) .append("\",\"") .append( StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(app .getType()))) .append("\",\"") .append( StringEscapeUtils.escapeEcmaScript(StringEscapeUtils.escapeHtml4(app .getQueue()))).append("\",\"").append(String .valueOf(app.getPriority()))
AppInfo app = new AppInfo(appReport); "/cluster/scheduler?openQueues=" + app.getQueue(); ._("User:", schedulerPath, app.getUser()) ._("Name:", app.getName()) ._("Application Type:", app.getType()) ._("Application Tags:", app.getApplicationTags() == null ? "" : app.getApplicationTags()) ._("Application Priority:", clarifyAppPriority(app.getPriority())) ._( "YarnApplicationState:", app.getAppState() == null ? UNAVAILABLE : clarifyAppState(app .getAppState())) ._("Queue:", schedulerPath, app.getQueue()) ._("FinalStatus Reported by AM:", clairfyAppFinalStatus(app.getFinalAppStatus())) ._("Started:", Times.format(app.getStartedTime())) ._( "Elapsed:", StringUtils.formatTime(Times.elapsed(app.getStartedTime(), app.getFinishedTime()))) ._( "Tracking URL:", app.getTrackingUrl() == null || app.getTrackingUrl().equals(UNAVAILABLE) ? null : root_url(app .getTrackingUrl()), app.getTrackingUrl() == null || app.getTrackingUrl().equals(UNAVAILABLE) ? "Unassigned" : app
AppInfo app = new AppInfo(appReport); "/cluster/scheduler?openQueues=" + app.getQueue(); ._("User:", schedulerPath, app.getUser()) ._("Name:", app.getName()) ._("Application Type:", app.getType()) ._("Application Tags:", app.getApplicationTags() == null ? "" : app.getApplicationTags()) ._( "YarnApplicationState:", app.getAppState() == null ? UNAVAILABLE : clarifyAppState(app .getAppState())) ._("Queue:", schedulerPath, app.getQueue()) ._("FinalStatus Reported by AM:", clairfyAppFinalStatus(app.getFinalAppStatus())) ._("Started:", Times.format(app.getStartedTime())) ._( "Elapsed:", StringUtils.formatTime(Times.elapsed(app.getStartedTime(), app.getFinishedTime()))) ._( "Tracking URL:", app.getTrackingUrl() == null || app.getTrackingUrl().equals(UNAVAILABLE) ? null : root_url(app .getTrackingUrl()), app.getTrackingUrl() == null || app.getTrackingUrl().equals(UNAVAILABLE) ? "Unassigned" : app .getAppState() == YarnApplicationState.FINISHED
filename, format, length, false); String appOwner = appInfo.getUser(); if (LogWebServiceUtils.isFinishedState(appInfo.getAppState())) { if (LogWebServiceUtils.isRunningState(appInfo.getAppState())) { String nodeHttpAddress = null; if (nmId != null && !nmId.isEmpty()) {
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); }
AppInfo app = new AppInfo(appReport); "/cluster/scheduler?openQueues=" + app.getQueue(); ._("User:", schedulerPath, app.getUser()) ._("Name:", app.getName()) ._("Application Type:", app.getType()) ._("Application Tags:", app.getApplicationTags() == null ? "" : app.getApplicationTags()) ._( "YarnApplicationState:", app.getAppState() == null ? UNAVAILABLE : clarifyAppState(app .getAppState())) ._("Queue:", schedulerPath, app.getQueue()) ._("FinalStatus Reported by AM:", clairfyAppFinalStatus(app.getFinalAppStatus())) ._("Started:", Times.format(app.getStartedTime())) ._( "Elapsed:", StringUtils.formatTime(Times.elapsed(app.getStartedTime(), app.getFinishedTime()))) ._( "Tracking URL:", app.getTrackingUrl() == null || app.getTrackingUrl().equals(UNAVAILABLE) ? null : root_url(app .getTrackingUrl()), app.getTrackingUrl() == null || app.getTrackingUrl().equals(UNAVAILABLE) ? "Unassigned" : app .getAppState() == YarnApplicationState.FINISHED
if (LogWebServiceUtils.isFinishedState(appInfo.getAppState())) { return LogWebServiceUtils .getContainerLogMeta(factory, appId, null, null, containerIdStr, false); if (LogWebServiceUtils.isRunningState(appInfo.getAppState())) { String appOwner = appInfo.getUser(); String nodeHttpAddress = null; if (nmId != null && !nmId.isEmpty()) {
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); }
AppInfo app = new AppInfo(appReport); String percent = String.format("%.1f", app.getProgress()); appsTableData .append("[\"<a href='") .append(url("app", app.getAppId())) .append("'>") .append(app.getAppId()) .append("</a>\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getUser()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getName()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getType()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getQueue()))).append("\",\"").append(app.getStartedTime()) .append("\",\"").append(app.getFinishedTime()) .append("\",\"") .append(app.getAppState() == null ? UNAVAILABLE : app.getAppState()) .append("\",\"") .append(app.getFinalAppStatus()) .append("\",\"")
continue; AppInfo app = new AppInfo(appReport);
AppInfo app = new AppInfo(appReport); String percent = StringUtils.format("%.1f", app.getProgress()); appsTableData .append("[\"<a href='") .append(url("app", app.getAppId())) .append("'>") .append(app.getAppId()) .append("</a>\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getUser()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getName()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getType()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getQueue()))).append("\",\"").append(String .valueOf(app.getPriority())) .append("\",\"").append(app.getStartedTime()) .append("\",\"").append(app.getFinishedTime()) .append("\",\"") .append(app.getAppState() == null ? UNAVAILABLE : app.getAppState()) .append("\",\"")
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); }
AppInfo app = new AppInfo(appReport); String blacklistedNodesCount = "N/A"; Set<String> nodes = RMAppAttemptBlock .getBlacklistedNodes(rm, ConverterUtils.toApplicationAttemptId(app .getCurrentAppAttemptId())); if (nodes != null) { blacklistedNodesCount = String.valueOf(nodes.size()); String percent = String.format("%.1f", app.getProgress()); .append(url("app", app.getAppId())) .append("'>") .append(app.getAppId()) .append("</a>\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getUser()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getName()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getType()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app
continue; AppInfo app = new AppInfo(appReport);
AppInfo app = new AppInfo(appReport); String blacklistedNodesCount = "N/A"; Set<String> nodes = RMAppAttemptBlock .getBlacklistedNodes(rm, ConverterUtils.toApplicationAttemptId(app .getCurrentAppAttemptId())); if (nodes != null) { blacklistedNodesCount = String.valueOf(nodes.size()); String percent = String.format("%.1f", app.getProgress()); .append(url("app", app.getAppId())) .append("'>") .append(app.getAppId()) .append("</a>\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getUser()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getName()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app .getType()))) .append("\",\"") .append( StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(app
continue; AppInfo app = new AppInfo(appReport);