org.apache.hadoop.hbase.master
Interface SnapshotSentinel

All Known Implementing Classes:
CloneSnapshotHandler, DisabledTableSnapshotHandler, EnabledTableSnapshotHandler, RestoreSnapshotHandler, TakeSnapshotHandler

@InterfaceAudience.Private
@InterfaceStability.Unstable
public interface SnapshotSentinel

Watch the current snapshot under process


Method Summary
 void cancel(String why)
          Actively cancel a running snapshot.
 long getCompletionTimestamp()
           
 ForeignException getExceptionIfFailed()
          Get the exception that caused the snapshot to fail, if the snapshot has failed.
 HBaseProtos.SnapshotDescription getSnapshot()
           
 boolean isFinished()
          Check to see if the snapshot is finished, where finished may be success or failure.
 void rethrowExceptionIfFailed()
          Rethrow the exception returned by getExceptionIfFailed().
 

Method Detail

isFinished

boolean isFinished()
Check to see if the snapshot is finished, where finished may be success or failure.

Returns:
false if the snapshot is still in progress, true if the snapshot has finished

getCompletionTimestamp

long getCompletionTimestamp()
Returns:
-1 if the snapshot is in progress, otherwise the completion timestamp.

cancel

void cancel(String why)
Actively cancel a running snapshot.

Parameters:
why - Reason for cancellation.

getSnapshot

HBaseProtos.SnapshotDescription getSnapshot()
Returns:
the description of the snapshot being run

getExceptionIfFailed

ForeignException getExceptionIfFailed()
Get the exception that caused the snapshot to fail, if the snapshot has failed.

Returns:
ForeignException that caused the snapshot to fail, or null if the snapshot is still in progress or has succeeded

rethrowExceptionIfFailed

void rethrowExceptionIfFailed()
                              throws ForeignException
Rethrow the exception returned by getExceptionIfFailed(). If there is no exception this is a no-op.

Throws:
ForeignException - all exceptions from remote sources are procedure exceptions


Copyright © 2015 The Apache Software Foundation. All Rights Reserved.