Package org.apache.hadoop.yarn.server.webapp.dao

Examples of org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfo


    } catch (IOException e) {
      throw new WebApplicationException(e);
    }
    AppAttemptsInfo appAttemptsInfo = new AppAttemptsInfo();
    for (ApplicationAttemptReport appAttemptReport : appAttemptReports) {
      AppAttemptInfo appAttemptInfo = new AppAttemptInfo(appAttemptReport);
      appAttemptsInfo.add(appAttemptInfo);
    }

    return appAttemptsInfo;
  }
View Full Code Here


    }
    if (appAttempt == null) {
      throw new NotFoundException("app attempt with id: " + appAttemptId
          + " not found");
    }
    return new AppAttemptInfo(appAttempt);
  }
View Full Code Here

    }
    if (appAttemptReport == null) {
      puts("Application Attempt not found: " + attemptid);
      return;
    }
    AppAttemptInfo appAttempt = new AppAttemptInfo(appAttemptReport);

    setTitle(join("Application Attempt ", attemptid));

    String node = "N/A";
    if (appAttempt.getHost() != null && appAttempt.getRpcPort() >= 0
        && appAttempt.getRpcPort() < 65536) {
      node = appAttempt.getHost() + ":" + appAttempt.getRpcPort();
    }
    info("Application Attempt Overview")
      ._("State", appAttempt.getAppAttemptState())
      ._(
        "Master Container",
        appAttempt.getAmContainerId() == null ? "#" : root_url("container",
          appAttempt.getAmContainerId()),
        String.valueOf(appAttempt.getAmContainerId()))
      ._("Node:", node)
      ._(
        "Tracking URL:",
        appAttempt.getTrackingUrl() == null ? "#" : root_url(appAttempt
          .getTrackingUrl()), "History")
      ._("Diagnostics Info:", appAttempt.getDiagnosticsInfo());

    html._(InfoBlock.class);

    Collection<ContainerReport> containers;
    try {
View Full Code Here

          .th(".started", "Started").th(".node", "Node").th(".logs", "Logs")
          ._()._().tbody();

    StringBuilder attemptsTableData = new StringBuilder("[\n");
    for (ApplicationAttemptReport appAttemptReport : attempts) {
      AppAttemptInfo appAttempt = new AppAttemptInfo(appAttemptReport);
      ContainerReport containerReport;
      try {
        containerReport =
            appContext.getAMContainer(appAttemptReport
              .getApplicationAttemptId());
      } catch (IOException e) {
        String message =
            "Failed to read the AM container of the application attempt "
                + appAttemptReport.getApplicationAttemptId() + ".";
        LOG.error(message, e);
        html.p()._(message)._();
        return;
      }
      long startTime = Long.MAX_VALUE;
      String logsLink = null;
      if (containerReport != null) {
        ContainerInfo container = new ContainerInfo(containerReport);
        startTime = container.getStartedTime();
        logsLink = containerReport.getLogUrl();
      }
      String nodeLink = null;
      if (appAttempt.getHost() != null && appAttempt.getRpcPort() >= 0
          && appAttempt.getRpcPort() < 65536) {
        nodeLink = appAttempt.getHost() + ":" + appAttempt.getRpcPort();
      }
      // AppAttemptID numerical value parsed by parseHadoopID in
      // yarn.dt.plugins.js
      attemptsTableData
        .append("[\"<a href='")
        .append(url("appattempt", appAttempt.getAppAttemptId()))
        .append("'>")
        .append(appAttempt.getAppAttemptId())
        .append("</a>\",\"")
        .append(startTime)
        .append("\",\"<a href='")
        .append(
          nodeLink == null ? "#" : url("//", nodeLink))
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfo

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.