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

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


        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) {
View Full Code Here


    } catch (IOException e) {
      throw new WebApplicationException(e);
    }
    ContainersInfo containersInfo = new ContainersInfo();
    for (ContainerReport containerReport : containerReports) {
      ContainerInfo containerInfo = new ContainerInfo(containerReport);
      containersInfo.add(containerInfo);
    }
    return containersInfo;
  }
View Full Code Here

    }
    if (container == null) {
      throw new NotFoundException("container with id: " + containerId
          + " not found");
    }
    return new ContainerInfo(container);
  }
View Full Code Here

    if (containerReport == null) {
      puts("Container not found: " + containerid);
      return;
    }

    ContainerInfo container = new ContainerInfo(containerReport);
    setTitle(join("Container ", containerid));

    info("Container Overview")
      ._("State:", container.getContainerState())
      ._("Exit Status:", container.getContainerExitStatus())
      ._("Node:", container.getAssignedNodeId())
      ._("Priority:", container.getPriority())
      ._("Started:", Times.format(container.getStartedTime()))
      ._(
        "Elapsed:",
        StringUtils.formatTime(Times.elapsed(container.getStartedTime(),
          container.getFinishedTime())))
      ._(
        "Resource:",
        container.getAllocatedMB() + " Memory, "
            + container.getAllocatedVCores() + " VCores")
      ._("Logs:", container.getLogUrl() == null ? "#" : container.getLogUrl(),
          container.getLogUrl() == null ? "N/A" : "Logs")
      ._("Diagnostics:", container.getDiagnosticsInfo());

    html._(InfoBlock.class);
  }
View Full Code Here

          .th(".node", "Node").th(".exitstatus", "Container Exit Status")
          .th(".logs", "Logs")._()._().tbody();

    StringBuilder containersTableData = new StringBuilder("[\n");
    for (ContainerReport containerReport : containers) {
      ContainerInfo container = new ContainerInfo(containerReport);
      // ConatinerID numerical value parsed by parseHadoopID in
      // yarn.dt.plugins.js
      containersTableData
        .append("[\"<a href='")
        .append(url("container", container.getContainerId()))
        .append("'>")
        .append(container.getContainerId())
        .append("</a>\",\"<a href='")
        .append(container.getAssignedNodeId())
        .append("'>")
        .append(
          StringEscapeUtils.escapeJavaScript(StringEscapeUtils
            .escapeHtml(container.getAssignedNodeId()))).append("</a>\",\"")
        .append(container.getContainerExitStatus()).append("\",\"<a href='")
        .append(container.getLogUrl() == null ?
            "#" : container.getLogUrl()).append("'>")
        .append(container.getLogUrl() == null ?
            "N/A" : "Logs").append("</a>\"],\n");
    }
    if (containersTableData.charAt(containersTableData.length() - 2) == ',') {
      containersTableData.delete(containersTableData.length() - 2,
        containersTableData.length() - 1);
View Full Code Here

TOP

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

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.