Package org.apache.hadoop.yarn.webapp

Examples of org.apache.hadoop.yarn.webapp.ResponseInfo$Item


        p()._("Sorry, ", jid, " not found.")._();
      return;
    }
    List<AMInfo> amInfos = j.getAMInfos();
    JobInfo job = new JobInfo(j);
    ResponseInfo infoBlock = info("Job Overview").
        _("Job Name:", job.getName()).
        _("User Name:", job.getUserName()).
        _("Queue:", job.getQueueName()).
        _("State:", job.getState()).
        _("Uberized:", job.isUber()).
        _("Started:", new Date(job.getStartTime())).
        _("Finished:", new Date(job.getFinishTime())).
        _("Elapsed:", StringUtils.formatTime(
            Times.elapsed(job.getStartTime(), job.getFinishTime(), false)));
   
    String amString =
        amInfos.size() == 1 ? "ApplicationMaster" : "ApplicationMasters";
   
    // todo - switch to use JobInfo
    List<String> diagnostics = j.getDiagnostics();
    if(diagnostics != null && !diagnostics.isEmpty()) {
      StringBuffer b = new StringBuffer();
      for(String diag: diagnostics) {
        b.append(diag);
      }
      infoBlock._("Diagnostics:", b.toString());
    }

    if(job.getNumMaps() > 0) {
      infoBlock._("Average Map Time", StringUtils.formatTime(job.getAvgMapTime()));
    }
    if(job.getNumReduces() > 0) {
      infoBlock._("Average Reduce Time", StringUtils.formatTime(job.getAvgReduceTime()));
      infoBlock._("Average Shuffle Time", StringUtils.formatTime(job.getAvgShuffleTime()));
      infoBlock._("Average Merge Time", StringUtils.formatTime(job.getAvgMergeTime()));
    }

    for (ConfEntryInfo entry : job.getAcls()) {
      infoBlock._("ACL "+entry.getName()+":", entry.getValue());
    }
    DIV<Hamlet> div = html.
      _(InfoBlock.class).
      div(_INFO_WRAP);
   
View Full Code Here


      qinfo = (FairSchedulerLeafQueueInfo)info.qinfo;
    }

    @Override
    protected void render(Block html) {
      ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status").
          _("Used Resources:", qinfo.getUsedResources().toString()).
          _("Num Active Applications:", qinfo.getNumActiveApplications()).
          _("Num Pending Applications:", qinfo.getNumPendingApplications()).
          _("Min Resources:", qinfo.getMinResources().toString()).
          _("Max Resources:", qinfo.getMaxResources().toString());
      int maxApps = qinfo.getMaxApplications();
      if (maxApps < Integer.MAX_VALUE) {
          ri._("Max Running Applications:", qinfo.getMaxApplications());
      }
      ri._("Fair Share:", qinfo.getFairShare().toString());

      html._(InfoBlock.class);

      // clear the info contents so this queue's info doesn't accumulate into another queue's info
      ri.clear();
    }
View Full Code Here

          .append(", Schedulable Apps: " + entry.getNumActiveApplications())
          .append(", Non-Schedulable Apps: " + entry.getNumPendingApplications())
          .append("&gt;<br style='display:block'>"); //Force line break
      }

      ResponseInfo ri = info("\'" + lqinfo.getQueuePath().substring(5) + "\' Queue Status").
          _("Queue State:", lqinfo.getQueueState()).
          _("Used Capacity:", percent(lqinfo.getUsedCapacity() / 100)).
          _("Absolute Used Capacity:", percent(lqinfo.getAbsoluteUsedCapacity() / 100)).
          _("Absolute Capacity:", percent(lqinfo.getAbsoluteCapacity() / 100)).
          _("Absolute Max Capacity:", percent(lqinfo.getAbsoluteMaxCapacity() / 100)).
          _("Used Resources:", lqinfo.getResourcesUsed().toString()).
          _("Num Schedulable Applications:", Integer.toString(lqinfo.getNumActiveApplications())).
          _("Num Non-Schedulable Applications:", Integer.toString(lqinfo.getNumPendingApplications())).
          _("Num Containers:", Integer.toString(lqinfo.getNumContainers())).
          _("Max Applications:", Integer.toString(lqinfo.getMaxApplications())).
          _("Max Applications Per User:", Integer.toString(lqinfo.getMaxApplicationsPerUser())).
          _("Max Schedulable Applications:", Integer.toString(lqinfo.getMaxActiveApplications())).
          _("Max Schedulable Applications Per User:", Integer.toString(lqinfo.getMaxActiveApplicationsPerUser())).
          _("Configured Capacity:", percent(lqinfo.getCapacity() / 100)).
          _("Configured Max Capacity:", percent(lqinfo.getMaxCapacity() / 100)).
          _("Configured Minimum User Limit Percent:", Integer.toString(lqinfo.getUserLimit()) + "%").
          _("Configured User Limit Factor:", String.format("%.1f", lqinfo.getUserLimitFactor())).
          _r("Active users: ", activeUserList.toString());

      html._(InfoBlock.class);

      // clear the info contents so this queue's info doesn't accumulate into another queue's info
      ri.clear();
    }
View Full Code Here

          .append(", Active Apps: " + entry.getNumActiveApplications())
          .append(", Pending Apps: " + entry.getNumPendingApplications())
          .append("&gt;<br style='display:block'>"); //Force line break
      }

      ResponseInfo ri = info("\'" + lqinfo.getQueuePath().substring(5) + "\' Queue Status").
          _("Queue State:", lqinfo.getQueueState()).
          _("Used Capacity:", percent(lqinfo.getUsedCapacity() / 100)).
          _("Absolute Capacity:", percent(lqinfo.getAbsoluteCapacity() / 100)).
          _("Absolute Max Capacity:", percent(lqinfo.getAbsoluteMaxCapacity() / 100)).
          _("Used Resources:", lqinfo.getUsedResources().toString()).
          _("Num Active Applications:", Integer.toString(lqinfo.getNumActiveApplications())).
          _("Num Pending Applications:", Integer.toString(lqinfo.getNumPendingApplications())).
          _("Num Containers:", Integer.toString(lqinfo.getNumContainers())).
          _("Max Applications:", Integer.toString(lqinfo.getMaxApplications())).
          _("Max Applications Per User:", Integer.toString(lqinfo.getMaxApplicationsPerUser())).
          _("Max Active Applications:", Integer.toString(lqinfo.getMaxActiveApplications())).
          _("Max Active Applications Per User:", Integer.toString(lqinfo.getMaxActiveApplicationsPerUser())).
          _("Configured Capacity:", percent(lqinfo.getCapacity() / 100)).
          _("Configured Max Capacity:", percent(lqinfo.getMaxCapacity() / 100)).
          _("Configured Minimum User Limit Percent:", Integer.toString(lqinfo.getUserLimit()) + "%").
          _("Configured User Limit Factor:", String.format("%.1f", lqinfo.getUserLimitFactor())).
          _r("Active users: ", activeUserList.toString());

      html._(InfoBlock.class);

      // clear the info contents so this queue's info doesn't accumulate into another queue's info
      ri.clear();
    }
View Full Code Here

      qinfo = (FairSchedulerLeafQueueInfo)info.qinfo;
    }

    @Override
    protected void render(Block html) {
      ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status").
          _("Used Resources:", qinfo.getUsedResources().toString()).
          _("Num Active Applications:", qinfo.getNumActiveApplications()).
          _("Num Pending Applications:", qinfo.getNumPendingApplications()).
          _("Min Resources:", qinfo.getMinResources().toString()).
          _("Max Resources:", qinfo.getMaxResources().toString());
      int maxApps = qinfo.getMaxApplications();
      if (maxApps < Integer.MAX_VALUE) {
          ri._("Max Running Applications:", qinfo.getMaxApplications());
      }
      ri._("Fair Share:", qinfo.getFairShare());

      html._(InfoBlock.class);

      // clear the info contents so this queue's info doesn't accumulate into another queue's info
      ri.clear();
    }
View Full Code Here

        p()._("Sorry, ", jid, " not found.")._();
      return;
    }
    List<AMInfo> amInfos = j.getAMInfos();
    JobInfo job = new JobInfo(j);
    ResponseInfo infoBlock = info("Job Overview").
        _("Job Name:", job.getName()).
        _("User Name:", job.getUserName()).
        _("Queue:", job.getQueueName()).
        _("State:", job.getState()).
        _("Uberized:", job.isUber()).
        _("Started:", new Date(job.getStartTime())).
        _("Finished:", new Date(job.getFinishTime())).
        _("Elapsed:", StringUtils.formatTime(
            Times.elapsed(job.getStartTime(), job.getFinishTime(), false)));
   
    String amString =
        amInfos.size() == 1 ? "ApplicationMaster" : "ApplicationMasters";
   
    // todo - switch to use JobInfo
    List<String> diagnostics = j.getDiagnostics();
    if(diagnostics != null && !diagnostics.isEmpty()) {
      StringBuffer b = new StringBuffer();
      for(String diag: diagnostics) {
        b.append(diag);
      }
      infoBlock._("Diagnostics:", b.toString());
    }

    if(job.getNumMaps() > 0) {
      infoBlock._("Average Map Time", StringUtils.formatTime(job.getAvgMapTime()));
    }
    if(job.getNumReduces() > 0) {
      infoBlock._("Average Reduce Time", StringUtils.formatTime(job.getAvgReduceTime()));
      infoBlock._("Average Shuffle Time", StringUtils.formatTime(job.getAvgShuffleTime()));
      infoBlock._("Average Merge Time", StringUtils.formatTime(job.getAvgMergeTime()));
    }

    for (ConfEntryInfo entry : job.getAcls()) {
      infoBlock._("ACL "+entry.getName()+":", entry.getValue());
    }
    DIV<Hamlet> div = html.
      _(InfoBlock.class).
      div(_INFO_WRAP);
   
View Full Code Here

          .append(", Schedulable Apps: " + entry.getNumActiveApplications())
          .append(", Non-Schedulable Apps: " + entry.getNumPendingApplications())
          .append("&gt;<br style='display:block'>"); //Force line break
      }

      ResponseInfo ri = info("\'" + lqinfo.getQueuePath().substring(5) + "\' Queue Status").
          _("Queue State:", lqinfo.getQueueState()).
          _("Used Capacity:", percent(lqinfo.getUsedCapacity() / 100)).
          _("Absolute Used Capacity:", percent(lqinfo.getAbsoluteUsedCapacity() / 100)).
          _("Absolute Capacity:", percent(lqinfo.getAbsoluteCapacity() / 100)).
          _("Absolute Max Capacity:", percent(lqinfo.getAbsoluteMaxCapacity() / 100)).
          _("Used Resources:", StringEscapeUtils.escapeHtml(lqinfo.getResourcesUsed().toString())).
          _("Num Schedulable Applications:", Integer.toString(lqinfo.getNumActiveApplications())).
          _("Num Non-Schedulable Applications:", Integer.toString(lqinfo.getNumPendingApplications())).
          _("Num Containers:", Integer.toString(lqinfo.getNumContainers())).
          _("Max Applications:", Integer.toString(lqinfo.getMaxApplications())).
          _("Max Applications Per User:", Integer.toString(lqinfo.getMaxApplicationsPerUser())).
          _("Max Schedulable Applications:", Integer.toString(lqinfo.getMaxActiveApplications())).
          _("Max Schedulable Applications Per User:", Integer.toString(lqinfo.getMaxActiveApplicationsPerUser())).
          _("Configured Capacity:", percent(lqinfo.getCapacity() / 100)).
          _("Configured Max Capacity:", percent(lqinfo.getMaxCapacity() / 100)).
          _("Configured Minimum User Limit Percent:", Integer.toString(lqinfo.getUserLimit()) + "%").
          _("Configured User Limit Factor:", String.format("%.1f", lqinfo.getUserLimitFactor())).
          _r("Active users: ", activeUserList.toString());

      html._(InfoBlock.class);

      // clear the info contents so this queue's info doesn't accumulate into another queue's info
      ri.clear();
    }
View Full Code Here

      qinfo = (FairSchedulerLeafQueueInfo)info.qinfo;
    }

    @Override
    protected void render(Block html) {
      ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status").
          _("Used Resources:", StringEscapeUtils.escapeHtml(
              qinfo.getUsedResources().toString())).
          _("Num Active Applications:", qinfo.getNumActiveApplications()).
          _("Num Pending Applications:", qinfo.getNumPendingApplications()).
          _("Min Resources:", StringEscapeUtils.escapeHtml(
              qinfo.getMinResources().toString())).
          _("Max Resources:", StringEscapeUtils.escapeHtml(
              qinfo.getMaxResources().toString()));
      int maxApps = qinfo.getMaxApplications();
      if (maxApps < Integer.MAX_VALUE) {
          ri._("Max Running Applications:", qinfo.getMaxApplications());
      }
      ri._("Fair Share:", StringEscapeUtils.escapeHtml(
        qinfo.getFairShare().toString()));

      html._(InfoBlock.class);

      // clear the info contents so this queue's info doesn't accumulate into another queue's info
      ri.clear();
    }
View Full Code Here

    int reduceTasks = job.getTotalReduces();
    int reducesTasksComplete = job.getCompletedReduces();
    long startTime = jobReport.getStartTime();
    long finishTime = jobReport.getFinishTime();
    countTasksAndAttempts(job);
    ResponseInfo infoBlock = info("Job Overview").
        _("Job Name:", job.getName()).
        _("User Name:", job.getUserName()).
        _("State:", job.getState()).
        _("Uberized:", job.isUber()).
        _("Started:", new Date(startTime)).
        _("Finished:", new Date(finishTime)).
        _("Elapsed:", StringUtils.formatTime(
            Times.elapsed(startTime, finishTime, false)));
   
    String amString =
        amInfos.size() == 1 ? "ApplicationMaster" : "ApplicationMasters";
   
    List<String> diagnostics = job.getDiagnostics();
    if(diagnostics != null && !diagnostics.isEmpty()) {
      StringBuffer b = new StringBuffer();
      for(String diag: diagnostics) {
        b.append(diag);
      }
      infoBlock._("Diagnostics:", b.toString());
    }

    if(numMaps > 0) {
      infoBlock._("Average Map Time", StringUtils.formatTime(avgMapTime));
    }
    if(numReduces > 0) {
      infoBlock._("Average Reduce Time", StringUtils.formatTime(avgReduceTime));
      infoBlock._("Average Shuffle Time", StringUtils.formatTime(avgShuffleTime));
      infoBlock._("Average Merge Time", StringUtils.formatTime(avgSortTime));
    }

    for(Map.Entry<JobACL, AccessControlList> entry : acls.entrySet()) {
      infoBlock._("ACL "+entry.getKey().getAclName()+":",
          entry.getValue().getAclString());
    }
    DIV<Hamlet> div = html.
      _(InfoBlock.class).
      div(_INFO_WRAP);
View Full Code Here

    boolean trackingUrlIsNotReady = trackingUrl == null
        || trackingUrl.isEmpty() || "N/A".equalsIgnoreCase(trackingUrl);
    String ui = trackingUrlIsNotReady ? "UNASSIGNED" :
        (app.getFinishTime() == 0 ? "ApplicationMaster" : "History");

    ResponseInfo info = info("Application Overview").
      _("User:", app.getUser()).
      _("Name:", app.getName()).
      _("State:", app.getState().toString()).
      _("FinalStatus:", app.getFinalApplicationStatus().toString()).
      _("Started:", Times.format(app.getStartTime())).
      _("Elapsed:", StringUtils.formatTime(
        Times.elapsed(app.getStartTime(), app.getFinishTime()))).
      _("Tracking URL:", trackingUrlIsNotReady ?
        "#" : join("http://", trackingUrl), ui).
      _("Diagnostics:", app.getDiagnostics());
    Container masterContainer = app.getCurrentAppAttempt()
        .getMasterContainer();
    if (masterContainer != null) {
      String url = join("http://", masterContainer.getNodeHttpAddress(),
          "/node", "/containerlogs/",
          ConverterUtils.toString(masterContainer.getId()));
      info._("AM container logs:", url, url);
    } else {
      info._("AM container logs:", "AM not yet registered with RM");
    }
    render(AboutPage.class);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.webapp.ResponseInfo$Item

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.