public class DatadirCleanupManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DatadirCleanupManager.PurgeTaskStatus
Status of the dataDir purge task
|
Constructor and Description |
---|
DatadirCleanupManager(File snapDir,
File dataLogDir,
int snapRetainCount,
int purgeInterval)
Constructor of DatadirCleanupManager.
|
Modifier and Type | Method and Description |
---|---|
File |
getDataLogDir()
Returns transaction log directory.
|
int |
getPurgeInterval()
Returns purge interval in hours.
|
DatadirCleanupManager.PurgeTaskStatus |
getPurgeTaskStatus()
Returns the status of the purge task.
|
File |
getSnapDir()
Returns the snapshot directory.
|
int |
getSnapRetainCount()
Returns the number of snapshots to be retained after purge.
|
void |
shutdown()
Shutdown the purge task.
|
void |
start()
Validates the purge configuration and schedules the purge task.
|
public DatadirCleanupManager(File snapDir, File dataLogDir, int snapRetainCount, int purgeInterval)
snapDir
- snapshot directorydataLogDir
- transaction log directorysnapRetainCount
- number of snapshots to be retained after purgepurgeInterval
- purge interval in hourspublic void start()
snapRetainCount
number of
snapshots and deletes the remaining for every purgeInterval
hour(s).
purgeInterval
of 0
or
negative integer
will not schedule the purge task.
PurgeTxnLog.purge(File, File, int)
public void shutdown()
public DatadirCleanupManager.PurgeTaskStatus getPurgeTaskStatus()
public File getSnapDir()
public File getDataLogDir()
public int getPurgeInterval()
public int getSnapRetainCount()
Copyright © 2008–2019 The Apache Software Foundation. All rights reserved.