Package org.apache.ambari.eventdb.model.TaskLocalityData

Examples of org.apache.ambari.eventdb.model.TaskLocalityData.DataPoint


    while (index < xPoints.length) {
      if (point.getX() == xPoints[index]) {
        index++;
        break;
      } else if (point.getX() > xPoints[index]) {
        data.add(new DataPoint(xPoints[index++]));
      }
    }
    data.add(point);
    return index;
  }
View Full Code Here


 
  private static List<DataPoint> processExactLocalityData(List<TaskAttempt> taskAttempts, String taskType, String locality, MinMax io) {
    List<DataPoint> data = new ArrayList<DataPoint>();
    for (TaskAttempt taskAttempt : taskAttempts) {
      if (taskType.equals(taskAttempt.getTaskType()) && locality.equals(taskAttempt.getLocality())) {
        DataPoint point = new DataPoint();
        point.setX(taskAttempt.getStartTime());
        point.setY(taskAttempt.getFinishTime() - taskAttempt.getStartTime());
        point.setIO(taskAttempt.getInputBytes() + taskAttempt.getOutputBytes());
        point.setLabel(taskAttempt.getTaskAttemptId());
        point.setStatus(taskAttempt.getStatus());
        data.add(point);
        io.max = Math.max(io.max, point.getIO());
        io.min = Math.min(io.min, point.getIO());
      }
    }
    return data;
  }
View Full Code Here

  private static List<DataPoint> processLocalityData(List<TaskAttempt> taskAttempts, String taskType, String locality, Long[] xPoints, MinMax io) {
    List<DataPoint> data = new ArrayList<DataPoint>();
    int i = 0;
    for (TaskAttempt taskAttempt : taskAttempts) {
      if (taskType.equals(taskAttempt.getTaskType()) && locality.equals(taskAttempt.getLocality())) {
        DataPoint point = new DataPoint();
        point.setX(transformX(taskAttempt.getStartTime()));
        point.setY(transformY(taskAttempt.getFinishTime() - taskAttempt.getStartTime()));
        point.setIO(taskAttempt.getInputBytes() + taskAttempt.getOutputBytes());
        point.setLabel(taskAttempt.getTaskAttemptId());
        point.setStatus(taskAttempt.getStatus());
        i = addDataPoint(data, point, i, xPoints);
        io.max = Math.max(io.max, point.getIO());
        io.min = Math.min(io.min, point.getIO());
      }
    }
    while (i < xPoints.length)
      data.add(new DataPoint(xPoints[i++]));
    return data;
  }
View Full Code Here

    while (index < xPoints.length) {
      if (point.getX() == xPoints[index]) {
        index++;
        break;
      } else if (point.getX() > xPoints[index]) {
        data.add(new DataPoint(xPoints[index++]));
      }
    }
    data.add(point);
    return index;
  }
View Full Code Here

  private static List<DataPoint> processLocalityData(List<TaskAttempt> taskAttempts, String locality, Long[] xPoints, MinMax io) {
    List<DataPoint> data = new ArrayList<DataPoint>();
    int i = 0;
    for (TaskAttempt taskAttempt : taskAttempts) {
      if (locality.equals(taskAttempt.getLocality())) {
        DataPoint point = new DataPoint();
        point.setX(transformX(taskAttempt.getStartTime()));
        point.setY(transformY(taskAttempt.getFinishTime() - taskAttempt.getStartTime()));
        point.setIO(taskAttempt.getInputBytes() + taskAttempt.getOutputBytes());
        point.setLabel(taskAttempt.getTaskAttemptId());
        point.setStatus(taskAttempt.getStatus());
        i = addDataPoint(data, point, i, xPoints);
        io.max = Math.max(io.max, point.getIO());
        io.min = Math.min(io.min, point.getIO());
      }
    }
    while (i < xPoints.length)
      data.add(new DataPoint(xPoints[i++]));
    return data;
  }
View Full Code Here

    while (index < xPoints.length) {
      if (point.getX() == xPoints[index]) {
        index++;
        break;
      } else if (point.getX() > xPoints[index]) {
        data.add(new DataPoint(xPoints[index++]));
      }
    }
    data.add(point);
    return index;
  }
View Full Code Here

 
  private static List<DataPoint> processExactLocalityData(List<TaskAttempt> taskAttempts, String taskType, String locality, MinMax io) {
    List<DataPoint> data = new ArrayList<DataPoint>();
    for (TaskAttempt taskAttempt : taskAttempts) {
      if (taskType.equals(taskAttempt.getTaskType()) && (locality == null || locality.equals(taskAttempt.getLocality()))) {
        DataPoint point = new DataPoint();
        point.setX(taskAttempt.getStartTime());
        point.setY(taskAttempt.getFinishTime() - taskAttempt.getStartTime());
        point.setIO(taskAttempt.getInputBytes() + taskAttempt.getOutputBytes());
        point.setLabel(taskAttempt.getTaskAttemptId());
        point.setStatus(taskAttempt.getStatus());
        data.add(point);
        io.max = Math.max(io.max, point.getIO());
        io.min = Math.min(io.min, point.getIO());
      }
    }
    return data;
  }
View Full Code Here

  private static List<DataPoint> processLocalityData(List<TaskAttempt> taskAttempts, String taskType, String locality, Long[] xPoints, MinMax io) {
    List<DataPoint> data = new ArrayList<DataPoint>();
    int i = 0;
    for (TaskAttempt taskAttempt : taskAttempts) {
      if (taskType.equals(taskAttempt.getTaskType()) && locality.equals(taskAttempt.getLocality())) {
        DataPoint point = new DataPoint();
        point.setX(transformX(taskAttempt.getStartTime()));
        point.setY(transformY(taskAttempt.getFinishTime() - taskAttempt.getStartTime()));
        point.setIO(taskAttempt.getInputBytes() + taskAttempt.getOutputBytes());
        point.setLabel(taskAttempt.getTaskAttemptId());
        point.setStatus(taskAttempt.getStatus());
        i = addDataPoint(data, point, i, xPoints);
        io.max = Math.max(io.max, point.getIO());
        io.min = Math.min(io.min, point.getIO());
      }
    }
    while (i < xPoints.length)
      data.add(new DataPoint(xPoints[i++]));
    return data;
  }
View Full Code Here

TOP

Related Classes of org.apache.ambari.eventdb.model.TaskLocalityData.DataPoint

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.