Package org.apache.hadoop.hbase.master
Interface SnapshotSentinel
- All Known Implementing Classes:
DisabledTableSnapshotHandler
,EnabledTableSnapshotHandler
,TakeSnapshotHandler
Watch the current snapshot under process
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Actively cancel a running snapshot.long
Returns -1 if the snapshot is in progress, otherwise the completion timestamp.Get the exception that caused the snapshot to fail, if the snapshot has failed.org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription
Returns the description of the snapshot being runboolean
Check to see if the snapshot is finished, where finished may be success or failure.void
Rethrow the exception returned bygetExceptionIfFailed()
.
-
Method Details
-
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
Actively cancel a running snapshot.- Parameters:
why
- Reason for cancellation.
-
getSnapshot
org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription getSnapshot()Returns the description of the snapshot being run -
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
Rethrow the exception returned bygetExceptionIfFailed()
. If there is no exception this is a no-op.- Throws:
ForeignException
- all exceptions from remote sources are procedure exceptions
-