Class SnapshotCleanerChore
java.lang.Object
org.apache.hadoop.hbase.ScheduledChore
org.apache.hadoop.hbase.master.cleaner.SnapshotCleanerChore
- All Implemented Interfaces:
Runnable
This chore, every time it runs, will try to delete snapshots that are expired based on TTL in
seconds configured for each Snapshot
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final org.slf4j.Loggerprivate static final Stringprivate static final intprivate static final Stringprivate final SnapshotManager -
Constructor Summary
ConstructorsConstructorDescriptionSnapshotCleanerChore(Stoppable stopper, org.apache.hadoop.conf.Configuration configuration, SnapshotManager snapshotManager) Construct Snapshot Cleaner Chore with parameterized constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidchore()The task to execute on each scheduled execution of the Choreprivate voiddeleteExpiredSnapshot(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshotDescription) Methods inherited from class org.apache.hadoop.hbase.ScheduledChore
cancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, shutdown, shutdown, toString, triggerNow
-
Field Details
-
LOG
-
SNAPSHOT_CLEANER_CHORE_NAME
- See Also:
-
SNAPSHOT_CLEANER_INTERVAL
- See Also:
-
SNAPSHOT_CLEANER_DEFAULT_INTERVAL
- See Also:
-
DELETE_SNAPSHOT_EVENT
- See Also:
-
snapshotManager
-
-
Constructor Details
-
SnapshotCleanerChore
public SnapshotCleanerChore(Stoppable stopper, org.apache.hadoop.conf.Configuration configuration, SnapshotManager snapshotManager) Construct Snapshot Cleaner Chore with parameterized constructor- Parameters:
stopper- WhenStoppable.isStopped()is true, this chore will cancel and cleanupconfiguration- The configuration to setsnapshotManager- SnapshotManager instance to manage lifecycle of snapshot
-
-
Method Details
-
chore
Description copied from class:ScheduledChoreThe task to execute on each scheduled execution of the Chore- Specified by:
chorein classScheduledChore
-
deleteExpiredSnapshot
private void deleteExpiredSnapshot(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshotDescription)
-