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
Modifier and TypeFieldDescriptionprivate static final String
private static final org.slf4j.Logger
private static final String
private static final int
private static final String
private final SnapshotManager
-
Constructor Summary
ConstructorDescriptionSnapshotCleanerChore
(Stoppable stopper, org.apache.hadoop.conf.Configuration configuration, SnapshotManager snapshotManager) Construct Snapshot Cleaner Chore with parameterized constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
chore()
The task to execute on each scheduled execution of the Choreprivate void
deleteExpiredSnapshot
(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:ScheduledChore
The task to execute on each scheduled execution of the Chore- Specified by:
chore
in classScheduledChore
-
deleteExpiredSnapshot
private void deleteExpiredSnapshot(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshotDescription)
-