当前位置: 首页>>代码示例>>Java>>正文


Java AppInfo.getTrackingUrlPretty方法代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo.getTrackingUrlPretty方法的典型用法代码示例。如果您正苦于以下问题:Java AppInfo.getTrackingUrlPretty方法的具体用法?Java AppInfo.getTrackingUrlPretty怎么用?Java AppInfo.getTrackingUrlPretty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo的用法示例。


在下文中一共展示了AppInfo.getTrackingUrlPretty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: render

import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo; //导入方法依赖的package包/类
@Override public void render(Block html) {
  TBODY<TABLE<Hamlet>> tbody = html.
    table("#apps").
      thead().
        tr().
          th(".id", "ID").
          th(".user", "User").
          th(".name", "Name").
          th(".type", "Application Type").
          th(".queue", "Queue").
          th(".fairshare", "Fair Share").
          th(".starttime", "StartTime").
          th(".finishtime", "FinishTime").
          th(".state", "State").
          th(".finalstatus", "FinalStatus").
          th(".progress", "Progress").
          th(".ui", "Tracking UI")._()._().
      tbody();
  Collection<YarnApplicationState> reqAppStates = null;
  String reqStateString = $(APP_STATE);
  if (reqStateString != null && !reqStateString.isEmpty()) {
    String[] appStateStrings = reqStateString.split(",");
    reqAppStates = new HashSet<YarnApplicationState>(appStateStrings.length);
    for(String stateString : appStateStrings) {
      reqAppStates.add(YarnApplicationState.valueOf(stateString));
    }
  }
  StringBuilder appsTableData = new StringBuilder("[\n");
  for (RMApp app : apps.values()) {
    if (reqAppStates != null && !reqAppStates.contains(app.createApplicationState())) {
      continue;
    }
    AppInfo appInfo = new AppInfo(rm, app, true, WebAppUtils.getHttpSchemePrefix(conf));
    String percent = String.format("%.1f", appInfo.getProgress());
    ApplicationAttemptId attemptId = app.getCurrentAppAttempt().getAppAttemptId();
    int fairShare = fsinfo.getAppFairShare(attemptId);
    if (fairShare == FairSchedulerInfo.INVALID_FAIR_SHARE) {
      // FairScheduler#applications don't have the entry. Skip it.
      continue;
    }
    appsTableData.append("[\"<a href='")
    .append(url("app", appInfo.getAppId())).append("'>")
    .append(appInfo.getAppId()).append("</a>\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getUser()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getName()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getApplicationType()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getQueue()))).append("\",\"")
    .append(fairShare).append("\",\"")
    .append(appInfo.getStartTime()).append("\",\"")
    .append(appInfo.getFinishTime()).append("\",\"")
    .append(appInfo.getState()).append("\",\"")
    .append(appInfo.getFinalStatus()).append("\",\"")
    // Progress bar
    .append("<br title='").append(percent)
    .append("'> <div class='").append(C_PROGRESSBAR).append("' title='")
    .append(join(percent, '%')).append("'> ").append("<div class='")
    .append(C_PROGRESSBAR_VALUE).append("' style='")
    .append(join("width:", percent, '%')).append("'> </div> </div>")
    .append("\",\"<a href='");

    String trackingURL =
      !appInfo.isTrackingUrlReady()? "#" : appInfo.getTrackingUrlPretty();
    
    appsTableData.append(trackingURL).append("'>")
    .append(appInfo.getTrackingUI()).append("</a>\"],\n");

  }
  if(appsTableData.charAt(appsTableData.length() - 2) == ',') {
    appsTableData.delete(appsTableData.length()-2, appsTableData.length()-1);
  }
  appsTableData.append("]");
  html.script().$type("text/javascript").
  _("var appsTableData=" + appsTableData)._();

  tbody._()._();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:81,代码来源:FairSchedulerAppsBlock.java

示例2: render

import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo; //导入方法依赖的package包/类
@Override public void render(Block html) {
  TBODY<TABLE<Hamlet>> tbody = html.
    table("#apps").
      thead().
        tr().
          th(".id", "ID").
          th(".user", "User").
          th(".name", "Name").
          th(".queue", "Queue").
          th(".fairshare", "Fair Share").
          th(".starttime", "StartTime").
          th(".finishtime", "FinishTime").
          th(".state", "State").
          th(".finalstatus", "FinalStatus").
          th(".progress", "Progress").
          th(".ui", "Tracking UI")._()._().
      tbody();
  Collection<RMAppState> reqAppStates = null;
  String reqStateString = $(APP_STATE);
  if (reqStateString != null && !reqStateString.isEmpty()) {
    String[] appStateStrings = reqStateString.split(",");
    reqAppStates = new HashSet<RMAppState>(appStateStrings.length);
    for(String stateString : appStateStrings) {
      reqAppStates.add(RMAppState.valueOf(stateString));
    }
  }
  StringBuilder appsTableData = new StringBuilder("[\n");
  for (RMApp app : apps.values()) {
    if (reqAppStates != null && !reqAppStates.contains(app.getState())) {
      continue;
    }
    AppInfo appInfo = new AppInfo(app, true);
    String percent = String.format("%.1f", appInfo.getProgress());
    ApplicationAttemptId attemptId = app.getCurrentAppAttempt().getAppAttemptId();
    int fairShare = fsinfo.getAppFairShare(attemptId);
    //AppID numerical value parsed by parseHadoopID in yarn.dt.plugins.js
    appsTableData.append("[\"<a href='")
    .append(url("app", appInfo.getAppId())).append("'>")
    .append(appInfo.getAppId()).append("</a>\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getUser()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getName()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getQueue()))).append("\",\"")
    .append(fairShare).append("\",\"")
    .append(appInfo.getStartTime()).append("\",\"")
    .append(appInfo.getFinishTime()).append("\",\"")
    .append(appInfo.getState()).append("\",\"")
    .append(appInfo.getFinalStatus()).append("\",\"")
    // Progress bar
    .append("<br title='").append(percent)
    .append("'> <div class='").append(C_PROGRESSBAR).append("' title='")
    .append(join(percent, '%')).append("'> ").append("<div class='")
    .append(C_PROGRESSBAR_VALUE).append("' style='")
    .append(join("width:", percent, '%')).append("'> </div> </div>")
    .append("\",\"<a href='");

    String trackingURL =
      !appInfo.isTrackingUrlReady()? "#" : appInfo.getTrackingUrlPretty();
    
    appsTableData.append(trackingURL).append("'>")
    .append(appInfo.getTrackingUI()).append("</a>\"],\n");

  }
  if(appsTableData.charAt(appsTableData.length() - 2) == ',') {
    appsTableData.delete(appsTableData.length()-2, appsTableData.length()-1);
  }
  appsTableData.append("]");
  html.script().$type("text/javascript").
  _("var appsTableData=" + appsTableData)._();

  tbody._()._();
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:75,代码来源:FairSchedulerAppsBlock.java

示例3: render

import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo; //导入方法依赖的package包/类
@Override public void render(Block html) {
  TBODY<TABLE<Hamlet>> tbody = html.
    table("#apps").
      thead().
        tr().
          th(".id", "ID").
          th(".user", "User").
          th(".name", "Name").
          th(".type", "Application Type").
          th(".queue", "Queue").
          th(".starttime", "StartTime").
          th(".finishtime", "FinishTime").
          th(".state", "State").
          th(".finalstatus", "FinalStatus").
          th(".progress", "Progress").
          th(".ui", "Tracking UI")._()._().
      tbody();
  Collection<RMAppState> reqAppStates = null;
  String reqStateString = $(APP_STATE);
  if (reqStateString != null && !reqStateString.isEmpty()) {
    String[] appStateStrings = reqStateString.split(",");
    reqAppStates = new HashSet<RMAppState>(appStateStrings.length);
    for(String stateString : appStateStrings) {
      reqAppStates.add(RMAppState.valueOf(stateString));
    }
  }
  StringBuilder appsTableData = new StringBuilder("[\n");
  for (RMApp app : apps.values()) {
    if (reqAppStates != null && !reqAppStates.contains(app.getState())) {
      continue;
    }
    AppInfo appInfo = new AppInfo(app, true);
    String percent = String.format("%.1f", appInfo.getProgress());
    //AppID numerical value parsed by parseHadoopID in yarn.dt.plugins.js
    appsTableData.append("[\"<a href='")
    .append(url("app", appInfo.getAppId())).append("'>")
    .append(appInfo.getAppId()).append("</a>\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getUser()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getName()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getApplicationType()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getQueue()))).append("\",\"")
    .append(appInfo.getStartTime()).append("\",\"")
    .append(appInfo.getFinishTime()).append("\",\"")
    .append(appInfo.getState()).append("\",\"")
    .append(appInfo.getFinalStatus()).append("\",\"")
    // Progress bar
    .append("<br title='").append(percent)
    .append("'> <div class='").append(C_PROGRESSBAR).append("' title='")
    .append(join(percent, '%')).append("'> ").append("<div class='")
    .append(C_PROGRESSBAR_VALUE).append("' style='")
    .append(join("width:", percent, '%')).append("'> </div> </div>")
    .append("\",\"<a href='");

    String trackingURL =
      !appInfo.isTrackingUrlReady()? "#" : appInfo.getTrackingUrlPretty();
    
    appsTableData.append(trackingURL).append("'>")
    .append(appInfo.getTrackingUI()).append("</a>\"],\n");

  }
  if(appsTableData.charAt(appsTableData.length() - 2) == ',') {
    appsTableData.delete(appsTableData.length()-2, appsTableData.length()-1);
  }
  appsTableData.append("]");
  html.script().$type("text/javascript").
  _("var appsTableData=" + appsTableData)._();

  tbody._()._();
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:74,代码来源:AppsBlock.java

示例4: render

import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo; //导入方法依赖的package包/类
@Override public void render(Block html) {
  TBODY<TABLE<Hamlet>> tbody = html.
    table("#apps").
      thead().
        tr().
          th(".id", "ID").
          th(".user", "User").
          th(".name", "Name").
          th(".queue", "Queue").
          th(".fairshare", "Fair Share").
          th(".starttime", "StartTime").
          th(".finishtime", "FinishTime").
          th(".state", "State").
          th(".finalstatus", "FinalStatus").
          th(".progress", "Progress").
          th(".ui", "Tracking UI")._()._().
      tbody();
  Collection<YarnApplicationState> reqAppStates = null;
  String reqStateString = $(APP_STATE);
  if (reqStateString != null && !reqStateString.isEmpty()) {
    String[] appStateStrings = reqStateString.split(",");
    reqAppStates = new HashSet<YarnApplicationState>(appStateStrings.length);
    for(String stateString : appStateStrings) {
      reqAppStates.add(YarnApplicationState.valueOf(stateString));
    }
  }
  StringBuilder appsTableData = new StringBuilder("[\n");
  for (RMApp app : apps.values()) {
    if (reqAppStates != null && !reqAppStates.contains(app.getState())) {
      continue;
    }
    AppInfo appInfo = new AppInfo(app, true, WebAppUtils.getHttpSchemePrefix(conf));
    String percent = String.format("%.1f", appInfo.getProgress());
    ApplicationAttemptId attemptId = app.getCurrentAppAttempt().getAppAttemptId();
    int fairShare = fsinfo.getAppFairShare(attemptId);
    //AppID numerical value parsed by parseHadoopID in yarn.dt.plugins.js
    appsTableData.append("[\"<a href='")
    .append(url("app", appInfo.getAppId())).append("'>")
    .append(appInfo.getAppId()).append("</a>\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getUser()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getName()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getQueue()))).append("\",\"")
    .append(fairShare).append("\",\"")
    .append(appInfo.getStartTime()).append("\",\"")
    .append(appInfo.getFinishTime()).append("\",\"")
    .append(appInfo.getState()).append("\",\"")
    .append(appInfo.getFinalStatus()).append("\",\"")
    // Progress bar
    .append("<br title='").append(percent)
    .append("'> <div class='").append(C_PROGRESSBAR).append("' title='")
    .append(join(percent, '%')).append("'> ").append("<div class='")
    .append(C_PROGRESSBAR_VALUE).append("' style='")
    .append(join("width:", percent, '%')).append("'> </div> </div>")
    .append("\",\"<a href='");

    String trackingURL =
      !appInfo.isTrackingUrlReady()? "#" : appInfo.getTrackingUrlPretty();
    
    appsTableData.append(trackingURL).append("'>")
    .append(appInfo.getTrackingUI()).append("</a>\"],\n");

  }
  if(appsTableData.charAt(appsTableData.length() - 2) == ',') {
    appsTableData.delete(appsTableData.length()-2, appsTableData.length()-1);
  }
  appsTableData.append("]");
  html.script().$type("text/javascript").
  _("var appsTableData=" + appsTableData)._();

  tbody._()._();
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:75,代码来源:FairSchedulerAppsBlock.java

示例5: render

import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo; //导入方法依赖的package包/类
@Override public void render(Block html) {
  TBODY<TABLE<Hamlet>> tbody = html.
    table("#apps").
      thead().
        tr().
          th(".id", "ID").
          th(".user", "User").
          th(".name", "Name").
          th(".type", "Application Type").
          th(".queue", "Queue").
          th(".starttime", "StartTime").
          th(".finishtime", "FinishTime").
          th(".state", "State").
          th(".finalstatus", "FinalStatus").
          th(".progress", "Progress").
          th(".ui", "Tracking UI")._()._().
      tbody();
  Collection<YarnApplicationState> reqAppStates = null;
  String reqStateString = $(APP_STATE);
  if (reqStateString != null && !reqStateString.isEmpty()) {
    String[] appStateStrings = reqStateString.split(",");
    reqAppStates = new HashSet<YarnApplicationState>(appStateStrings.length);
    for(String stateString : appStateStrings) {
      reqAppStates.add(YarnApplicationState.valueOf(stateString));
    }
  }
  StringBuilder appsTableData = new StringBuilder("[\n");
  for (RMApp app : apps.values()) {
    if (reqAppStates != null && !reqAppStates.contains(app.createApplicationState())) {
      continue;
    }
    AppInfo appInfo = new AppInfo(app, true, WebAppUtils.getHttpSchemePrefix(conf));
    String percent = String.format("%.1f", appInfo.getProgress());
    //AppID numerical value parsed by parseHadoopID in yarn.dt.plugins.js
    appsTableData.append("[\"<a href='")
    .append(url("app", appInfo.getAppId())).append("'>")
    .append(appInfo.getAppId()).append("</a>\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getUser()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getName()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getApplicationType()))).append("\",\"")
    .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
      appInfo.getQueue()))).append("\",\"")
    .append(appInfo.getStartTime()).append("\",\"")
    .append(appInfo.getFinishTime()).append("\",\"")
    .append(appInfo.getState()).append("\",\"")
    .append(appInfo.getFinalStatus()).append("\",\"")
    // Progress bar
    .append("<br title='").append(percent)
    .append("'> <div class='").append(C_PROGRESSBAR).append("' title='")
    .append(join(percent, '%')).append("'> ").append("<div class='")
    .append(C_PROGRESSBAR_VALUE).append("' style='")
    .append(join("width:", percent, '%')).append("'> </div> </div>")
    .append("\",\"<a href='");

    String trackingURL =
      !appInfo.isTrackingUrlReady()? "#" : appInfo.getTrackingUrlPretty();
    
    appsTableData.append(trackingURL).append("'>")
    .append(appInfo.getTrackingUI()).append("</a>\"],\n");

  }
  if(appsTableData.charAt(appsTableData.length() - 2) == ',') {
    appsTableData.delete(appsTableData.length()-2, appsTableData.length()-1);
  }
  appsTableData.append("]");
  html.script().$type("text/javascript").
  _("var appsTableData=" + appsTableData)._();

  tbody._()._();
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:74,代码来源:AppsBlock.java


注:本文中的org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo.getTrackingUrlPretty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。