Examples of TaskAttemptInfo


Examples of org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo

            th(".tsh", "Finished").
            th(".tsh", "Elapsed").
            th(".note", "Note")._()._().
        tbody();
      for (TaskAttempt attempt : getTaskAttempts()) {
        TaskAttemptInfo ta = new TaskAttemptInfo(attempt, true);
        String taid = ta.getId();
        String progress = percent(ta.getProgress() / 100);
        ContainerId containerId = ta.getAssignedContainerId();

        String nodeHttpAddr = ta.getNode();
        long startTime = ta.getStartTime();
        long finishTime = ta.getFinishTime();
        long elapsed = ta.getElapsedTime();
        String diag = ta.getNote() == null ? "" : ta.getNote();
        TR<TBODY<TABLE<Hamlet>>> row = tbody.tr();
        TD<TR<TBODY<TABLE<Hamlet>>>> nodeTd = row.
          td(".id", taid).
          td(".progress", progress).
          td(".state", ta.getState()).td();
        if (nodeHttpAddr == null) {
          nodeTd._("N/A");
        } else {
          nodeTd.
            a(".nodelink", url("http://", nodeHttpAddr), nodeHttpAddr);
        }
        nodeTd._();
        if (containerId != null) {
          String containerIdStr = ta.getAssignedContainerIdStr();
          row.td().
            a(".logslink", url("http://", nodeHttpAddr, "node", "containerlogs",
              containerIdStr, app.getJob().getUserName()), "logs")._();
        } else {
          row.td()._("N/A")._();
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo

      // Write all the data into a JavaScript array of arrays for JQuery
      // DataTables to display
      StringBuilder attemptsTableData = new StringBuilder("[\n");

      for (TaskAttempt attempt : getTaskAttempts()) {
        TaskAttemptInfo ta = new TaskAttemptInfo(attempt, true);
        String progress = percent(ta.getProgress() / 100);

        String nodeHttpAddr = ta.getNode();
        String diag = ta.getNote() == null ? "" : ta.getNote();
        attemptsTableData.append("[\"")
        .append(ta.getId()).append("\",\"")
        .append(progress).append("\",\"")
        .append(ta.getState().toString()).append("\",\"")

        .append(nodeHttpAddr == null ? "N/A" :
          "<a class='nodelink' href='" + HttpConfig.getSchemePrefix() + nodeHttpAddr + "'>"
          + nodeHttpAddr + "</a>")
        .append("\",\"")

        .append(ta.getAssignedContainerId() == null ? "N/A" :
          "<a class='logslink' href='" + url(HttpConfig.getSchemePrefix(), nodeHttpAddr, "node"
            , "containerlogs", ta.getAssignedContainerIdStr(), app.getJob()
            .getUserName()) + "'>logs</a>")
          .append("\",\"")

        .append(ta.getStartTime()).append("\",\"")
        .append(ta.getFinishTime()).append("\",\"")
        .append(ta.getElapsedTime()).append("\",\"")
        .append(StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(
          diag))).append("\"],\n");
      }
      //Remove the last comma and close off the array of arrays
      if(attemptsTableData.charAt(attemptsTableData.length() - 2) == ',') {
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo

    for (TaskAttempt ta : task.getAttempts().values()) {
      if (ta != null) {
        if (task.getType() == TaskType.REDUCE) {
          attempts.add(new ReduceTaskAttemptInfo(ta, task.getType()));
        } else {
          attempts.add(new TaskAttemptInfo(ta, task.getType(), false));
        }
      }
    }
    return attempts;
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo

    TaskAttempt ta = AMWebServices.getTaskAttemptFromTaskAttemptString(attId,
        task);
    if (task.getType() == TaskType.REDUCE) {
      return new ReduceTaskAttemptInfo(ta, task.getType());
    } else {
      return new TaskAttemptInfo(ta, task.getType(), false);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo

            th(".tsh", "Finished").
            th(".tsh", "Elapsed").
            th(".note", "Note")._()._().
        tbody();
      for (TaskAttempt attempt : getTaskAttempts()) {
        TaskAttemptInfo ta = new TaskAttemptInfo(attempt, true);
        String taid = ta.getId();
        String progress = percent(ta.getProgress() / 100);
        ContainerId containerId = ta.getAssignedContainerId();

        String nodeHttpAddr = ta.getNode();
        long startTime = ta.getStartTime();
        long finishTime = ta.getFinishTime();
        long elapsed = ta.getElapsedTime();
        String diag = ta.getNote() == null ? "" : ta.getNote();
        TR<TBODY<TABLE<Hamlet>>> row = tbody.tr();
        TD<TR<TBODY<TABLE<Hamlet>>>> nodeTd = row.
          td(".id", taid).
          td(".progress", progress).
          td(".state", ta.getState()).td();
        if (nodeHttpAddr == null) {
          nodeTd._("N/A");
        } else {
          nodeTd.
            a(".nodelink", url("http://", nodeHttpAddr), nodeHttpAddr);
        }
        nodeTd._();
        if (containerId != null) {
          String containerIdStr = ta.getAssignedContainerIdStr();
          row.td().
            a(".logslink", url("http://", nodeHttpAddr, "node", "containerlogs",
              containerIdStr, app.getJob().getUserName()), "logs")._();
        } else {
          row.td()._("N/A")._();
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo

      long elapsedSortTime = -1;;
      long elapsedReduceTime = -1;
      long attemptElapsed = -1;
      TaskAttempt successful = info.getSuccessful();
      if(successful != null) {
        TaskAttemptInfo ta;
        if(type == TaskType.REDUCE) {
          ReduceTaskAttemptInfo rta = new ReduceTaskAttemptInfo(successful, type);
          shuffleFinishTime = rta.getShuffleFinishTime();
          sortFinishTime = rta.getMergeFinishTime();
          elapsedShuffleTime = rta.getElapsedShuffleTime();
          elapsedSortTime = rta.getElapsedMergeTime();
          elapsedReduceTime = rta.getElapsedReduceTime();
          ta = rta;
        } else {
          ta = new TaskAttemptInfo(successful, type, false);
        }
        attemptStartTime = ta.getStartTime();
        attemptFinishTime = ta.getFinishTime();
        attemptElapsed = ta.getElapsedTime();
      }

      tasksTableData.append("[\"")
      .append("<a href='" + url("task", tid)).append("'>")
      .append(tid).append("</a>\",\"")
View Full Code Here

Examples of org.apache.hadoop.tools.rumen.TaskAttemptInfo

      return locations;
    }
  }

  private TaskAttemptInfo getSuccessfulAttemptInfo(TaskType type, int task) {
    TaskAttemptInfo ret;
    for (int i = 0; true; ++i) {
      // Rumen should make up an attempt if it's missing. Or this won't work
      // at all. It's hard to discern what is happening in there.
      ret = jobdesc.getTaskAttemptInfo(type, task, i);
      if (ret.getRunState() == TaskStatus.State.SUCCEEDED) {
        break;
      }
    }
    if(ret.getRunState() != TaskStatus.State.SUCCEEDED) {
      LOG.warn("No sucessful attempts tasktype " + type +" task "+ task);
    }

    return ret;
  }
View Full Code Here

Examples of org.apache.hadoop.tools.rumen.TaskAttemptInfo

            String.format(
              "SPEC(%d) %d -> %d %d/%d", id(), i, i + j * maps, redDurations[j],
              info.getRuntime()));
        }
      }
      final TaskAttemptInfo info = getSuccessfulAttemptInfo(TaskType.MAP, i);
      splits.add(
        new SleepSplit(
          i, info.getRuntime(), redDurations, maps, new String[0]));
    }
    pushDescription(id(), splits);
  }
View Full Code Here

Examples of org.apache.hadoop.tools.rumen.TaskAttemptInfo

          // add the launch task action to the list
          if (loggingEnabled) {
            LOG.debug("Getting taskAttemptInfo for '" + taskAttemptID
                + "' for tracker '" + trackerName + "'");
          }
          TaskAttemptInfo taskAttemptInfo =
                          job.getTaskAttemptInfo(taskTracker, taskAttemptID);

          if (taskAttemptInfo == null) {
            throw new RuntimeException("Empty taskAttemptInfo: " +
                                       "task information missing");
View Full Code Here

Examples of org.apache.hadoop.tools.rumen.TaskAttemptInfo

    TaskType taskType = taskAttemptID.getTaskType();
    if (taskId.getTaskType() != TaskType.MAP) {
      assert false : "Task " + taskId + " is not MAP :" + taskId.getTaskType();
    }
   
    TaskAttemptInfo taskAttemptInfo = jobStory.getMapTaskAttemptInfoAdjusted(
        taskId.getId(), taskAttemptID.getId(), locality);

    if (LOG.isDebugEnabled()) {
      LOG.debug("get an attempt: "
          + taskAttemptID.toString()
          + ", state="
          + taskAttemptInfo.getRunState()
          + ", runtime="
          + ((taskType == TaskType.MAP) ? taskAttemptInfo.getRuntime()
              : ((ReduceTaskAttemptInfo) taskAttemptInfo).getReduceRuntime()));
    }
    return taskAttemptInfo;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.