Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleShuffleMaster
interface ShuffleMaster<T extends ShuffleDescriptor> extends AutoCloseable {

    // other methods

    /**
     * Whether the shuffle master supports taking snapshot in batch scenarios, which will be used
     * when enable Job Recovery. If it returns true, we will call {@link #snapshotState} to take
     * snapshot, and call {@link #restoreState} to restore the state of shuffle master.
     */
    default boolean supportsBatchSnapshot() {
        return false;
    }
 
    default void snapshotState(CompletableFuture<byte[]> snapshotFuture
            CompletableFuture<ShuffleMasterSnapshot> snapshotFuture,
            ShuffleMasterSnapshotContext context) {
            snapshotFuturesnapshotFuture.complete(null);
    }
 
    default void restoreState(byte[]List<ShuffleMasterSnapshot> snapshotDatasnapshots) {} 
}

interface ShuffleMasterSnapshot extends Serializable {
    boolean isIncremental();
}

interface ShuffleMasterSnapshotContext {
}

Persistent JobEventStore

...