@InterfaceAudience.Private public class SnapshotCleanerChore extends ScheduledChore
Modifier and Type | Field and Description |
---|---|
private static String |
DELETE_SNAPSHOT_EVENT |
private static org.slf4j.Logger |
LOG |
private static String |
SNAPSHOT_CLEANER_CHORE_NAME |
private static int |
SNAPSHOT_CLEANER_DEFAULT_INTERVAL |
private static String |
SNAPSHOT_CLEANER_INTERVAL |
private SnapshotManager |
snapshotManager |
Constructor and Description |
---|
SnapshotCleanerChore(Stoppable stopper,
org.apache.hadoop.conf.Configuration configuration,
SnapshotManager snapshotManager)
Construct Snapshot Cleaner Chore with parameterized constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
chore()
The task to execute on each scheduled execution of the Chore
|
private void |
deleteExpiredSnapshot(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshotDescription) |
cancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, toString, triggerNow
private static final org.slf4j.Logger LOG
private static final String SNAPSHOT_CLEANER_CHORE_NAME
private static final String SNAPSHOT_CLEANER_INTERVAL
private static final int SNAPSHOT_CLEANER_DEFAULT_INTERVAL
private static final String DELETE_SNAPSHOT_EVENT
private final SnapshotManager snapshotManager
public SnapshotCleanerChore(Stoppable stopper, org.apache.hadoop.conf.Configuration configuration, SnapshotManager snapshotManager)
stopper
- When Stoppable.isStopped()
is true, this chore will cancel and cleanupconfiguration
- The configuration to setsnapshotManager
- SnapshotManager instance to manage lifecycle of snapshotprotected void chore()
ScheduledChore
chore
in class ScheduledChore
private void deleteExpiredSnapshot(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshotDescription)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.