Package org.apache.hadoop.hbase.mob
Class ExpiredMobFileCleaner
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.mob.ExpiredMobFileCleaner
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,org.apache.hadoop.util.Tool
@Private
public class ExpiredMobFileCleaner
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
The cleaner to delete the expired MOB files.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanExpiredMobFiles
(String tableName, ColumnFamilyDescriptor family) Cleans the MOB files when they're expired and their min versions are 0.static void
private void
int
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
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.conf.Configurable
getConf, setConf
-
Field Details
-
LOG
-
-
Constructor Details
-
ExpiredMobFileCleaner
public ExpiredMobFileCleaner()
-
-
Method Details
-
cleanExpiredMobFiles
public void cleanExpiredMobFiles(String tableName, ColumnFamilyDescriptor family) throws IOException Cleans the MOB files when they're expired and their min versions are 0. If the latest timestamp of Cells in a MOB file is older than the TTL in the column family, it's regarded as expired. This cleaner deletes them. At a time T0, the cells in a mob file M0 are expired. If a user starts a scan before T0, those mob cells are visible, this scan still runs after T0. At that time T1, this mob file M0 is expired, meanwhile a cleaner starts, the M0 is archived and can be read in the archive directory.- Parameters:
tableName
- The current table name.family
- The current family.- Throws:
IOException
-
main
- Throws:
Exception
-
printUsage
-
run
- Specified by:
run
in interfaceorg.apache.hadoop.util.Tool
- Throws:
Exception
-