Examples of PaddedTable


Examples of com.manning.hip.common.PaddedTable

    if (metrics.size() == 0) {
      return;
    }
    System.out.println("== Tasks ordered by " + heading + " ==");

    PaddedTable table = new PaddedTable();
    table
        .addColumnTitle("Type")
        .addColumnTitle("TaskId")
        .addColumnTitle("Status")
        .addColumnTitle("Host")
        .addColumnTitle("ExecutionTime");

    if(isReduce) {
      table
          .addColumnTitle("ShuffleTime")
          .addColumnTitle("SortTime");
    }

        table.addColumnTitle("InputBytes")
        .addColumnTitle("OutputBytes")
        .addColumnTitle("InputRecords")
        .addColumnTitle("OputputRecords")
        .addColumnTitle("Overall Throughput (B/s)");

    if(isReduce) {
      table
          .addColumnTitle("ShuffleThroughput")
          .addColumnTitle("SortThroughput")
          .addColumnTitle("ReduceThroughput");
    }

    Collections.sort(metrics, comparator);
    Collections.reverse(metrics);

    Long minVal = null;
    Long maxVal = null;
    long totalVals = 0;

    for (TaskMetrics m : metrics) {
      long v = extractLongFieldValue(m, fieldName);
      minVal = minVal == null ? v : Math.min(minVal, v);
      maxVal = maxVal == null ? v : Math.max(maxVal, v);
      totalVals += v;

      table.newRow();
      table.addColumnValue(m.getType())
          .addColumnValue(m.getTaskId())
          .addColumnValue(m.getStatus())
          .addColumnValue(m.getHost())
          .addColumnValue(JobHistoryHelper.formatTime(
              m.getOverallTimeMillis()));

      if(isReduce) {
        table.addColumnValue(JobHistoryHelper.formatTime(
            m.getShuffleTimeMillis()))
            .addColumnValue(JobHistoryHelper.formatTime(
                m.getSortTimeMillis()));
      }

          table.addColumnValue(m.getInputBytes())
          .addColumnValue(m.getOutputBytes())
          .addColumnValue(m.getInputRecords())
          .addColumnValue(m.getOutputRecords())
          .addColumnValue(m.getOverallThroughputBytesPerSecond());

      if(isReduce) {
        table.addColumnValue(m.getShuffleThroughputBytesPerSecond())
            .addColumnValue(m.getSortThroughputBytesPerSecond())
            .addColumnValue(m.getReduceThroughputBytesPerSecond());
      }
    }
View Full Code Here

Examples of com.manning.hip.common.PaddedTable

            job);

    System.out.println("Job Statistics");
    System.out.println("");

    PaddedTable table = new PaddedTable();
    table
        .addColumnTitle("Item")
        .addColumnTitle("Min")
        .addColumnTitle("Max")
        .addColumnTitle("Median")
        .addColumnTitle("Mean")
        .addColumnTitle("StdDev");

    dumpTasks(table, mapMetrics, "execution time",
        "getOverallTimeMillis", true);
    dumpTasks(table, mapMetrics, "input records", "getInputRecords",
        false);
    dumpTasks(table, mapMetrics, "input bytes", "getInputBytes", false);
    dumpTasks(table, mapMetrics, "output records", "getOutputRecords",
        false);
    dumpTasks(table, mapMetrics, "output bytes", "getOutputBytes",
        false);

    DataSkewMetrics.decorateHeader("MAP TASKS");
    System.out.println("");
    System.out.println("Num Map Tasks:    " + mapMetrics.size());
    System.out.println("");
    System.out.println(table);
    table.clearRows();

    if(reduceMetrics.size() > 0) {

      dumpTasks(table, reduceMetrics, "execution time",
          "getOverallTimeMillis", true);
View Full Code Here

Examples of com.manning.hip.common.PaddedTable

    printAllTaskAttempts(job);
  }

  public static void printAllTaskAttempts(JobHistory.JobInfo job)
      throws ParseException {
    PaddedTable table = new PaddedTable();
    table
        .addColumnTitle("Type")
        .addColumnTitle("TaskId")
        .addColumnTitle("Status")
        .addColumnTitle("Host")
        .addColumnTitle("OverallTime(HH:MM:SS)")
View Full Code Here

Examples of com.manning.hip.common.PaddedTable

    if (metrics.size() == 0) {
      return;
    }
    System.out.println("== Tasks ordered by " + heading + " ==");

    PaddedTable table = new PaddedTable();
    table
        .addColumnTitle("Type")
        .addColumnTitle("TaskId")
        .addColumnTitle("Status")
        .addColumnTitle("Host")
        .addColumnTitle("ExecutionTime")
        .addColumnTitle("InputBytes")
        .addColumnTitle("OutputBytes")
        .addColumnTitle("InputRecords")
        .addColumnTitle("OputputRecords");

    Collections.sort(metrics, comparator);
    Collections.reverse(metrics);

    Long minVal = null;
    Long maxVal = null;
    long totalVals = 0;

    for (TaskMetrics m : metrics) {
      long v = extractLongFieldValue(m, fieldName);
      minVal = minVal == null ? v : Math.min(minVal, v);
      maxVal = maxVal == null ? v : Math.max(maxVal, v);
      totalVals += v;

      table.newRow();
      table.addColumnValue(m.getType())
          .addColumnValue(m.getTaskId())
          .addColumnValue(m.getStatus())
          .addColumnValue(m.getHost())
          .addColumnValue(JobHistoryHelper.formatTime(
              m.getOverallTimeMillis()))
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.