Package org.apache.hadoop.hbase.quotas
Class RegionSizeReportingChore
java.lang.Object
org.apache.hadoop.hbase.ScheduledChore
org.apache.hadoop.hbase.quotas.RegionSizeReportingChore
- All Implemented Interfaces:
Runnable
A Chore which sends the region size reports on this RegionServer to the Master.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private final MetricsRegionServer
(package private) static final long
(package private) static final String
(package private) static final int
(package private) static final String
(package private) static final String
(package private) static final String
private final RegionServerServices
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) void
_chore()
protected void
chore()
The task to execute on each scheduled execution of the Chore(package private) static long
getInitialDelay
(org.apache.hadoop.conf.Configuration conf) Extracts the initial delay for the chore from the configuration.(package private) HashSet<RegionInfo>
getOnlineRegionInfos
(List<? extends Region> onlineRegions) (package private) static int
getPeriod
(org.apache.hadoop.conf.Configuration conf) Extracts the period for the chore from the configuration.(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
removeNonOnlineRegions
(RegionSizeStore store, Set<RegionInfo> onlineRegions) Methods inherited from class org.apache.hadoop.hbase.ScheduledChore
cancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, shutdown, shutdown, toString, triggerNow
-
Field Details
-
LOG
-
REGION_SIZE_REPORTING_CHORE_PERIOD_KEY
- See Also:
-
REGION_SIZE_REPORTING_CHORE_PERIOD_DEFAULT
- See Also:
-
REGION_SIZE_REPORTING_CHORE_DELAY_KEY
- See Also:
-
REGION_SIZE_REPORTING_CHORE_DELAY_DEFAULT
- See Also:
-
REGION_SIZE_REPORTING_CHORE_TIMEUNIT_KEY
- See Also:
-
REGION_SIZE_REPORTING_CHORE_TIMEUNIT_DEFAULT
-
rsServices
-
metrics
-
-
Constructor Details
-
RegionSizeReportingChore
-
-
Method Details
-
chore
Description copied from class:ScheduledChore
The task to execute on each scheduled execution of the Chore- Specified by:
chore
in classScheduledChore
-
_chore
void _chore() -
getOnlineRegionInfos
-
removeNonOnlineRegions
-
getPeriod
Extracts the period for the chore from the configuration.- Parameters:
conf
- The configuration object.- Returns:
- The configured chore period or the default value.
-
getInitialDelay
Extracts the initial delay for the chore from the configuration.- Parameters:
conf
- The configuration object.- Returns:
- The configured chore initial delay or the default value.
-
getTimeUnit
Extracts the time unit for the chore period and initial delay from the configuration. The configuration value forREGION_SIZE_REPORTING_CHORE_TIMEUNIT_KEY
must correspond to aTimeUnit
value.- Parameters:
conf
- The configuration object.- Returns:
- The configured time unit for the chore period and initial delay or the default value.
-