@InterfaceAudience.Private public class FileSystemUtilizationChore extends ScheduledChore
HRegion on the FileSystem hosted by the given
 HRegionServer. The results of this computation are stored in the
 RegionServerSpaceQuotaManager's RegionSizeStore object.| Modifier and Type | Field and Description | 
|---|---|
(package private) static long | 
FS_UTILIZATION_CHORE_DELAY_DEFAULT  | 
(package private) static String | 
FS_UTILIZATION_CHORE_DELAY_KEY  | 
(package private) static int | 
FS_UTILIZATION_CHORE_PERIOD_DEFAULT  | 
(package private) static String | 
FS_UTILIZATION_CHORE_PERIOD_KEY  | 
(package private) static String | 
FS_UTILIZATION_CHORE_TIMEUNIT_DEFAULT  | 
(package private) static String | 
FS_UTILIZATION_CHORE_TIMEUNIT_KEY  | 
(package private) static long | 
FS_UTILIZATION_MAX_ITERATION_DURATION_DEFAULT  | 
(package private) static String | 
FS_UTILIZATION_MAX_ITERATION_DURATION_KEY  | 
private Iterator<Region> | 
leftoverRegions  | 
private static org.slf4j.Logger | 
LOG  | 
private long | 
maxIterationMillis  | 
private HRegionServer | 
rs  | 
| Constructor and Description | 
|---|
FileSystemUtilizationChore(HRegionServer rs)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
chore()
The task to execute on each scheduled execution of the Chore 
 | 
(package private) long | 
computeSize(Region r)
Computes total FileSystem size for the given  
Region. | 
(package private) static long | 
getInitialDelay(org.apache.hadoop.conf.Configuration conf)
Extracts the initial delay for the chore from the configuration. 
 | 
(package private) Iterator<Region> | 
getLeftoverRegions()
Returns an  
Iterator over the Regions which were skipped last invocation of the chore. | 
(package private) static int | 
getPeriod(org.apache.hadoop.conf.Configuration conf)
Extracts the period for the chore from the configuration. 
 | 
(package private) RegionSizeStore | 
getRegionSizeStore()  | 
(package private) static TimeUnit | 
getTimeUnit(org.apache.hadoop.conf.Configuration conf)
Extracts the time unit for the chore period and initial delay from the configuration. 
 | 
(package private) void | 
setLeftoverRegions(Iterator<Region> newLeftovers)
Sets a new collection of Regions as leftovers. 
 | 
cancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, shutdown, shutdown, toString, triggerNowprivate static final org.slf4j.Logger LOG
static final String FS_UTILIZATION_CHORE_PERIOD_KEY
static final int FS_UTILIZATION_CHORE_PERIOD_DEFAULT
static final String FS_UTILIZATION_CHORE_DELAY_KEY
static final long FS_UTILIZATION_CHORE_DELAY_DEFAULT
static final String FS_UTILIZATION_CHORE_TIMEUNIT_KEY
static final String FS_UTILIZATION_CHORE_TIMEUNIT_DEFAULT
static final String FS_UTILIZATION_MAX_ITERATION_DURATION_KEY
static final long FS_UTILIZATION_MAX_ITERATION_DURATION_DEFAULT
private final HRegionServer rs
private final long maxIterationMillis
private Iterator<Region> leftoverRegions
public FileSystemUtilizationChore(HRegionServer rs)
protected void chore()
ScheduledChorechore in class ScheduledChoreIterator<Region> getLeftoverRegions()
Iterator over the Regions which were skipped last invocation of the chore.void setLeftoverRegions(Iterator<Region> newLeftovers)
long computeSize(Region r)
Region.r - The regionRegionSizeStore getRegionSizeStore()
static int getPeriod(org.apache.hadoop.conf.Configuration conf)
conf - The configuration object.static long getInitialDelay(org.apache.hadoop.conf.Configuration conf)
conf - The configuration object.static TimeUnit getTimeUnit(org.apache.hadoop.conf.Configuration conf)
FS_UTILIZATION_CHORE_TIMEUNIT_KEY must correspond to a
 TimeUnit value.conf - The configuration object.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.