/** * Try to add the checkpoint to the cache. * * @param checkpoint Checkpoint to be added. */ public void tryAdd(AbstractCheckpointStats checkpoint) { // Don't add in progress checkpoints as they will be replaced by their // completed/failed version eventually. if (cache != null && checkpoint != null && !checkpoint.getStatus().isInProgress()) { cache.put(checkpoint.getCheckpointId(), checkpoint); } }
/** * Try to add the checkpoint to the cache. * * @param checkpoint Checkpoint to be added. */ void tryAdd(AbstractCheckpointStats checkpoint) { // Don't add in progress checkpoints as they will be replaced by their // completed/failed version eventually. if (cache != null && checkpoint != null && !checkpoint.getStatus().isInProgress()) { cache.put(checkpoint.getCheckpointId(), checkpoint); } }
/** * Try to add the checkpoint to the cache. * * @param checkpoint Checkpoint to be added. */ public void tryAdd(AbstractCheckpointStats checkpoint) { // Don't add in progress checkpoints as they will be replaced by their // completed/failed version eventually. if (cache != null && checkpoint != null && !checkpoint.getStatus().isInProgress()) { cache.put(checkpoint.getCheckpointId(), checkpoint); } }
/** * Try to add the checkpoint to the cache. * * @param checkpoint Checkpoint to be added. */ public void tryAdd(AbstractCheckpointStats checkpoint) { // Don't add in progress checkpoints as they will be replaced by their // completed/failed version eventually. if (cache != null && checkpoint != null && !checkpoint.getStatus().isInProgress()) { cache.put(checkpoint.getCheckpointId(), checkpoint); } }
gen.writeStartObject(); gen.writeNumberField("id", checkpoint.getCheckpointId()); gen.writeStringField("status", checkpoint.getStatus().toString()); gen.writeBooleanField("is_savepoint", checkpoint.getProperties().isSavepoint()); gen.writeNumberField("trigger_timestamp", checkpoint.getTriggerTimestamp()); gen.writeNumberField("num_acknowledged_subtasks", checkpoint.getNumberOfAcknowledgedSubtasks()); if (checkpoint.getStatus().isCompleted()) { else if (checkpoint.getStatus().isFailed()) {
gen.writeStringField("status", checkpoint.getStatus().toString()); gen.writeBooleanField("is_savepoint", checkpoint.getProperties().isSavepoint()); gen.writeNumberField("trigger_timestamp", checkpoint.getTriggerTimestamp()); gen.writeNumberField("num_acknowledged_subtasks", checkpoint.getNumberOfAcknowledgedSubtasks()); if (checkpoint.getStatus().isCompleted()) { else if (checkpoint.getStatus().isFailed()) {
gen.writeStringField("status", checkpoint.getStatus().toString()); gen.writeNumberField("latest_ack_timestamp", taskStats.getLatestAckTimestamp()); gen.writeNumberField("state_size", taskStats.getStateSize());
checkArgument(!completedOrFailed.getStatus().isInProgress(), "Not allowed to replace with in progress checkpoints."); if (completedOrFailed.getStatus().isCompleted()) { CompletedCheckpointStats completed = (CompletedCheckpointStats) completedOrFailed; if (completed.getProperties().isSavepoint() && } else if (completedOrFailed.getStatus().isFailed()) { FailedCheckpointStats failed = (FailedCheckpointStats) completedOrFailed; if (latestFailedCheckpoint == null ||
checkArgument(!completedOrFailed.getStatus().isInProgress(), "Not allowed to replace with in progress checkpoints."); if (completedOrFailed.getStatus().isCompleted()) { CompletedCheckpointStats completed = (CompletedCheckpointStats) completedOrFailed; if (completed.getProperties().isSavepoint() && } else if (completedOrFailed.getStatus().isFailed()) { FailedCheckpointStats failed = (FailedCheckpointStats) completedOrFailed; if (latestFailedCheckpoint == null ||
checkArgument(!completedOrFailed.getStatus().isInProgress(), "Not allowed to replace with in progress checkpoints."); if (completedOrFailed.getStatus().isCompleted()) { CompletedCheckpointStats completed = (CompletedCheckpointStats) completedOrFailed; if (completed.getProperties().isSavepoint() && } else if (completedOrFailed.getStatus().isFailed()) { FailedCheckpointStats failed = (FailedCheckpointStats) completedOrFailed; if (latestFailedCheckpoint == null ||
checkArgument(!completedOrFailed.getStatus().isInProgress(), "Not allowed to replace with in progress checkpoints."); if (completedOrFailed.getStatus().isCompleted()) { CompletedCheckpointStats completed = (CompletedCheckpointStats) completedOrFailed; if (completed.getProperties().isSavepoint() && } else if (completedOrFailed.getStatus().isFailed()) { FailedCheckpointStats failed = (FailedCheckpointStats) completedOrFailed; if (latestFailedCheckpoint == null ||
private static TaskCheckpointStatisticsWithSubtaskDetails createCheckpointDetails(AbstractCheckpointStats checkpointStats, TaskStateStats taskStatistics) { final TaskCheckpointStatisticsWithSubtaskDetails.Summary summary = createSummary( taskStatistics.getSummaryStats(), checkpointStats.getTriggerTimestamp()); final List<SubtaskCheckpointStatistics> subtaskCheckpointStatistics = createSubtaskCheckpointStatistics( taskStatistics.getSubtaskStats(), checkpointStats.getTriggerTimestamp()); return new TaskCheckpointStatisticsWithSubtaskDetails( checkpointStats.getCheckpointId(), checkpointStats.getStatus(), taskStatistics.getLatestAckTimestamp(), taskStatistics.getStateSize(), taskStatistics.getEndToEndDuration(checkpointStats.getTriggerTimestamp()), taskStatistics.getAlignmentBuffered(), taskStatistics.getNumberOfSubtasks(), taskStatistics.getNumberOfAcknowledgedSubtasks(), summary, subtaskCheckpointStatistics); }
private static TaskCheckpointStatisticsWithSubtaskDetails createCheckpointDetails(AbstractCheckpointStats checkpointStats, TaskStateStats taskStatistics) { final TaskCheckpointStatisticsWithSubtaskDetails.Summary summary = createSummary( taskStatistics.getSummaryStats(), checkpointStats.getTriggerTimestamp()); final List<SubtaskCheckpointStatistics> subtaskCheckpointStatistics = createSubtaskCheckpointStatistics( taskStatistics.getSubtaskStats(), checkpointStats.getTriggerTimestamp()); return new TaskCheckpointStatisticsWithSubtaskDetails( checkpointStats.getCheckpointId(), checkpointStats.getStatus(), taskStatistics.getLatestAckTimestamp(), taskStatistics.getStateSize(), taskStatistics.getEndToEndDuration(checkpointStats.getTriggerTimestamp()), taskStatistics.getAlignmentBuffered(), taskStatistics.getNumberOfSubtasks(), taskStatistics.getNumberOfAcknowledgedSubtasks(), summary, subtaskCheckpointStatistics); }
private static TaskCheckpointStatisticsWithSubtaskDetails createCheckpointDetails(AbstractCheckpointStats checkpointStats, TaskStateStats taskStatistics) { final TaskCheckpointStatisticsWithSubtaskDetails.Summary summary = createSummary( taskStatistics.getSummaryStats(), checkpointStats.getTriggerTimestamp()); final List<SubtaskCheckpointStatistics> subtaskCheckpointStatistics = createSubtaskCheckpointStatistics( taskStatistics.getSubtaskStats(), checkpointStats.getTriggerTimestamp()); return new TaskCheckpointStatisticsWithSubtaskDetails( checkpointStats.getCheckpointId(), checkpointStats.getStatus(), taskStatistics.getLatestAckTimestamp(), taskStatistics.getStateSize(), taskStatistics.getEndToEndDuration(checkpointStats.getTriggerTimestamp()), taskStatistics.getAlignmentBuffered(), taskStatistics.getNumberOfSubtasks(), taskStatistics.getNumberOfAcknowledgedSubtasks(), summary, subtaskCheckpointStatistics); }
gen.writeStartObject(); gen.writeNumberField(CheckpointStatistics.FIELD_NAME_ID, checkpoint.getCheckpointId()); gen.writeStringField(CheckpointStatistics.FIELD_NAME_STATUS, checkpoint.getStatus().toString()); gen.writeBooleanField(CheckpointStatistics.FIELD_NAME_IS_SAVEPOINT, checkpoint.getProperties().isSavepoint()); gen.writeNumberField(CheckpointStatistics.FIELD_NAME_TRIGGER_TIMESTAMP, checkpoint.getTriggerTimestamp()); gen.writeNumberField(CheckpointStatistics.FIELD_NAME_NUM_ACK_SUBTASKS, checkpoint.getNumberOfAcknowledgedSubtasks()); if (checkpoint.getStatus().isCompleted()) { else if (checkpoint.getStatus().isFailed()) {
new TaskCheckpointStatistics( checkpointStats.getCheckpointId(), checkpointStats.getStatus(), taskStateStat.getLatestAckTimestamp(), taskStateStat.getStateSize(),
new TaskCheckpointStatistics( checkpointStats.getCheckpointId(), checkpointStats.getStatus(), taskStateStat.getLatestAckTimestamp(), taskStateStat.getStateSize(),
gen.writeStringField("status", checkpoint.getStatus().toString()); gen.writeBooleanField("is_savepoint", checkpoint.getProperties().isSavepoint()); gen.writeNumberField("trigger_timestamp", checkpoint.getTriggerTimestamp()); gen.writeNumberField("num_acknowledged_subtasks", checkpoint.getNumberOfAcknowledgedSubtasks()); if (checkpoint.getStatus().isCompleted()) { else if (checkpoint.getStatus().isFailed()) {
new TaskCheckpointStatistics( checkpointStats.getCheckpointId(), checkpointStats.getStatus(), taskStateStat.getLatestAckTimestamp(), taskStateStat.getStateSize(),
gen.writeStringField("status", checkpoint.getStatus().toString()); gen.writeNumberField("latest_ack_timestamp", taskStats.getLatestAckTimestamp()); gen.writeNumberField("state_size", taskStats.getStateSize());