use of org.apache.flink.runtime.checkpoint.StatsSummary in project flink by apache.
the class TaskCheckpointStatisticDetailsHandler method createSummary.
private static TaskCheckpointStatisticsWithSubtaskDetails.Summary createSummary(TaskStateStats.TaskStateStatsSummary taskStatisticsSummary, long triggerTimestamp) {
final StatsSummary ackTSStats = taskStatisticsSummary.getAckTimestampStats();
final TaskCheckpointStatisticsWithSubtaskDetails.CheckpointDuration checkpointDuration = new TaskCheckpointStatisticsWithSubtaskDetails.CheckpointDuration(StatsSummaryDto.valueOf(taskStatisticsSummary.getSyncCheckpointDurationStats()), StatsSummaryDto.valueOf(taskStatisticsSummary.getAsyncCheckpointDurationStats()));
final TaskCheckpointStatisticsWithSubtaskDetails.CheckpointAlignment checkpointAlignment = new TaskCheckpointStatisticsWithSubtaskDetails.CheckpointAlignment(new StatsSummaryDto(0, 0, 0, 0, 0, 0, 0, 0), StatsSummaryDto.valueOf(taskStatisticsSummary.getProcessedDataStats()), StatsSummaryDto.valueOf(taskStatisticsSummary.getPersistedDataStats()), StatsSummaryDto.valueOf(taskStatisticsSummary.getAlignmentDurationStats()));
return new TaskCheckpointStatisticsWithSubtaskDetails.Summary(StatsSummaryDto.valueOf(taskStatisticsSummary.getCheckpointedSize()), StatsSummaryDto.valueOf(taskStatisticsSummary.getStateSizeStats()), new StatsSummaryDto(Math.max(0L, ackTSStats.getMinimum() - triggerTimestamp), Math.max(0L, ackTSStats.getMaximum() - triggerTimestamp), Math.max(0L, ackTSStats.getAverage() - triggerTimestamp), ackTSStats.createSnapshot().getQuantile(.50d), ackTSStats.createSnapshot().getQuantile(.90d), ackTSStats.createSnapshot().getQuantile(.95d), ackTSStats.createSnapshot().getQuantile(.99d), ackTSStats.createSnapshot().getQuantile(.999d)), checkpointDuration, checkpointAlignment, StatsSummaryDto.valueOf(taskStatisticsSummary.getCheckpointStartDelayStats()));
}
Aggregations