Class RegionSizeCalculator
java.lang.Object
org.apache.hadoop.hbase.mapreduce.RegionSizeCalculator
Computes size of each region for given table and given column families. The value is used by
MapReduce for better scheduling.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRegionSizeCalculator
(RegionLocator regionLocator, Admin admin) Computes size of each region for table and given column families. -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
enabled
(org.apache.hadoop.conf.Configuration configuration) private Set<ServerName>
getRegionServersOfTable
(RegionLocator regionLocator) long
getRegionSize
(byte[] regionId) Returns size of given region in bytes.private void
init
(RegionLocator regionLocator, Admin admin)
-
Field Details
-
LOG
-
sizeMap
Maps each region to its size in bytes. -
ENABLE_REGIONSIZECALCULATOR
- See Also:
-
MEGABYTE
- See Also:
-
-
Constructor Details
-
RegionSizeCalculator
Computes size of each region for table and given column families.- Throws:
IOException
-
-
Method Details
-
init
- Throws:
IOException
-
getRegionServersOfTable
- Throws:
IOException
-
enabled
-
getRegionSize
Returns size of given region in bytes. Returns 0 if region was not found. -
getRegionSizeMap
-