org.apache.hadoop.hbase.snapshot
Class SnapshotTask
java.lang.Object
org.apache.hadoop.hbase.snapshot.SnapshotTask
- All Implemented Interfaces:
- Callable<Void>, ForeignExceptionSnare
- Direct Known Subclasses:
- CopyRecoveredEditsTask, ReferenceRegionHFilesTask, ReferenceServerWALsTask, TableInfoCopyTask
@InterfaceAudience.Private
public abstract class SnapshotTask
- extends Object
- implements ForeignExceptionSnare, Callable<Void>
General snapshot operation taken on a regionserver
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.concurrent.Callable |
call |
snapshot
protected final HBaseProtos.SnapshotDescription snapshot
errorMonitor
protected final ForeignExceptionDispatcher errorMonitor
SnapshotTask
public SnapshotTask(HBaseProtos.SnapshotDescription snapshot,
ForeignExceptionDispatcher monitor)
- Parameters:
snapshot - Description of the snapshot we are going to operate onmonitor - listener interested in failures to the snapshot caused by this operation
snapshotFailure
public void snapshotFailure(String message,
Exception e)
rethrowException
public void rethrowException()
throws ForeignException
- Description copied from interface:
ForeignExceptionSnare
- Rethrow an exception currently held by the
ForeignExceptionSnare. If there is
no exception this is a no-op
- Specified by:
rethrowException in interface ForeignExceptionSnare
- Throws:
ForeignException - all exceptions from remote sources are procedure exceptions
hasException
public boolean hasException()
- Description copied from interface:
ForeignExceptionSnare
- Non-exceptional form of
ForeignExceptionSnare.rethrowException(). Checks to see if any
process to which the exception checkers is bound has created an error that
would cause a failure.
- Specified by:
hasException in interface ForeignExceptionSnare
- Returns:
- true if there has been an error,false otherwise
getException
public ForeignException getException()
- Description copied from interface:
ForeignExceptionSnare
- Get the value of the captured exception.
- Specified by:
getException in interface ForeignExceptionSnare
- Returns:
- the captured foreign exception or null if no exception captured.
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.