Package org.apache.hadoop.hbase.backup
Class BackupObserver
java.lang.Object
org.apache.hadoop.hbase.backup.BackupObserver
- All Implemented Interfaces:
Coprocessor
,RegionCoprocessor
,RegionObserver
@LimitedPrivate("Configuration")
public class BackupObserver
extends Object
implements RegionCoprocessor, RegionObserver
An Observer to facilitate backup operations
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.State
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.coprocessor.RegionObserver
RegionObserver.MutationType
-
Field Summary
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
postBulkLoadHFile
(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, List<Pair<byte[], String>> stagingFamilyPaths, Map<byte[], List<org.apache.hadoop.fs.Path>> finalPaths) Called after bulkLoadHFile.void
preCommitStoreFile
(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, byte[] family, List<Pair<org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path>> pairs) Called before moving bulk loaded hfile to region directory.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.Coprocessor
getServices, start, stop
Methods inherited from interface org.apache.hadoop.hbase.coprocessor.RegionCoprocessor
getBulkLoadObserver, getEndpointObserver
Methods inherited from interface org.apache.hadoop.hbase.coprocessor.RegionObserver
postAppend, postAppend, postAppendBeforeWAL, postBatchMutate, postBatchMutateIndispensably, postCheckAndDelete, postCheckAndDelete, postCheckAndMutate, postCheckAndPut, postCheckAndPut, postClose, postCloseRegionOperation, postCommitStoreFile, postCompact, postCompactSelection, postDelete, postDelete, postExists, postFlush, postFlush, postGetOp, postIncrement, postIncrement, postIncrementBeforeWAL, postInstantiateDeleteTracker, postMemStoreCompaction, postMutationBeforeWAL, postOpen, postPut, postPut, postReplayWALs, postScannerClose, postScannerFilterRow, postScannerNext, postScannerOpen, postStartRegionOperation, postStoreFileReaderOpen, preAppend, preAppend, preAppendAfterRowLock, preBatchMutate, preBulkLoadHFile, preCheckAndDelete, preCheckAndDelete, preCheckAndDeleteAfterRowLock, preCheckAndDeleteAfterRowLock, preCheckAndMutate, preCheckAndMutateAfterRowLock, preCheckAndPut, preCheckAndPut, preCheckAndPutAfterRowLock, preCheckAndPutAfterRowLock, preClose, preCompact, preCompactScannerOpen, preCompactSelection, preDelete, preDelete, preExists, preFlush, preFlush, preFlushScannerOpen, preGetOp, preIncrement, preIncrement, preIncrementAfterRowLock, preMemStoreCompaction, preMemStoreCompactionCompact, preMemStoreCompactionCompactScannerOpen, preOpen, prePrepareTimeStampForDeleteVersion, prePut, prePut, preReplayWALs, preScannerClose, preScannerNext, preScannerOpen, preStoreFileReaderOpen, preStoreScannerOpen, preWALAppend
-
Field Details
-
LOG
-
-
Constructor Details
-
BackupObserver
public BackupObserver()
-
-
Method Details
-
getRegionObserver
- Specified by:
getRegionObserver
in interfaceRegionCoprocessor
-
postBulkLoadHFile
public void postBulkLoadHFile(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, List<Pair<byte[], String>> stagingFamilyPaths, Map<byte[], throws IOExceptionList<org.apache.hadoop.fs.Path>> finalPaths) Description copied from interface:RegionObserver
Called after bulkLoadHFile.- Specified by:
postBulkLoadHFile
in interfaceRegionObserver
- Parameters:
ctx
- the environment provided by the region serverstagingFamilyPaths
- pairs of { CF, HFile path } submitted for bulk loadfinalPaths
- Map of CF to List of file paths for the loaded files if the Map is not null, the bulkLoad was successful. Otherwise the bulk load failed. bulkload is done by the time this hook is called.- Throws:
IOException
-
preCommitStoreFile
public void preCommitStoreFile(ObserverContext<? extends RegionCoprocessorEnvironment> ctx, byte[] family, List<Pair<org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path>> pairs) throws IOExceptionDescription copied from interface:RegionObserver
Called before moving bulk loaded hfile to region directory.- Specified by:
preCommitStoreFile
in interfaceRegionObserver
- Parameters:
ctx
- the environment provided by the region serverfamily
- column familypairs
- List of pairs of { HFile location in staging dir, HFile path in region dir } Each pair are for the same hfile.- Throws:
IOException
-