Skip to content

Commit

Permalink
[FLINK-18955][Checkpointing] Add checkpoint path to job startup/resto…
Browse files Browse the repository at this point in the history
…re message
  • Loading branch information
curcur authored and pnowojski committed Aug 24, 2020
1 parent 5487fcf commit 3b1b77e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ private boolean restoreLatestCheckpointedStateInternal(
}
}

LOG.info("Restoring job {} from latest valid checkpoint: {}.", job, latest);
LOG.info("Restoring job {} from {}.", job, latest);

// re-assign the task states
final Map<OperatorID, OperatorState> operatorStates = latest.getOperatorStates();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,28 @@
public enum CheckpointType {

/** A checkpoint, full or incremental. */
CHECKPOINT(false, false),
CHECKPOINT(false, false, "Checkpoint"),

/** A regular savepoint. */
SAVEPOINT(true, false),
SAVEPOINT(true, false, "Savepoint"),

/** A savepoint taken while suspending/terminating the job. */
SYNC_SAVEPOINT(true, true);
SYNC_SAVEPOINT(true, true, "Synchronous Savepoint");

private final boolean isSavepoint;

private final boolean isSynchronous;

private final String name;

CheckpointType(
final boolean isSavepoint,
final boolean isSynchronous) {
final boolean isSynchronous,
final String name) {

this.isSavepoint = isSavepoint;
this.isSynchronous = isSynchronous;
this.name = name;
}

public boolean isSavepoint() {
Expand All @@ -51,4 +55,8 @@ public boolean isSavepoint() {
public boolean isSynchronous() {
return isSynchronous;
}

public String getName() {
return name;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,12 @@ void setDiscardCallback(@Nullable CompletedCheckpointStats.DiscardCallback disca

@Override
public String toString() {
return String.format("Checkpoint %d @ %d for %s", checkpointID, timestamp, job);
return String.format(
"%s %d @ %d for %s located at %s",
props.getCheckpointType().getName(),
checkpointID,
timestamp,
job,
externalPointer);
}
}

0 comments on commit 3b1b77e

Please sign in to comment.