Package org.apache.hadoop.yarn.webapp

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


      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

    WebAppTests.testBlock(JQueryUI.class);
  }

  @Test public void testInfoBlock() {
    Injector injector = WebAppTests.createMockInjector(this);
    ResponseInfo info = injector.getInstance(ResponseInfo.class);
  }
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()).
        _("Submitted:", new Date(job.getSubmitTime())).
        _("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

TOP

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

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.