/** * Returns a snapshot of the current state. * * @return A snapshot of the current state. */ MinMaxAvgStats createSnapshot() { return new MinMaxAvgStats(min, max, sum, count); }
/** * Creates a snapshot of the current state. * * @return A snapshot of the current state. */ CompletedCheckpointStatsSummary createSnapshot() { return new CompletedCheckpointStatsSummary( stateSize.createSnapshot(), duration.createSnapshot(), alignmentBuffered.createSnapshot()); }
static void writeMinMaxAvg(JsonGenerator gen, MinMaxAvgStats minMaxAvg) throws IOException { gen.writeNumberField("min", minMaxAvg.getMinimum()); gen.writeNumberField("max", minMaxAvg.getMaximum()); gen.writeNumberField("avg", minMaxAvg.getAverage()); }
/** * Returns the total buffered bytes during alignment over all subtasks. * * <p>Can return <code>-1</code> if the runtime did not report this. * * @return Total buffered bytes during alignment over all subtasks. */ public long getAlignmentBuffered() { return summaryStats.getAlignmentBufferedStats().getSum(); }
/** * Updates the summary with the given completed checkpoint. * * @param completed Completed checkpoint to update the summary with. */ void updateSummary(CompletedCheckpointStats completed) { stateSize.add(completed.getStateSize()); duration.add(completed.getEndToEndDuration()); alignmentBuffered.add(completed.getAlignmentBuffered()); }
/** * Returns the total buffered bytes during alignment over all subtasks. * * <p>Can return <code>-1</code> if the runtime did not report this. * * @return Total buffered bytes during alignment over all subtasks. */ public long getAlignmentBuffered() { return summaryStats.getAlignmentBufferedStats().getSum(); }
/** * Updates the summary with the given completed checkpoint. * * @param completed Completed checkpoint to update the summary with. */ void updateSummary(CompletedCheckpointStats completed) { stateSize.add(completed.getStateSize()); duration.add(completed.getEndToEndDuration()); alignmentBuffered.add(completed.getAlignmentBuffered()); }
static void writeMinMaxAvg(JsonGenerator gen, MinMaxAvgStats minMaxAvg) throws IOException { gen.writeNumberField(MinMaxAvgStatistics.FIELD_NAME_MINIMUM, minMaxAvg.getMinimum()); gen.writeNumberField(MinMaxAvgStatistics.FIELD_NAME_MAXIMUM, minMaxAvg.getMaximum()); gen.writeNumberField(MinMaxAvgStatistics.FIELD_NAME_AVERAGE, minMaxAvg.getAverage()); }
/** * Returns a snapshot of the current state. * * @return A snapshot of the current state. */ MinMaxAvgStats createSnapshot() { return new MinMaxAvgStats(min, max, sum, count); }
/** * Returns the total checkpoint state size over all subtasks. * * @return Total checkpoint state size over all subtasks. */ public long getStateSize() { return summaryStats.getStateSizeStats().getSum(); }
/** * Updates the summary with the given completed checkpoint. * * @param completed Completed checkpoint to update the summary with. */ void updateSummary(CompletedCheckpointStats completed) { stateSize.add(completed.getStateSize()); duration.add(completed.getEndToEndDuration()); alignmentBuffered.add(completed.getAlignmentBuffered()); }
/** * Creates a snapshot of the current state. * * @return A snapshot of the current state. */ CompletedCheckpointStatsSummary createSnapshot() { return new CompletedCheckpointStatsSummary( stateSize.createSnapshot(), duration.createSnapshot(), alignmentBuffered.createSnapshot()); }
private static TaskCheckpointStatisticsWithSubtaskDetails.Summary createSummary(TaskStateStats.TaskStateStatsSummary taskStatisticsSummary, long triggerTimestamp) { final MinMaxAvgStats stateSizeStats = taskStatisticsSummary.getStateSizeStats(); final MinMaxAvgStats ackTSStats = taskStatisticsSummary.getAckTimestampStats(); final MinMaxAvgStats syncDurationStats = taskStatisticsSummary.getSyncCheckpointDurationStats(); final MinMaxAvgStats asyncDurationStats = taskStatisticsSummary.getAsyncCheckpointDurationStats(); final TaskCheckpointStatisticsWithSubtaskDetails.CheckpointDuration checkpointDuration = new TaskCheckpointStatisticsWithSubtaskDetails.CheckpointDuration( new MinMaxAvgStatistics(syncDurationStats.getMinimum(), syncDurationStats.getMaximum(), syncDurationStats.getAverage()), new MinMaxAvgStatistics(asyncDurationStats.getMinimum(), asyncDurationStats.getMaximum(), asyncDurationStats.getAverage())); final MinMaxAvgStats alignmentBufferedStats = taskStatisticsSummary.getAlignmentBufferedStats(); final MinMaxAvgStats alignmentDurationStats = taskStatisticsSummary.getAlignmentDurationStats(); final TaskCheckpointStatisticsWithSubtaskDetails.CheckpointAlignment checkpointAlignment = new TaskCheckpointStatisticsWithSubtaskDetails.CheckpointAlignment( new MinMaxAvgStatistics(alignmentBufferedStats.getMinimum(), alignmentBufferedStats.getMaximum(), alignmentBufferedStats.getAverage()), new MinMaxAvgStatistics(alignmentDurationStats.getMinimum(), alignmentDurationStats.getMaximum(), alignmentDurationStats.getAverage())); return new TaskCheckpointStatisticsWithSubtaskDetails.Summary( new MinMaxAvgStatistics(stateSizeStats.getMinimum(), stateSizeStats.getMaximum(), stateSizeStats.getAverage()), new MinMaxAvgStatistics( Math.max(0L, ackTSStats.getMinimum() - triggerTimestamp), Math.max(0L, ackTSStats.getMaximum() - triggerTimestamp), Math.max(0L, ackTSStats.getAverage() - triggerTimestamp)), checkpointDuration, checkpointAlignment); }
/** * Returns a snapshot of the current state. * * @return A snapshot of the current state. */ MinMaxAvgStats createSnapshot() { return new MinMaxAvgStats(min, max, sum, count); }
/** * Returns the total checkpoint state size over all subtasks. * * @return Total checkpoint state size over all subtasks. */ public long getStateSize() { return summaryStats.getStateSizeStats().getSum(); }
/** * Updates the summary with the given completed checkpoint. * * @param completed Completed checkpoint to update the summary with. */ void updateSummary(CompletedCheckpointStats completed) { stateSize.add(completed.getStateSize()); duration.add(completed.getEndToEndDuration()); alignmentBuffered.add(completed.getAlignmentBuffered()); }
/** * Creates a snapshot of the current state. * * @return A snapshot of the current state. */ CompletedCheckpointStatsSummary createSnapshot() { return new CompletedCheckpointStatsSummary( stateSize.createSnapshot(), duration.createSnapshot(), alignmentBuffered.createSnapshot()); }
private static TaskCheckpointStatisticsWithSubtaskDetails.Summary createSummary(TaskStateStats.TaskStateStatsSummary taskStatisticsSummary, long triggerTimestamp) { final MinMaxAvgStats stateSizeStats = taskStatisticsSummary.getStateSizeStats(); final MinMaxAvgStats ackTSStats = taskStatisticsSummary.getAckTimestampStats(); final MinMaxAvgStats syncDurationStats = taskStatisticsSummary.getSyncCheckpointDurationStats(); final MinMaxAvgStats asyncDurationStats = taskStatisticsSummary.getAsyncCheckpointDurationStats(); final TaskCheckpointStatisticsWithSubtaskDetails.CheckpointDuration checkpointDuration = new TaskCheckpointStatisticsWithSubtaskDetails.CheckpointDuration( new MinMaxAvgStatistics(syncDurationStats.getMinimum(), syncDurationStats.getMaximum(), syncDurationStats.getAverage()), new MinMaxAvgStatistics(asyncDurationStats.getMinimum(), asyncDurationStats.getMaximum(), asyncDurationStats.getAverage())); final MinMaxAvgStats alignmentBufferedStats = taskStatisticsSummary.getAlignmentBufferedStats(); final MinMaxAvgStats alignmentDurationStats = taskStatisticsSummary.getAlignmentDurationStats(); final TaskCheckpointStatisticsWithSubtaskDetails.CheckpointAlignment checkpointAlignment = new TaskCheckpointStatisticsWithSubtaskDetails.CheckpointAlignment( new MinMaxAvgStatistics(alignmentBufferedStats.getMinimum(), alignmentBufferedStats.getMaximum(), alignmentBufferedStats.getAverage()), new MinMaxAvgStatistics(alignmentDurationStats.getMinimum(), alignmentDurationStats.getMaximum(), alignmentDurationStats.getAverage())); return new TaskCheckpointStatisticsWithSubtaskDetails.Summary( new MinMaxAvgStatistics(stateSizeStats.getMinimum(), stateSizeStats.getMaximum(), stateSizeStats.getAverage()), new MinMaxAvgStatistics( Math.max(0L, ackTSStats.getMinimum() - triggerTimestamp), Math.max(0L, ackTSStats.getMaximum() - triggerTimestamp), Math.max(0L, ackTSStats.getAverage() - triggerTimestamp)), checkpointDuration, checkpointAlignment); }
CompletedCheckpointStatsSummary() { this(new MinMaxAvgStats(), new MinMaxAvgStats(), new MinMaxAvgStats()); }
/** * Returns the total checkpoint state size over all subtasks. * * @return Total checkpoint state size over all subtasks. */ public long getStateSize() { return summaryStats.getStateSizeStats().getSum(); }