public class FSCheckpointService extends Object implements CheckpointService
CheckpointService.CheckpointReadChannel, CheckpointService.CheckpointWriteChannel| Constructor and Description |
|---|
FSCheckpointService(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path base,
CheckpointNamingService namingPolicy,
short replication) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(CheckpointService.CheckpointWriteChannel ch)
Aborts the current checkpoint.
|
CheckpointID |
commit(CheckpointService.CheckpointWriteChannel ch)
Closes an existing checkpoint for writes and returns the CheckpointID that can be later
used to get the read-only access to this checkpoint.
|
CheckpointService.CheckpointWriteChannel |
create()
Creates a checkpoint and provides a channel to write to it.
|
boolean |
delete(CheckpointID id)
Discards an existing checkpoint identified by its CheckpointID.
|
CheckpointService.CheckpointReadChannel |
open(CheckpointID id)
Returns a reading channel to a checkpoint identified by the CheckpointID.
|
public FSCheckpointService(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path base, CheckpointNamingService namingPolicy, short replication)
public CheckpointService.CheckpointWriteChannel create() throws IOException
CheckpointServicecommit is called.
This makes enforcing atomicity of writes easy.create in interface CheckpointServiceIOExceptionpublic CheckpointService.CheckpointReadChannel open(CheckpointID id) throws IOException, InterruptedException
CheckpointServiceopen in interface CheckpointServiceid - CheckpointID for the checkpoint to be openedIOExceptionInterruptedExceptionpublic CheckpointID commit(CheckpointService.CheckpointWriteChannel ch) throws IOException, InterruptedException
CheckpointServicecommit in interface CheckpointServicech - the CheckpointWriteChannel to commitIOExceptionInterruptedExceptionpublic void abort(CheckpointService.CheckpointWriteChannel ch) throws IOException
CheckpointServiceabort in interface CheckpointServicech - the CheckpointWriteChannel to abortIOExceptionpublic boolean delete(CheckpointID id) throws IOException, InterruptedException
CheckpointServicedelete in interface CheckpointServiceid - CheckpointID for the checkpoint to be deletedIOExceptionInterruptedExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.