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)
Dual to commit, it aborts the current checkpoint.
|
CheckpointID |
commit(CheckpointService.CheckpointWriteChannel ch)
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 id)
It discards an existing checkpoint identified by its CheckpointID.
|
CheckpointService.CheckpointReadChannel |
open(CheckpointID id)
Given a CheckpointID returns a reading channel.
|
public FSCheckpointService(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path base, CheckpointNamingService namingPolicy, short replication)
public CheckpointService.CheckpointWriteChannel create() throws IOException
CheckpointService
create
in interface CheckpointService
IOException
public CheckpointService.CheckpointReadChannel open(CheckpointID id) throws IOException, InterruptedException
CheckpointService
open
in interface CheckpointService
id
- CheckpointID for the checkpoint to be openedIOException
InterruptedException
public CheckpointID commit(CheckpointService.CheckpointWriteChannel ch) throws IOException, InterruptedException
CheckpointService
commit
in interface CheckpointService
ch
- the CheckpointWriteChannel to commitIOException
InterruptedException
public void abort(CheckpointService.CheckpointWriteChannel ch) throws IOException
CheckpointService
abort
in interface CheckpointService
ch
- the CheckpointWriteChannel to abortIOException
public boolean delete(CheckpointID id) throws IOException, InterruptedException
CheckpointService
delete
in interface CheckpointService
id
- CheckpointID for the checkpoint to be deletedIOException
InterruptedException
Copyright © 2015 The Apache Software Foundation. All rights reserved.