public interface CheckpointService
Checkpoints are atomic, single-writer, write-once, multiple-readers, ready-many type of objects. This is provided by releasing the CheckpointID for a checkpoint only upon commit of the checkpoint, and by preventing a checkpoint to be re-opened for writes.
Non-functional properties such as durability, availability, compression, garbage collection, quotas are left to the implementation.
This API is envisioned as the basic building block for a checkpoint service, on top of which richer interfaces can be layered (e.g., frameworks providing object-serialization, checkpoint metadata and provenance, etc.)
Modifier and Type | Interface and Description |
---|---|
static interface |
CheckpointService.CheckpointReadChannel
A channel to read from a checkpoint.
|
static interface |
CheckpointService.CheckpointWriteChannel
A channel to write to a checkpoint.
|
Modifier and Type | Method and Description |
---|---|
void |
abort(CheckpointService.CheckpointWriteChannel channel)
Dual to commit, it aborts the current checkpoint.
|
CheckpointID |
commit(CheckpointService.CheckpointWriteChannel channel)
Used to finalize and existing checkpoint.
|
CheckpointService.CheckpointWriteChannel |
create()
This method creates a checkpoint and provide a channel to write to it.
|
boolean |
delete(CheckpointID checkpointId)
It discards an existing checkpoint identified by its CheckpointID.
|
CheckpointService.CheckpointReadChannel |
open(CheckpointID checkpointId)
Given a CheckpointID returns a reading channel.
|
CheckpointService.CheckpointWriteChannel create() throws IOException, InterruptedException
IOException
InterruptedException
CheckpointID commit(CheckpointService.CheckpointWriteChannel channel) throws IOException, InterruptedException
channel
- the CheckpointWriteChannel to commitIOException
InterruptedException
void abort(CheckpointService.CheckpointWriteChannel channel) throws IOException, InterruptedException
channel
- the CheckpointWriteChannel to abortIOException
InterruptedException
CheckpointService.CheckpointReadChannel open(CheckpointID checkpointId) throws IOException, InterruptedException
checkpointId
- CheckpointID for the checkpoint to be openedIOException
InterruptedException
boolean delete(CheckpointID checkpointId) throws IOException, InterruptedException
checkpointId
- CheckpointID for the checkpoint to be deletedIOException
InterruptedException
Copyright © 2016 The Apache Software Foundation. All rights reserved.