Package org.apache.tez.dag.api.client

Examples of org.apache.tez.dag.api.client.Progress


    console.printInfo(SUMMARY_HEADER);
    SortedSet<String> keys = new TreeSet<String>(progressMap.keySet());
    Set<StatusGetOpts> statusOptions = new HashSet<StatusGetOpts>(1);
    statusOptions.add(StatusGetOpts.GET_COUNTERS);
    for (String vertexName : keys) {
      Progress progress = progressMap.get(vertexName);
      if (progress != null) {
        final int totalTasks = progress.getTotalTaskCount();
        final int failedTaskAttempts = progress.getFailedTaskAttemptCount();
        final int killedTasks = progress.getKilledTaskCount();
        final double duration =
            perfLogger.getDuration(PerfLogger.TEZ_RUN_VERTEX + vertexName) / 1000.0;
        VertexStatus vertexStatus = null;
        try {
          vertexStatus = dagClient.getVertexStatus(vertexName, statusOptions);
View Full Code Here


    SortedSet<String> keys = new TreeSet<String>(progressMap.keySet());
    int idx = 0;
    int maxKeys = keys.size();
    for (String s : keys) {
      idx++;
      Progress progress = progressMap.get(s);
      final int complete = progress.getSucceededTaskCount();
      final int total = progress.getTotalTaskCount();
      final int running = progress.getRunningTaskCount();
      final int failed = progress.getFailedTaskAttemptCount();
      final int pending = progress.getTotalTaskCount() - progress.getSucceededTaskCount() -
          progress.getRunningTaskCount();
      final int killed = progress.getKilledTaskCount();

      // To get vertex status we can use DAGClient.getVertexStatus(), but it will be expensive to
      // get status from AM for every refresh of the UI. Lets infer the state from task counts.
      // Only if DAG is FAILED or KILLED the vertex status is fetched from AM.
      VertexStatus.State vertexState = VertexStatus.State.INITIALIZING;
View Full Code Here

  private String getReport(Map<String, Progress> progressMap) {
    StringBuffer reportBuffer = new StringBuffer();

    SortedSet<String> keys = new TreeSet<String>(progressMap.keySet());
    for (String s: keys) {
      Progress progress = progressMap.get(s);
      final int complete = progress.getSucceededTaskCount();
      final int total = progress.getTotalTaskCount();
      final int running = progress.getRunningTaskCount();
      final int failed = progress.getFailedTaskAttemptCount();
      if (total <= 0) {
        reportBuffer.append(String.format("%s: -/-\t", s, complete, total));
      } else {
        if (complete == total && !completed.contains(s)) {
          completed.add(s);
View Full Code Here

  private String printStatus(Map<String, Progress> progressMap, String lastReport, LogHelper console) {
    StringBuffer reportBuffer = new StringBuffer();

    SortedSet<String> keys = new TreeSet<String>(progressMap.keySet());
    for (String s: keys) {
      Progress progress = progressMap.get(s);
      int complete = progress.getSucceededTaskCount();
      int total = progress.getTotalTaskCount();
      if (total <= 0) {
        reportBuffer.append(String.format("%s: -/-\t", s, complete, total));
      } else {
        if (complete == total && !completed.contains(s)) {
          completed.add(s);
View Full Code Here

      VertexStatus vertexStatus = dagClient.getVertexStatus( getID(), STATUS_GET_OPTS );

      if( vertexStatus == null )
        return false;

      Progress progress = vertexStatus.getProgress();

      totalTaskCount = progress.getTotalTaskCount();
      runningTaskCount = progress.getRunningTaskCount();
      succeededTaskCount = progress.getSucceededTaskCount();
      failedTaskCount = progress.getFailedTaskCount();
      killedTaskCount = progress.getKilledTaskCount();

      int total = sliceStatsMap.size();

      for( int i = total; i < totalTaskCount; i++ )
        {
View Full Code Here

TOP

Related Classes of org.apache.tez.dag.api.client.Progress

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.