@InterfaceAudience.Private public class CatalogJanitor extends ScheduledChore
hbase:meta catalog table on a period.
Makes a lastReport on state of hbase:meta. Looks for unused regions to garbage collect. Scan of
hbase:meta runs if we are NOT in maintenance mode, if we are NOT shutting down, AND if the
assignmentmanager is loaded. Playing it safe, we will garbage collect no-longer needed region
references only if there are no regions-in-transition (RIT).| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_HBASE_CATALOGJANITOR_INTERVAL |
| Constructor and Description |
|---|
CatalogJanitor(MasterServices services) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
chore() |
boolean |
getEnabled() |
CatalogJanitorReport |
getLastReport()
Returns Returns last published Report that comes of last successful scan of hbase:meta.
|
protected boolean |
initialChore() |
static void |
main(String[] args)
For testing against a cluster.
|
int |
scan()
Run janitorial scan of catalog
hbase:meta table looking for garbage to collect. |
protected CatalogJanitorReport |
scanForReport()
Scan hbase:meta.
|
boolean |
setEnabled(boolean enabled) |
cancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, isInitialChoreComplete, isScheduled, run, shutdown, shutdown, toString, triggerNowpublic static final int DEFAULT_HBASE_CATALOGJANITOR_INTERVAL
public CatalogJanitor(MasterServices services)
protected boolean initialChore()
initialChore in class ScheduledChorepublic boolean setEnabled(boolean enabled)
public boolean getEnabled()
protected void chore()
chore in class ScheduledChorepublic int scan()
throws IOException
hbase:meta table looking for garbage to collect.IOExceptionprotected CatalogJanitorReport scanForReport() throws IOException
CatalogJanitorReportIOExceptionpublic CatalogJanitorReport getLastReport()
public static void main(String[] args) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.