Package org.apache.hadoop.hbase.master.normalizer


package org.apache.hadoop.hbase.master.normalizer
The Region Normalizer subsystem is responsible for coaxing all the regions in a table toward a "normal" size, according to their storefile size. It does this by splitting regions that are significantly larger than the norm, and merging regions that are significantly smaller than the norm.

The public interface to the Region Normalizer subsystem is limited to the following classes: The Region Normalizer subsystem is composed of a handful of related classes:
  • The RegionNormalizerStateStore provides a system by which the Normalizer can be disabled at runtime. It currently does this by storing the state in master local region, but this is an implementation detail.
  • The RegionNormalizerWorkQueue is a Set-like Queue that permits a single copy of a given work item to exist in the queue at one time. It also provides a facility for a producer to add an item to the front of the line. Consumers are blocked waiting for new work.
  • The RegionNormalizerChore wakes up periodically and schedules new normalization work, adding targets to the queue.
  • The RegionNormalizerWorker runs in a daemon thread, grabbing work off the queue as is it becomes available.
  • The SimpleRegionNormalizer implements the logic for calculating target region sizes and emitting a list of corresponding NormalizationPlan objects.